CODEX TASK 14
You are Cedric on gpt-6-astra (high reasoning), pass 14: REQUIREMENTS GAP CLOSE + one verify fix. Run AFTER pass 9, on branch wt/WT-dc65/fhir-demo, held to the pass-11 bar: NUnit, Stryker on new logic, quality-matrix cells, CI green. Commit and push each item yourself as its check passes; never stop to ask for a review chair.
- FIX (independent verify on ANDREWBEDROOMTV, core.autocrlf=true, at 0dc8a20):
FhirDemo.Contracts.Tests.SnapshotContractTests.CapturedVueSnapshotSatisfiesPatientAndSummaryConsumerShapesFAILS. - Expected SHA-256
98E82155...B9D9, but the checkout hashes to5C6DF936...6AF6. - The contract fixture is hashed as raw bytes, but the file checks out as CRLF.
- Fix: add
.gitattributestext eol=lffor all contract fixtures,web/public/snapshot/**and any other hashed fixture, then renormalize. MakeContractFixtures.Readhash LF-normalized content, or keep the bytes LF by attribute. - Grep for EVERY SHA-pinned fixture and apply the same fix.
- Prove it with a test that clones with
core.autocrlf=true(or simulates CRLF) and still passes. - J3 SFTP intake (REQUIREMENTS-TRACE J3):
- Add
SftpDropFolderIngestor: a local folder watcher standing in for SFTP. It ingests FHIR bundles / HL7 v2 ORU files dropped intodata/inbox, runs them through the existing parsers, quarantines bad files todata/quarantinewith a reason, and is idempotent by file hash. - Add a CLI command and an Aspire resource.
- Tests: good file, bad file, duplicate file.
- J5 stored procedure + data quality (REQUIREMENTS-TRACE J5):
- Add one SQL Server stored procedure through an EF migration (
usp_RefreshGoldOutreachor an upsert), with a SQLite-compatible fallback path documented. - Add a
dq_check_resulttable recording null codes, unknown code systems, missing units and future dates per run, plus a small Vue "Data quality" panel (snapshot mode too). - A4 Metabase visual proof:
- Run the lakehouse, then Metabase (pinned image, loopback only), then provision.
- Capture Playwright screenshots of all 5 dashboards into
docs/screenshots/metabase-*.png, with the card queries' real row counts. - Add a section to
docs/levels, "Power BI → Metabase over DuckDB gold tables", mapping each SSM Power BI report to its Metabase dashboard and gold table. 4b. PREDICTIVE REPORTS THEY CAN SEE, both ways (Andrew: "for the ssm like way i want them to see reports that show the predictive, and same for the ehr oystehr"). Metabase isn't hosted publicly, so the reports must ALSO live in the Vue app and work in static snapshot mode on a phone. They come from real pipeline outputs, never hand-made numbers. -
SSM way (DuckDB gold, the Power BI equivalent). A "Predictive reports" page fed by the gold tables:
- (a) a risk-stratification summary: patients by risk tier and flag type (A1c rising, uncontrolled BP, ASCVD band, flu gap)
- (b) the A1c trend cohort chart (rising vs stable vs improving)
- (c) BP control over time
- (d) an ASCVD 10-year risk distribution, never imputed; "insufficient data" shown as its own bar
- (e) an outreach worklist: who to call this week, and why, with cited inputs
- (f) a "what drives the prediction" panel showing the rule and its inputs for any patient
Each chart shows its source gold table + SQL and the data-as-of time. Mirror the same dashboards in Metabase (the screenshots from item 4). - Oystehr way (EHR). The same predictive views computed by the Way 2 Oystehr Zambda risk rules over the same cohort (fixture mode; live Oystehr data once Andrew says "apply" on the seed): - per-patient risk cards as the Oystehr EHR would show them - a population roll-up - Parity banner: "Way 1 (.NET lakehouse) and Way 2 (Oystehr Zambda): N/N flags agree", from the existing parity harness. Any disagreement is listed, not hidden. - Point-of-care vs population: each report states which one it answers (SSM = population and outreach; EHR = the doctor in the room). - Snapshot export, nav entries, e2e at 390px and 1280px, screenshots
docs/screenshots/predictive-*.png. 5. Paste everything into VERIFY.md "Pass 14": build, NUnit count, Stryker, e2e and screenshots.