The CaCu timeline fixture knows the biopsy order, and the rare-type wording test uses the ICD-O-3 codes

This commit is contained in:
rockdrigo
2026-11-21 02:57:36 -06:00
parent 6b011df0fd
commit fae6b2232f
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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"
+6 -6
View File
@@ -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