diff --git a/tests/test_orquestacion_timeline.py b/tests/test_orquestacion_timeline.py index eda31fa..acfda7a 100644 --- a/tests/test_orquestacion_timeline.py +++ b/tests/test_orquestacion_timeline.py @@ -15,7 +15,7 @@ from pathlib import Path import pytest CORTE = date(2025, 12, 31) -INFERRED = {"colposcopia", "tratamiento", "citologia_de_vigilancia", "diagnostico", "antecedente"} +INFERRED = {"colposcopia", "tratamiento", "citologia_de_vigilancia", "diagnostico", "antecedente", "orden_biopsia"} KIT_ROWS = Path(__file__).parent / "fixtures" / "kit_cacu_timeline.json" diff --git a/tests/test_pathology_report_wording.py b/tests/test_pathology_report_wording.py index 0828fa6..b73594d 100644 --- a/tests/test_pathology_report_wording.py +++ b/tests/test_pathology_report_wording.py @@ -44,9 +44,9 @@ def test_ki67_is_read_under_its_long_caption_and_not_from_the_name(): assert float(_leer("Índice de proliferación Ki-67: 25 %")["biopsia.ki67_pct"][0]) == 25.0 -@pytest.mark.parametrize("tipo", ["CARCINOMA MUCINOSO", "CARCINOMA TUBULAR", - "CARCINOMA DUCTAL Y LOBULILLAR INFILTRANTE (MIXTO)"]) -def test_the_rarer_invasive_types_are_read_as_other(tipo): - """Pins down: a mucinous, tubular or mixed carcinoma is read as `OTRO` rather than left unresolved or taken as - ductal or lobular. Fails if their aliases leave the catalog.""" - assert _leer(f"Diagnóstico: BIOPSIA: {tipo} (8480/3).")["biopsia.tipo_histologico"][0] == "OTRO" +@pytest.mark.parametrize("tipo, codigo", [("CARCINOMA MUCINOSO", "8480/3"), ("CARCINOMA TUBULAR", "8211/3"), + ("CARCINOMA DUCTAL Y LOBULILLAR INFILTRANTE (MIXTO)", "8522/3")]) +def test_the_rarer_invasive_types_are_read_as_their_code(tipo, codigo): + """Pins down: a mucinous, tubular or mixed ductal and lobular carcinoma is read as its ICD-O-3 code rather than left + unresolved or taken as ductal or lobular. Fails if their names leave the catalog's aliases.""" + assert _leer(f"Diagnóstico: BIOPSIA: {tipo} (8480/3).")["biopsia.tipo_histologico"][0] == codigo