preliminary release

This commit is contained in:
Roberto Treviño Cervantes
2026-10-29 12:12:28 -06:00
parent be9b528c5f
commit f65d5f3f4d
37 changed files with 2139 additions and 228 deletions
+17
View File
@@ -231,3 +231,20 @@ def test_catalog_for_exposes_field_catalog_and_errors_stay_on_field():
assert classified.field == "pac_sexo"
assert classified.category == ErrorCategory.OUT_OF_CATALOG
assert "no está en el catálogo" in classified.message
def test_catalog_aliases_for_values_the_indicator_kit_uses():
"""Hospital spellings the indicator kit's own synthetic sources use must
not be rejected at import."""
from webapi.imports.schemas.cacu.biopsia_cervical import BiopsiaCervicalImportSchema
from webapi.imports.schemas.cacu.citologia_cervical import CitologiaCervicalImportSchema
from webapi.imports.schemas.cama.ordenes_estudio import OrdenesEstudioImportSchema as CamaOrdenes
from webapi.imports.schemas.tea.ordenes_estudio import OrdenesEstudioImportSchema as TeaOrdenes
assert BiopsiaCervicalImportSchema(pac_id_hospital="H", bx_cin_grado="CIN1").bx_cin_grado == "LIEBG"
assert BiopsiaCervicalImportSchema(pac_id_hospital="H", bx_cin_grado="nic 3").bx_cin_grado == "LIEAG"
cito = CitologiaCervicalImportSchema(pac_id_hospital="H", cit_celulas_escamosas="NEGATIVO")
assert cito.cit_celulas_escamosas == "NORMAL"
assert CamaOrdenes(pac_id_hospital="H", ord_numero_hospital=1, ord_tipo_estudio="MASTOGRAFIA").ord_tipo_estudio == "MASTOGRAFIA"
assert TeaOrdenes(ord_tipo_estudio="POTENCIALES_EVOCADOS").ord_tipo_estudio == "POTENCIALES_EVOCADOS_AUDITIVOS"
assert TeaOrdenes(ord_tipo_estudio=" evaluacion_psicologica_tea ").ord_tipo_estudio == "EVALUACION_PSICOLOGICA_TEA"