TEA gate: ADOS-2 rows match by the platform's record number again (N-0010 is kept as N0010)
This commit is contained in:
+1
-2
@@ -145,7 +145,6 @@ def test_tea_from_the_hospital_to_indicators(api, platform, tmp_path):
|
|||||||
for s in ("mchat", "ados2", "eeg", "evaluacion_neuropediatrica")} # fmt: skip
|
for s in ("mchat", "ados2", "eeg", "evaluacion_neuropediatrica")} # fmt: skip
|
||||||
signed = "select count(*) from eeg where eeg_estudio is not null"
|
signed = "select count(*) from eeg where eeg_estudio is not null"
|
||||||
signals = con.execute(signed).fetchone()[0]
|
signals = con.execute(signed).fetchone()[0]
|
||||||
patients = dict(con.execute("select pac_id_hospital, pac_id from pacientes"))
|
|
||||||
counts = {s: q(f"select count(*) from silver.{s}")[0][0] for s in ("mchat", "ados2", "eeg")}
|
counts = {s: q(f"select count(*) from silver.{s}")[0][0] for s in ("mchat", "ados2", "eeg")}
|
||||||
assert counts == {s: source[s] for s in counts}
|
assert counts == {s: source[s] for s in counts}
|
||||||
assert q("select count(*) from silver.clinical_note where specialty = 'pediatric_neurology'"
|
assert q("select count(*) from silver.clinical_note where specialty = 'pediatric_neurology'"
|
||||||
@@ -165,7 +164,7 @@ def test_tea_from_the_hospital_to_indicators(api, platform, tmp_path):
|
|||||||
assert len(found) == len(reference) == counts["ados2"]
|
assert len(found) == len(reference) == counts["ados2"]
|
||||||
for row in found:
|
for row in found:
|
||||||
theirs = reference[(str(row["evaluation_date"])[:10],
|
theirs = reference[(str(row["evaluation_date"])[:10],
|
||||||
patients[numbers[row["person_id"]]])] # fmt: skip
|
int(numbers[row["person_id"]].removeprefix("N")))] # fmt: skip
|
||||||
module = MODULES[theirs["ado_modulo"]]
|
module = MODULES[theirs["ado_modulo"]]
|
||||||
assert row["module"] == module
|
assert row["module"] == module
|
||||||
for item, by_module in ITEMS.items():
|
for item, by_module in ITEMS.items():
|
||||||
|
|||||||
Reference in New Issue
Block a user