FHIR R4B API per domain: Patient follow-up list, clinical resources, Measure, MeasureReport, paging, CapabilityStatement; HL7 validator and page gates

This commit is contained in:
Roberto Treviño
2026-11-25 10:21:26 -06:00
parent e2ed1e9dfb
commit 0dd5c035bc
6 changed files with 640 additions and 61 deletions
+27
View File
@@ -0,0 +1,27 @@
"""Phase 3 gate, the WebApp: every page loads from the new API. The platform runs as in
production (API, Dagster), loaded with the synthetic CaCu hospital and the messy site;
Playwright drives the real pages against it (WebApp/e2e)."""
import json
import os
import subprocess
from pathlib import Path
import pytest
from test_conectar import ok, run
ROOT = Path(__file__).parents[2]
HOSPITAL = ROOT / "tests" / "fixtures" / "hospital"
PIPELINE = ROOT / "tests" / "fixtures" / "pipelines" / "hospital_cacu.json"
@pytest.mark.webapp
@pytest.mark.parametrize("platform", ["sqlite"], indirect=True) # pages read one API either way
def test_every_page_loads_from_the_api(api, platform, messy_site):
hospital = json.loads(PIPELINE.read_text().replace("{hospital}", str(HOSPITAL)))
ok(api.put("/ingest/pipelines/cacu", json=hospital))
run(api, "cacu")
ok(api.put("/ingest/pipelines/site", json=json.loads(messy_site.drawn)))
run(api, "site")
subprocess.run(["npx", "playwright", "test"], cwd=ROOT / "WebApp", check=True,
env={**os.environ, "API_URL": str(api.base_url).rstrip("/")}) # fmt: skip