EEG metrics carry their age band; reference comparisons skip crossed strata; the no-session test reads no platform data
This commit is contained in:
@@ -73,6 +73,8 @@ def _report(entry: dict, measure: str) -> tuple:
|
||||
extensions = {e["url"].rsplit("/", 1)[1]: e["valueDecimal"] for e in score.get("extension", [])}
|
||||
strata = {}
|
||||
for s in group.get("stratifier", []):
|
||||
if len(s["code"]) > 1: # crossed with the category: not in the reference
|
||||
continue
|
||||
code = s["code"][0]
|
||||
name = code["coding"][0]["code"] if "coding" in code else code["text"]
|
||||
name = CATEGORY.get(measure, "banda") if name == "category" else STRATA.get(name, name)
|
||||
|
||||
@@ -105,6 +105,8 @@ def _report(entry: dict, measure: str) -> tuple:
|
||||
extensions = {e["url"].rsplit("/", 1)[1]: e["valueDecimal"] for e in score.get("extension", [])}
|
||||
strata = {}
|
||||
for s in group.get("stratifier", []):
|
||||
if len(s["code"]) > 1: # crossed with the category: not in the reference
|
||||
continue
|
||||
code = s["code"][0]
|
||||
name = code["coding"][0]["code"] if "coding" in code else code["text"]
|
||||
name = CATEGORY.get(measure, "birads") if name == "category" else name
|
||||
|
||||
@@ -82,6 +82,8 @@ def _report(entry: dict, ours: bool) -> tuple:
|
||||
extensions = {e["url"].rsplit("/", 1)[1]: e["valueDecimal"] for e in score.get("extension", [])}
|
||||
strata = {}
|
||||
for s in group.get("stratifier", []):
|
||||
if len(s["code"]) > 1: # crossed with the category: not in the reference
|
||||
continue
|
||||
code = s["code"][0]
|
||||
name = code["coding"][0]["code"] if "coding" in code else STRATA[code["text"]]
|
||||
cells: dict = defaultdict(dict)
|
||||
|
||||
+2
-1
@@ -36,7 +36,8 @@ def test_the_first_administrator_signs_in_and_adds_a_team(client):
|
||||
|
||||
|
||||
def test_the_api_answers_without_a_session(client):
|
||||
for path in ("/health", "/domains", "/ingest/pipelines", "/ingest/sources/types"):
|
||||
# routes that read no platform data (the in-process app's database is the default one)
|
||||
for path in ("/health", "/domains", "/ingest/schema", "/ingest/sources/types"):
|
||||
assert client.get(path).status_code == 200, path
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user