Patients are searched by birth date; a cytology's report says what followed it
This commit is contained in:
+5
-1
@@ -54,6 +54,7 @@ CODES = { # platform code -> the current platform's
|
||||
} # fmt: skip
|
||||
STRATA = {"age_group": "grupo_edad", "follow_up_status": "estatus_seguimiento",
|
||||
"result": "citologia_alto_grado"} # fmt: skip
|
||||
NEW_STRATA = {"round"} # CACU_EU7, Phase 6
|
||||
CATEGORY = {"CACU_EU7": "resultado", "CACU_CONFIRMACION_CITOLOGIA": "biopsia_grado"}
|
||||
|
||||
|
||||
@@ -110,6 +111,8 @@ def test_cacu_from_the_hospital_to_indicators_and_risks(api, platform, tmp_path)
|
||||
reference = json.loads((REFERENCE / "indicators.json").read_text())
|
||||
(measures,) = pages(api, "/cacu/fhir/Measure")
|
||||
for measure in [e["resource"] for e in measures["entry"]]:
|
||||
if measure["name"] not in reference: # Phase 6's (tests/test_cacu_new_measures.py)
|
||||
continue
|
||||
params = {"measure": measure["id"], "reporting-period": ",".join(PERIODS),
|
||||
"event-cutoff": CAPTURED_ON} # fmt: skip
|
||||
found = [e for b in pages(api, "/cacu/fhir/MeasureReport", params) for e in b["entry"]]
|
||||
@@ -118,7 +121,8 @@ def test_cacu_from_the_hospital_to_indicators_and_risks(api, platform, tmp_path)
|
||||
for ours, theirs in zip(found, reference[name]["body"]["entry"], strict=True):
|
||||
a, b = _report(ours, name), _report(theirs, name)
|
||||
where = (name, ours["resource"]["period"]["start"])
|
||||
assert a[0] == b[0] and a[3] == b[3], where
|
||||
old = {k: v for k, v in a[3].items() if k not in NEW_STRATA}
|
||||
assert a[0] == b[0] and old == b[3], where
|
||||
if cohort: # scores its count; the current platform gave none
|
||||
assert b[1] is None and a[1] == a[0]["initial-population"], where
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user