263 lines
7.3 KiB
YAML
263 lines
7.3 KiB
YAML
# =============================================================================
|
|
# PROJECT-ENV-CONFIG.yml - ERP CLINICAS
|
|
# =============================================================================
|
|
# Vertical de ERP-Suite especializada en Clínicas y Consultorios Médicos
|
|
# Actualizado: 2025-12-08
|
|
# Referencia: ~/workspace/core/devtools/environment/DEVENV-PORTS.md
|
|
# =============================================================================
|
|
|
|
project:
|
|
name: "ERP-CLINICAS"
|
|
code: "CL"
|
|
description: "Sistema para Clínicas y Consultorios con Cumplimiento NOM-024"
|
|
type: "vertical"
|
|
level: "2B.2"
|
|
status: "planning"
|
|
parent: "erp-suite"
|
|
|
|
paths:
|
|
root: "/home/isem/workspace/projects/erp-suite/apps/verticales/clinicas"
|
|
backend: "backend/"
|
|
frontend: "frontend/"
|
|
database: "database/"
|
|
docs: "docs/"
|
|
orchestration: "orchestration/"
|
|
|
|
# =============================================================================
|
|
# PUERTOS (Según DEVENV-PORTS.md)
|
|
# =============================================================================
|
|
ports:
|
|
backend: 3500
|
|
frontend: 5178
|
|
database: 5437
|
|
redis: 6384
|
|
|
|
# =============================================================================
|
|
# BASE DE DATOS
|
|
# =============================================================================
|
|
database:
|
|
type: "postgresql"
|
|
host: "localhost"
|
|
port: 5437
|
|
name: "clinicas_db"
|
|
user: "clinicas_user"
|
|
|
|
schemas:
|
|
core_inherited: 12 # Schemas heredados de erp-core
|
|
vertical_specific:
|
|
- clinical # Pacientes, citas, consultas, expediente
|
|
- pharmacy # Stock medicamentos, dispensaciones
|
|
- laboratory # Órdenes lab, resultados
|
|
- imaging # Estudios DICOM, metadatos
|
|
- telemedicine # Sesiones video, grabaciones
|
|
|
|
encryption:
|
|
enabled: true
|
|
algorithm: "AES-256"
|
|
encrypted_fields:
|
|
- antecedentes_medicos
|
|
- alergias
|
|
- diagnosticos
|
|
- notas_clinicas
|
|
|
|
migration:
|
|
tool: "typeorm"
|
|
directory: "database/migrations/"
|
|
|
|
# =============================================================================
|
|
# STACK TECNOLOGICO
|
|
# =============================================================================
|
|
stack:
|
|
runtime: "Node.js 20+"
|
|
language: "TypeScript 5.3+"
|
|
backend:
|
|
framework: "Express.js"
|
|
orm: "TypeORM 0.3.17"
|
|
encryption: "AES-256"
|
|
frontend:
|
|
framework: "React 18"
|
|
build: "Vite"
|
|
ui: "Tailwind CSS + shadcn/ui"
|
|
auth:
|
|
base: "JWT + bcryptjs"
|
|
extension: "2FA obligatorio para personal médico"
|
|
|
|
# =============================================================================
|
|
# HERENCIA DEL CORE
|
|
# =============================================================================
|
|
core_inheritance:
|
|
version: "0.6.0"
|
|
tables_inherited: 97
|
|
modules_inherited:
|
|
- auth # + extensión 2FA
|
|
- users
|
|
- roles
|
|
- tenants
|
|
- inventory # Para farmacia
|
|
- cfdi
|
|
|
|
specs_applicable: 6
|
|
specs_implemented: 0
|
|
specs_detail:
|
|
- SPEC-INTEGRACION-CALENDAR
|
|
- SPEC-MAIL-THREAD-TRACKING
|
|
- SPEC-TRAZABILIDAD-LOTES-SERIES
|
|
- SPEC-FACTURACION-CFDI
|
|
- SPEC-TWO-FACTOR-AUTHENTICATION
|
|
- SPEC-RRHH-EVALUACIONES-SKILLS
|
|
|
|
# =============================================================================
|
|
# MODULOS DE LA VERTICAL
|
|
# =============================================================================
|
|
modules:
|
|
total: 12
|
|
story_points: 395
|
|
list:
|
|
- code: CL-001
|
|
name: Fundamentos
|
|
sp: 0
|
|
priority: P0
|
|
status: pending
|
|
compliance: LFPDPPP
|
|
- code: CL-002
|
|
name: Pacientes
|
|
sp: 34
|
|
priority: P0
|
|
status: pending
|
|
compliance: LFPDPPP
|
|
- code: CL-003
|
|
name: Citas
|
|
sp: 42
|
|
priority: P0
|
|
status: pending
|
|
- code: CL-004
|
|
name: Consultas SOAP
|
|
sp: 47
|
|
priority: P0
|
|
status: pending
|
|
compliance: NOM-024
|
|
- code: CL-005
|
|
name: Recetas
|
|
sp: 34
|
|
priority: P0
|
|
status: pending
|
|
compliance: NOM-024
|
|
- code: CL-006
|
|
name: Laboratorio
|
|
sp: 42
|
|
priority: P1
|
|
status: pending
|
|
- code: CL-007
|
|
name: Farmacia
|
|
sp: 34
|
|
priority: P1
|
|
status: pending
|
|
- code: CL-008
|
|
name: Facturación CFDI
|
|
sp: 21
|
|
priority: P0
|
|
status: pending
|
|
- code: CL-009
|
|
name: Reportes
|
|
sp: 34
|
|
priority: P1
|
|
status: pending
|
|
- code: CL-010
|
|
name: Telemedicina
|
|
sp: 47
|
|
priority: P2
|
|
status: pending
|
|
- code: CL-011
|
|
name: Expediente NOM-024
|
|
sp: 39
|
|
priority: P0
|
|
status: pending
|
|
compliance: NOM-024
|
|
- code: CL-012
|
|
name: Imagenología DICOM
|
|
sp: 21
|
|
priority: P2
|
|
status: pending
|
|
|
|
# =============================================================================
|
|
# CUMPLIMIENTO NORMATIVO
|
|
# =============================================================================
|
|
compliance:
|
|
nom_024_ssa3_2012:
|
|
name: "Expediente Clínico Electrónico"
|
|
requirements:
|
|
- estructura_soap: "Subjetivo, Objetivo, Análisis, Plan"
|
|
- campos_obligatorios:
|
|
- identificacion_paciente
|
|
- fecha_consulta
|
|
- motivo_consulta
|
|
- exploracion_fisica
|
|
- diagnostico_cie10
|
|
- plan_tratamiento
|
|
- firma_electronica: "Requerida en recetas"
|
|
- consentimiento_informado: "Documentado"
|
|
|
|
lfpdppp:
|
|
name: "Ley Federal de Protección de Datos Personales"
|
|
requirements:
|
|
- encriptacion: "AES-256 para datos sensibles"
|
|
- auditoria: "Log de accesos a expedientes"
|
|
- consentimiento: "Tratamiento de datos"
|
|
- derecho_acceso: "Portal de paciente"
|
|
|
|
# =============================================================================
|
|
# SEGURIDAD ESPECIAL
|
|
# =============================================================================
|
|
security:
|
|
two_factor_auth:
|
|
required_for: "medical_staff"
|
|
methods: ["TOTP", "SMS"]
|
|
|
|
data_encryption:
|
|
algorithm: "AES-256"
|
|
key_rotation: "quarterly"
|
|
|
|
audit_logging:
|
|
enabled: true
|
|
events:
|
|
- medical_record_access
|
|
- prescription_created
|
|
- patient_data_modified
|
|
- consent_updated
|
|
retention: "10 years" # Requerimiento NOM-024
|
|
|
|
# =============================================================================
|
|
# ARCHIVOS DE ENTORNO
|
|
# =============================================================================
|
|
env_files:
|
|
template: "orchestration/environment/.env.example"
|
|
backend: "backend/.env"
|
|
frontend: "frontend/.env"
|
|
|
|
env_variables:
|
|
required:
|
|
- NODE_ENV
|
|
- PORT
|
|
- DATABASE_URL
|
|
- JWT_SECRET
|
|
- REDIS_URL
|
|
- ENCRYPTION_KEY # Para AES-256
|
|
- TWILIO_SID # Para 2FA SMS
|
|
- TWILIO_AUTH_TOKEN
|
|
optional:
|
|
- LOG_LEVEL
|
|
- CORS_ORIGIN
|
|
- HL7_ENDPOINT # Interoperabilidad
|
|
|
|
# =============================================================================
|
|
# NOTAS
|
|
# =============================================================================
|
|
notes: |
|
|
- Vertical especializada en sector salud
|
|
- CRITICO: Cumplimiento NOM-024-SSA3-2012 (expediente clínico)
|
|
- CRITICO: Cumplimiento LFPDPPP (protección de datos)
|
|
- 2FA OBLIGATORIO para personal médico
|
|
- Encriptación AES-256 para datos sensibles
|
|
- Auditoría de accesos con retención 10 años
|
|
- Puertos asignados según DEVENV-PORTS.md (rango 3500)
|