Predictive reports, both ways¶
Open Predictive reports in the Vue navigation. The same page works from the static snapshot on a phone. It contains actual pipeline results, not hand-authored counts.
SSM way: population and outreach. DuckDB gold queries show warning-flag burden, flag types, A1c trend cohorts, monthly BP control, ASCVD bands including insufficient data, and an outreach review queue. Each chart exposes its SQL, source tables and evaluation time. A patient selector opens the rules and cited inputs behind that patient's results. Warning burden is an outreach ordering convention, not a validated risk score. A1c direction and BP history are descriptive cohort summaries; they do not invent a forecast.
Oystehr way: the doctor in the room. The existing TypeScript Zambda rules independently evaluate the same fixture cohort. Its mapper also exports eligible A1c/BP facts for the corresponding descriptive charts. Vue computes its population views from those Way 2 facts and flags, not from Way 1 counts. Point-of-care cards preserve the actual rule details and FHIR citations. Live Oystehr data is not claimed; the seed has not been applied.
The existing ehr-track/scripts/parity.ps1 -WorkingTree harness now emits a structured receipt. The exporter binds that receipt to the actual gold patient/flag keys, scores, indicators, cited IDs and clock, independently checks the comparison counts, and retains every reported disagreement. Empty cohorts, duplicate keys, stale gold, inflated denominators and unexplained process failure cannot produce a passing banner. The captured cohort is 12 patients, 56/56 flags agree, evaluated at 2026-11-12T12:00:00Z. All ASCVD scores in this capture are insufficient data; no missing inputs were imputed.
Run dotnet run --project src/FhirDemo.Cli -- lakehouse run --fixtures to regenerate local gold and data/predictive.json. The CLI uses millisecond precision shared by JavaScript and DuckDB. After replacing gold, it invalidates the previous predictive receipt before regeneration; a failed refresh cannot serve an old agreement banner against newer gold. The local pipeline requires the .NET 10 SDK, PowerShell, Git and Node supporting TypeScript stripping.
Run dotnet run --project src/FhirDemo.Cli -- snapshot --out <directory> to export API payloads, the predictive receipt and data quality. Predictive export uses a frozen evaluation time for reproducible comparison. Existing captured contract fixtures are separately SHA-pinned and must retain their reviewed provenance when replacing them.
Backend logic is C#. TypeScript extends the existing Vue and Oystehr Zambda implementations; the Metabase capture runner uses the project's existing Playwright JavaScript tooling. No live Oystehr write or hosted deployment is part of these commands.
See Power BI → Metabase over DuckDB gold tables, Pass 14 verification, and the captured phone, desktop, SSM detail and EHR cards.