Context
The final step of E12 (#184, epic closed; PR-2b merged 2026-07-03): make httpWebChartClient real against MIE's confirmed API. All pre-work: adapter core (engine/ingress/webchart/), enrollment roster (engine/ingress/enrollment/), offline dev-DB proof (#246), and the mock-contract transport (M1 Issue #255 — after it lands, this issue is request-shaping only).
What to do (when docs/MIE_INTEGRATION_QUESTIONS_2026-07-09.md section A is answered)
- Diff the real contract against docs/WEBCHART_API_ASSUMPTIONS_2026-07.md; update the client's request shaping (endpoints/auth/paging) — variant (a) if FHIR, or add row→FHIR mapping per WEBCHART_FHIR_MAPPING.md §3 if proprietary.
- Point the conformance suite at a recorded set of REAL responses (fixtures captured from the staging instance, PHI-free) — the dev-DB goldens remain the semantic baseline.
- Wire behind
resolveDataSource(env) (both WORKWELL_WEBCHART_* envs required; inert otherwise).
- First live evaluation: a bounded population slice through
evaluateSourceWithRoster, outcomes reviewed by owner BEFORE any persistence into a real run.
Acceptance criteria
How to verify
cd backend-ts && pnpm typecheck && pnpm test — must include the conformance suite passing against recorded real (PHI-free) responses, and a test proving no-envs-set ⇒ deployed behavior byte-identical (inert-unless-configured preserved).
- Confirm a bounded live staging evaluation (via
evaluateSourceWithRoster) produces reviewed, plausible outcomes, with per-patient failures isolated (never aborting the batch), and that the owner reviewed the outcomes BEFORE any persistence into a real run.
- Confirm an ADR was recorded if the real contract forced a design change, and ARCHITECTURE.md / WEBCHART_FHIR_MAPPING.md are updated accordingly.
Effort & dependencies
Effort: days (post-M1-Issue-3). Dependencies: MIE answers A1–A8 (#254); #255 (M1 Issue 3, mock-contract transport pre-build).
Hard rules (repo-wide, non-negotiable)
- CQL
Outcome Status is the SOLE compliance authority (ADR-008). Nothing you build may set, override, or shortcut it.
- Every state change writes an
audit_events row. No exceptions.
- NO new npm dependencies unless the issue explicitly approves one; schema/DDL changes are owner-gated (Taleef only — stop and ask).
- Verify before claiming done:
cd backend-ts && pnpm typecheck && pnpm test (expect ~1057+ pass / 1 pg-skip / 0 fail) and, if frontend touched, cd frontend && npm run lint && npm run build.
- Update affected docs (ARCHITECTURE/DATA_MODEL/MEASURES/DECISIONS/DEPLOY + JOURNAL.md entry) in the same PR. Conventional commits. Feature branch + PR; owner merges.
Links
Context
The final step of E12 (#184, epic closed; PR-2b merged 2026-07-03): make
httpWebChartClientreal against MIE's confirmed API. All pre-work: adapter core (engine/ingress/webchart/), enrollment roster (engine/ingress/enrollment/), offline dev-DB proof (#246), and the mock-contract transport (M1 Issue #255 — after it lands, this issue is request-shaping only).What to do (when docs/MIE_INTEGRATION_QUESTIONS_2026-07-09.md section A is answered)
resolveDataSource(env)(both WORKWELL_WEBCHART_* envs required; inert otherwise).evaluateSourceWithRoster, outcomes reviewed by owner BEFORE any persistence into a real run.Acceptance criteria
pnpm typecheck && pnpm testgreenHow to verify
cd backend-ts && pnpm typecheck && pnpm test— must include the conformance suite passing against recorded real (PHI-free) responses, and a test proving no-envs-set ⇒ deployed behavior byte-identical (inert-unless-configured preserved).evaluateSourceWithRoster) produces reviewed, plausible outcomes, with per-patient failures isolated (never aborting the batch), and that the owner reviewed the outcomes BEFORE any persistence into a real run.Effort & dependencies
Effort: days (post-M1-Issue-3). Dependencies: MIE answers A1–A8 (#254); #255 (M1 Issue 3, mock-contract transport pre-build).
Hard rules (repo-wide, non-negotiable)
Links