integrating latest dashboard changes
This commit is contained in:
@@ -114,7 +114,8 @@ ENTITY_REGISTRY: dict[str, EntitySpec] = {
|
||||
schema=PacientesImportSchema,
|
||||
model=TeaPacientes,
|
||||
repository=tea_pacientes_repository,
|
||||
conflict_fields=None,
|
||||
# The source's own id; TEA's child tables reference it directly.
|
||||
conflict_fields=("pac_id",),
|
||||
),
|
||||
"cacu.OrdenesEstudio": EntitySpec(
|
||||
schema=CacuOrdenesEstudioImportSchema,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
"""Import schema for `core.tea.models.Pacientes`. All fields optional, like TEA's
|
||||
Core; system-managed `pac_created_at`/`pac_updated_at`/`pac_fuente_sistema` are excluded."""
|
||||
Core; system-managed `pac_created_at`/`pac_updated_at`/`pac_fuente_sistema` are excluded.
|
||||
|
||||
`pac_id` is importable: every other TEA table references the patient by the
|
||||
source system's integer id, so it has to be kept, not renumbered."""
|
||||
from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
@@ -14,6 +17,7 @@ _PARENTESCO_CATALOG = Catalog(Parentesco)
|
||||
|
||||
|
||||
class PacientesImportSchema(ImportSchema):
|
||||
pac_id: Optional[int] = None
|
||||
pac_id_hospital: Optional[str] = None
|
||||
pac_id_titular: Optional[str] = None
|
||||
pac_parentesco: CatalogValue(_PARENTESCO_CATALOG) = None
|
||||
|
||||
Reference in New Issue
Block a user