217 lines
6.1 KiB
Markdown
217 lines
6.1 KiB
Markdown
# Entities Catalog - clinica-dental
|
|
|
|
**Alias:** @PROJ_DEF_ENTITIES
|
|
**Version:** 1.0.0
|
|
**Ultima actualizacion:** 2026-01-16
|
|
|
|
---
|
|
|
|
## 1. RESUMEN
|
|
|
|
| Metrica | Valor |
|
|
|---------|-------|
|
|
| **Total Entities Propias** | 0 (Pendiente implementacion) |
|
|
| **Total Entities Heredadas** | 10 (de erp-clinicas) |
|
|
| **Estado** | Planificado |
|
|
|
|
---
|
|
|
|
## 2. ENTITIES PLANIFICADAS
|
|
|
|
### 2.1 Modulo: Odontograma (DENTAL-001)
|
|
|
|
| Entity | Archivo Planificado | Tabla BD | Descripcion |
|
|
|--------|---------------------|----------|-------------|
|
|
| Odontograma | `odontograma.entity.ts` | dental.odontogramas | Registro de odontograma |
|
|
| OdontogramaPieza | `odontograma-pieza.entity.ts` | dental.odontograma_piezas | Estado de piezas |
|
|
| PiezaDental | `pieza-dental.entity.ts` | dental.piezas_dentales | Catalogo de piezas |
|
|
|
|
### 2.2 Modulo: Tratamientos (DENTAL-002)
|
|
|
|
| Entity | Archivo Planificado | Tabla BD | Descripcion |
|
|
|--------|---------------------|----------|-------------|
|
|
| TratamientoCatalogo | `tratamiento-catalogo.entity.ts` | dental.tratamientos_catalogo | Catalogo de tratamientos |
|
|
| TratamientoPaciente | `tratamiento-paciente.entity.ts` | dental.tratamientos_paciente | Tratamientos realizados |
|
|
|
|
### 2.3 Modulo: Ortodoncia (DENTAL-003)
|
|
|
|
| Entity | Archivo Planificado | Tabla BD | Descripcion |
|
|
|--------|---------------------|----------|-------------|
|
|
| Ortodoncia | `ortodoncia.entity.ts` | dental.ortodoncia | Casos de ortodoncia |
|
|
| OrtodonciaCita | `ortodoncia-cita.entity.ts` | dental.ortodoncia_citas | Seguimiento ortodontico |
|
|
|
|
### 2.4 Modulo: Protesis (DENTAL-004)
|
|
|
|
| Entity | Archivo Planificado | Tabla BD | Descripcion |
|
|
|--------|---------------------|----------|-------------|
|
|
| Protesis | `protesis.entity.ts` | dental.protesis | Trabajos protesicos |
|
|
|
|
### 2.5 Modulo: Radiografias (DENTAL-005)
|
|
|
|
| Entity | Archivo Planificado | Tabla BD | Descripcion |
|
|
|--------|---------------------|----------|-------------|
|
|
| Radiografia | `radiografia.entity.ts` | dental.radiografias | Radiografias dentales |
|
|
|
|
### 2.6 Modulo: Presupuestos (DENTAL-006)
|
|
|
|
| Entity | Archivo Planificado | Tabla BD | Descripcion |
|
|
|--------|---------------------|----------|-------------|
|
|
| Presupuesto | `presupuesto.entity.ts` | dental.presupuestos | Presupuestos de tratamiento |
|
|
| PresupuestoLinea | `presupuesto-linea.entity.ts` | dental.presupuesto_lineas | Lineas de presupuesto |
|
|
|
|
---
|
|
|
|
## 3. UBICACION PLANIFICADA
|
|
|
|
```
|
|
backend/src/modules/
|
|
├── odontograma/
|
|
│ └── entities/
|
|
│ ├── odontograma.entity.ts
|
|
│ ├── odontograma-pieza.entity.ts
|
|
│ └── pieza-dental.entity.ts
|
|
├── tratamientos/
|
|
│ └── entities/
|
|
│ ├── tratamiento-catalogo.entity.ts
|
|
│ └── tratamiento-paciente.entity.ts
|
|
├── ortodoncia/
|
|
│ └── entities/
|
|
│ ├── ortodoncia.entity.ts
|
|
│ └── ortodoncia-cita.entity.ts
|
|
├── protesis/
|
|
│ └── entities/
|
|
│ └── protesis.entity.ts
|
|
├── radiografias/
|
|
│ └── entities/
|
|
│ └── radiografia.entity.ts
|
|
└── presupuestos/
|
|
└── entities/
|
|
├── presupuesto.entity.ts
|
|
└── presupuesto-linea.entity.ts
|
|
```
|
|
|
|
---
|
|
|
|
## 4. RELACIONES PLANIFICADAS
|
|
|
|
```yaml
|
|
relaciones:
|
|
Odontograma:
|
|
belongs_to: [Patient]
|
|
has_many: [OdontogramaPieza, TratamientoPaciente]
|
|
|
|
OdontogramaPieza:
|
|
belongs_to: [Odontograma, PiezaDental]
|
|
|
|
PiezaDental:
|
|
has_many: [OdontogramaPieza, TratamientoPaciente, Radiografia, PresupuestoLinea]
|
|
|
|
TratamientoCatalogo:
|
|
has_many: [TratamientoPaciente, PresupuestoLinea]
|
|
|
|
TratamientoPaciente:
|
|
belongs_to: [Patient, Doctor, Odontograma, TratamientoCatalogo, PiezaDental, Consultation]
|
|
|
|
Ortodoncia:
|
|
belongs_to: [Patient, Doctor]
|
|
has_many: [OrtodonciaCita]
|
|
|
|
OrtodonciaCita:
|
|
belongs_to: [Ortodoncia, Appointment]
|
|
|
|
Protesis:
|
|
belongs_to: [Patient, Doctor]
|
|
|
|
Radiografia:
|
|
belongs_to: [Patient, Consultation, PiezaDental]
|
|
|
|
Presupuesto:
|
|
belongs_to: [Patient, Doctor]
|
|
has_many: [PresupuestoLinea]
|
|
|
|
PresupuestoLinea:
|
|
belongs_to: [Presupuesto, TratamientoCatalogo, PiezaDental]
|
|
```
|
|
|
|
---
|
|
|
|
## 5. ENTIDADES HEREDADAS (de erp-clinicas)
|
|
|
|
| Entity | Origen | Uso en clinica-dental |
|
|
|--------|--------|----------------------|
|
|
| Patient | erp-clinicas | Pacientes dentales |
|
|
| Doctor | erp-clinicas | Odontologos |
|
|
| Specialty | erp-clinicas | Especialidades dentales |
|
|
| Appointment | erp-clinicas | Citas dentales |
|
|
| AppointmentSlot | erp-clinicas | Horarios de odontologos |
|
|
| Consultation | erp-clinicas | Consultas dentales |
|
|
| Diagnosis | erp-clinicas | Diagnosticos |
|
|
| Prescription | erp-clinicas | Recetas |
|
|
| PrescriptionItem | erp-clinicas | Items de receta |
|
|
| VitalSigns | erp-clinicas | Signos vitales |
|
|
|
|
---
|
|
|
|
## 6. ENUMS TYPESCRIPT (Planificados)
|
|
|
|
```typescript
|
|
// Definidos en el schema SQL, replicados en TypeScript
|
|
|
|
enum EstadoPieza {
|
|
SANO = 'sano',
|
|
CARIES = 'caries',
|
|
OBTURACION = 'obturacion',
|
|
ENDODONCIA = 'endodoncia',
|
|
CORONA = 'corona',
|
|
PUENTE = 'puente',
|
|
IMPLANTE = 'implante',
|
|
AUSENTE = 'ausente',
|
|
EXTRACCION_INDICADA = 'extraccion_indicada',
|
|
DIENTE_TEMPORAL = 'diente_temporal',
|
|
FRACTURA = 'fractura',
|
|
MOVILIDAD = 'movilidad'
|
|
}
|
|
|
|
enum CaraDental {
|
|
MESIAL = 'mesial',
|
|
DISTAL = 'distal',
|
|
OCLUSAL = 'oclusal',
|
|
INCISAL = 'incisal',
|
|
VESTIBULAR = 'vestibular',
|
|
BUCAL = 'bucal',
|
|
LINGUAL = 'lingual',
|
|
PALATINO = 'palatino'
|
|
}
|
|
|
|
enum EstadoTratamiento {
|
|
PENDIENTE = 'pendiente',
|
|
EN_PROCESO = 'en_proceso',
|
|
COMPLETADO = 'completado',
|
|
CANCELADO = 'cancelado'
|
|
}
|
|
|
|
enum TipoOrtodoncia {
|
|
BRACKETS_METALICOS = 'brackets_metalicos',
|
|
BRACKETS_ESTETICOS = 'brackets_esteticos',
|
|
BRACKETS_LINGUALES = 'brackets_linguales',
|
|
ALINEADORES = 'alineadores',
|
|
REMOVIBLE = 'removible',
|
|
RETENEDOR = 'retenedor'
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## 7. REFERENCIAS
|
|
|
|
- Database Schema: @PROJ_DEF_DB
|
|
- Services: @PROJ_DEF_SERVICES
|
|
- Ubicacion futura: `backend/src/modules/*/entities/`
|
|
- DDL: `database/schemas/01-dental-schema-ddl.sql`
|
|
- Herencia erp-clinicas: `orchestration/00-guidelines/HERENCIA-ERP-CLINICAS.md`
|
|
|
|
---
|
|
|
|
*Entities Catalog | clinica-dental | v1.0.0*
|
|
*Ultima actualizacion: 2026-01-16*
|