A domain maps its own studies to FHIR; TEA's served resources pass the validator

This commit is contained in:
Roberto Treviño
2026-12-06 04:00:35 -06:00
parent 4ce3a165ad
commit 0f1c59a35f
2 changed files with 17 additions and 1 deletions
+5
View File
@@ -310,7 +310,12 @@ def _studies(domain: Domain, persons: list[str], at: str) -> list[Resource]:
by `at`: its DiagnosticReport (or Encounter) and Observations, in date order."""
found: list[Resource] = []
report_facts = _clinical(domain).REPORT_FACTS
own = getattr(part(domain, "fhir"), "STUDIES", {}) # studies the domain maps itself
for study in catalog.of_domain(domain.value):
if study in own:
found += own[study](lambda kind: reads.rows(domain.value, kind, persons=persons,
cutoff=at)) # fmt: skip
continue
spec = catalog.studies()[study]
facts = {}
if kind := report_facts.get(study):