TEA gate: every EEG signal kept, alongside the reports
This commit is contained in:
+4
-2
@@ -137,13 +137,15 @@ def test_tea_from_the_hospital_to_indicators(api, platform, tmp_path):
|
||||
wait_for(api, ok(api.post("/ingest/pipelines/tea/runs", json={}))["run_id"], 1800)
|
||||
q = platform.query
|
||||
|
||||
# Silver holds every study of the hospital; each EEG signal is kept once, by its hash.
|
||||
# Silver holds every study of the hospital; each file (EEG signal, ADOS-2 report) is
|
||||
# kept once, by its hash.
|
||||
counts = {s: q(f"select count(*) from silver.{s}")[0][0] for s in ("mchat", "ados2", "eeg")}
|
||||
assert counts == {"mchat": 216, "ados2": 113, "eeg": 84}
|
||||
assert q("select count(*) from silver.clinical_note where specialty = 'pediatric_neurology'"
|
||||
)[0][0] == 83 # fmt: skip
|
||||
assert q("select count(*) from silver.eeg where edf is not null")[0][0] == 78
|
||||
assert q("select count(*) from bronze.files")[0][0] == 78
|
||||
kept = "select count(*) from bronze.files where key in (select edf from silver.eeg)"
|
||||
assert q(kept)[0][0] == 78
|
||||
|
||||
# ADOS-2: the results read from the 50 reports are the current platform's.
|
||||
reference = {(r["ado_fecha"], r["ado_pac_id"]): r for r in
|
||||
|
||||
Reference in New Issue
Block a user