feat(orchestration): Add PROJECT-PROFILE.yml for propagation agent
Defines project structure, module mapping, entity adaptations, terminology, and propagation rules for the Automatic Propagation Agent. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d6e529fc14
commit
0f828f924c
368
orchestration/PROJECT-PROFILE.yml
Normal file
368
orchestration/PROJECT-PROFILE.yml
Normal file
@ -0,0 +1,368 @@
|
||||
# PROJECT-PROFILE.yml - clinica-dental
|
||||
# Perfil de proyecto para el Agente de Propagación Automático
|
||||
# Version: 1.0.0
|
||||
# Fecha: 2026-01-18
|
||||
|
||||
project:
|
||||
name: "clinica-dental"
|
||||
code: "DEN"
|
||||
type: "SUB-VERTICAL"
|
||||
level: "SUB-CONSUMER"
|
||||
giro: "odontologia"
|
||||
version: "1.0.0"
|
||||
completeness: 15
|
||||
|
||||
description: |
|
||||
ERP sub-vertical para clínicas y consultorios dentales:
|
||||
- Odontología general
|
||||
- Ortodoncia
|
||||
- Endodoncia
|
||||
- Periodoncia
|
||||
- Cirugía maxilofacial
|
||||
- Estética dental
|
||||
Hereda de erp-clinicas y especializa para odontología.
|
||||
|
||||
# =============================================================================
|
||||
# JERARQUÍA DE HERENCIA
|
||||
# =============================================================================
|
||||
|
||||
inheritance:
|
||||
parent: "erp-clinicas"
|
||||
grandparent: "erp-core"
|
||||
chain: ["erp-core", "erp-clinicas", "clinica-dental"]
|
||||
|
||||
# =============================================================================
|
||||
# ESTRUCTURA DEL PROYECTO
|
||||
# =============================================================================
|
||||
|
||||
structure:
|
||||
type: "monorepo"
|
||||
root_path: "projects/clinica-dental"
|
||||
|
||||
apps:
|
||||
backend:
|
||||
path: "apps/backend"
|
||||
framework: "NestJS"
|
||||
modules_path: "src/modules"
|
||||
entities_path: "src/modules/*/entities"
|
||||
|
||||
frontend:
|
||||
path: "apps/frontend"
|
||||
framework: "React"
|
||||
features_path: "src/features"
|
||||
pages_path: "src/pages"
|
||||
|
||||
database:
|
||||
path: "apps/database"
|
||||
ddl_path: "ddl"
|
||||
|
||||
# =============================================================================
|
||||
# MAPEO DE MÓDULOS: clinicas → dental
|
||||
# =============================================================================
|
||||
|
||||
module_mapping:
|
||||
# Heredados de erp-clinicas (se mantienen)
|
||||
auth: "auth"
|
||||
users: "users"
|
||||
roles: "roles"
|
||||
tenants: "tenants"
|
||||
catalogs: "catalogs"
|
||||
patients: "dental-patients" # Pacientes → Pacientes dentales
|
||||
medical-supplies: "dental-supplies"
|
||||
financial: "financial"
|
||||
appointments: "dental-appointments"
|
||||
purchases: "purchases"
|
||||
patient-relations: "patient-relations"
|
||||
audit: "audit"
|
||||
notifications: "notifications"
|
||||
clinical-reports: "dental-reports"
|
||||
|
||||
# De erp-clinicas que se especializan
|
||||
medical-records: "dental-records"
|
||||
scheduling: "dental-scheduling"
|
||||
prescriptions: "dental-prescriptions"
|
||||
insurance: "dental-insurance"
|
||||
lab-integration: "dental-lab" # Integración con laboratorios dentales
|
||||
|
||||
# =============================================================================
|
||||
# ADAPTACIONES ESPECÍFICAS DE ODONTOLOGÍA
|
||||
# =============================================================================
|
||||
|
||||
adaptations:
|
||||
entities:
|
||||
# Desde erp-clinicas
|
||||
Patient: "DentalPatient"
|
||||
MedicalSupply: "DentalSupply"
|
||||
Appointment: "DentalAppointment"
|
||||
MedicalRecord: "DentalRecord"
|
||||
|
||||
fields_additions:
|
||||
DentalPatient:
|
||||
- name: "odontogram"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Odontograma completo del paciente"
|
||||
|
||||
- name: "dental_history"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Historial dental específico"
|
||||
|
||||
- name: "orthodontic_treatment"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Si está en tratamiento de ortodoncia"
|
||||
|
||||
- name: "last_cleaning_date"
|
||||
type: "date"
|
||||
nullable: true
|
||||
reason: "Última limpieza dental"
|
||||
|
||||
- name: "periodontal_status"
|
||||
type: "varchar(50)"
|
||||
enum: ["healthy", "gingivitis", "mild_periodontitis", "moderate_periodontitis", "severe_periodontitis"]
|
||||
nullable: true
|
||||
reason: "Estado periodontal"
|
||||
|
||||
- name: "bruxism"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Si presenta bruxismo"
|
||||
|
||||
DentalSupply:
|
||||
- name: "dental_category"
|
||||
type: "varchar(50)"
|
||||
enum: ["restorative", "endodontic", "orthodontic", "surgical", "preventive", "prosthetic", "anesthetic", "instrument"]
|
||||
reason: "Categoría de insumo dental"
|
||||
|
||||
- name: "tooth_application"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Dientes donde se puede aplicar"
|
||||
|
||||
- name: "shade_guide"
|
||||
type: "varchar(20)"
|
||||
nullable: true
|
||||
reason: "Guía de color (para restauraciones)"
|
||||
|
||||
DentalAppointment:
|
||||
- name: "treatment_type"
|
||||
type: "varchar(50)"
|
||||
enum: ["cleaning", "filling", "extraction", "root_canal", "crown", "implant", "orthodontic", "whitening", "veneer", "emergency"]
|
||||
reason: "Tipo de tratamiento dental"
|
||||
|
||||
- name: "teeth_involved"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Dientes involucrados (notación FDI)"
|
||||
|
||||
- name: "quadrant"
|
||||
type: "varchar(20)"
|
||||
enum: ["upper_right", "upper_left", "lower_right", "lower_left", "full_mouth"]
|
||||
nullable: true
|
||||
reason: "Cuadrante a tratar"
|
||||
|
||||
- name: "anesthesia_required"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Si requiere anestesia"
|
||||
|
||||
- name: "anesthesia_type"
|
||||
type: "varchar(50)"
|
||||
nullable: true
|
||||
reason: "Tipo de anestesia"
|
||||
|
||||
- name: "x_rays_required"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Si requiere radiografías"
|
||||
|
||||
DentalRecord:
|
||||
- name: "odontogram_history"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Historial de cambios en odontograma"
|
||||
|
||||
- name: "treatment_plan"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Plan de tratamiento completo"
|
||||
|
||||
- name: "x_ray_images"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Referencias a imágenes de rayos X"
|
||||
|
||||
- name: "intraoral_photos"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Fotos intraorales"
|
||||
|
||||
fields_removals:
|
||||
DentalPatient:
|
||||
- "blood_type" # Menos crítico en odontología general
|
||||
|
||||
# =============================================================================
|
||||
# MÓDULOS ESPECÍFICOS DE ODONTOLOGÍA
|
||||
# =============================================================================
|
||||
|
||||
vertical_modules:
|
||||
- id: "DEN-001"
|
||||
name: "odontogram"
|
||||
description: "Gestión de odontograma digital"
|
||||
status: "planned"
|
||||
priority: "P0"
|
||||
entities:
|
||||
- Odontogram
|
||||
- ToothStatus
|
||||
- ToothHistory
|
||||
|
||||
- id: "DEN-002"
|
||||
name: "treatment-plans"
|
||||
description: "Planes de tratamiento dental"
|
||||
status: "planned"
|
||||
priority: "P0"
|
||||
entities:
|
||||
- TreatmentPlan
|
||||
- TreatmentPhase
|
||||
- TreatmentProcedure
|
||||
|
||||
- id: "DEN-003"
|
||||
name: "orthodontics"
|
||||
description: "Módulo de ortodoncia"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- OrthodonticCase
|
||||
- BracketPlacement
|
||||
- WireChange
|
||||
- OrthoProgress
|
||||
|
||||
- id: "DEN-004"
|
||||
name: "dental-imaging"
|
||||
description: "Imagenología dental"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- DentalImage
|
||||
- Panoramic
|
||||
- Periapical
|
||||
- Bitewing
|
||||
|
||||
- id: "DEN-005"
|
||||
name: "dental-lab-orders"
|
||||
description: "Pedidos a laboratorio dental"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- LabOrder
|
||||
- LabWork
|
||||
- ShadeSelection
|
||||
|
||||
# =============================================================================
|
||||
# TERMINOLOGÍA ODONTOLÓGICA
|
||||
# =============================================================================
|
||||
|
||||
terminology:
|
||||
# Heredado de clínicas
|
||||
paciente: "paciente dental"
|
||||
cita: "cita dental"
|
||||
consulta: "consulta dental"
|
||||
|
||||
# Específico de odontología
|
||||
tratamiento: "tratamiento dental"
|
||||
limpieza: "profilaxis"
|
||||
empaste: "restauración"
|
||||
extraccion: "extracción/exodoncia"
|
||||
endodoncia: "tratamiento de conductos"
|
||||
corona: "corona dental"
|
||||
implante: "implante dental"
|
||||
ortodoncia: "ortodoncia"
|
||||
blanqueamiento: "blanqueamiento dental"
|
||||
carilla: "carilla/veneer"
|
||||
radiografia: "radiografía dental"
|
||||
odontograma: "odontograma"
|
||||
|
||||
# =============================================================================
|
||||
# NOTACIÓN DENTAL
|
||||
# =============================================================================
|
||||
|
||||
dental_notation:
|
||||
system: "FDI" # Federación Dental Internacional (ISO 3950)
|
||||
quadrants:
|
||||
1: "Superior derecho (11-18)"
|
||||
2: "Superior izquierdo (21-28)"
|
||||
3: "Inferior izquierdo (31-38)"
|
||||
4: "Inferior derecho (41-48)"
|
||||
|
||||
tooth_surfaces:
|
||||
- code: "M"
|
||||
name: "Mesial"
|
||||
- code: "D"
|
||||
name: "Distal"
|
||||
- code: "V"
|
||||
name: "Vestibular/Bucal"
|
||||
- code: "L"
|
||||
name: "Lingual/Palatino"
|
||||
- code: "O"
|
||||
name: "Oclusal/Incisal"
|
||||
|
||||
# =============================================================================
|
||||
# REGLAS DE PROPAGACIÓN
|
||||
# =============================================================================
|
||||
|
||||
propagation_rules:
|
||||
accept_from:
|
||||
- erp-clinicas # Padre directo
|
||||
- erp-core # Si erp-clinicas lo propaga
|
||||
|
||||
auto_accept:
|
||||
- documentation
|
||||
- definitions
|
||||
- security_fixes
|
||||
- bug_fixes
|
||||
- patient_base_changes
|
||||
|
||||
require_adaptation:
|
||||
- entities
|
||||
- ddl_schema
|
||||
- medical_records # Adaptar a registros dentales
|
||||
|
||||
require_review:
|
||||
- breaking_changes
|
||||
- schema_migrations
|
||||
- hipaa_related
|
||||
|
||||
reject:
|
||||
- veterinary_features
|
||||
- general_surgery_features
|
||||
|
||||
# =============================================================================
|
||||
# VALIDACIONES ESPECÍFICAS
|
||||
# =============================================================================
|
||||
|
||||
validations:
|
||||
pre_propagation:
|
||||
- "Verificar que módulo padre (erp-clinicas) está actualizado"
|
||||
- "Validar que entity mapping está definido"
|
||||
|
||||
post_propagation:
|
||||
- "npm run build"
|
||||
- "npm run lint"
|
||||
- "npm run test:affected"
|
||||
|
||||
business_rules:
|
||||
- "Odontograma usa notación FDI"
|
||||
- "Tratamientos de ortodoncia requieren plan aprobado"
|
||||
- "Radiografías requieren consentimiento del paciente"
|
||||
- "Anestesia registra tipo y cantidad"
|
||||
- "Laboratorio dental requiere guía de color"
|
||||
|
||||
# =============================================================================
|
||||
# HISTORIAL
|
||||
# =============================================================================
|
||||
|
||||
history:
|
||||
- date: "2026-01-18"
|
||||
action: "Creación de PROJECT-PROFILE.yml"
|
||||
author: "Claude-Opus-4.5"
|
||||
Loading…
Reference in New Issue
Block a user