API and mapping learnings¶
- 2026-11-12: SMART sandbox returned 10 verified Synthea patients; capture ranked 20 candidates by availability of A1c/BP/cholesterol. Captured every page for all seven requested resource types verbatim. SOURCE.md records URLs and SHA256 values. Its paging next URL may have no slash before
?_getpages; URI host comparison is safer than a stringhttps://host/*check. - 2026-11-12: Ottehr upstream test JSON captured verbatim from commit
b78016c8324362751d83c2710430788c67b2f739: two Patient resources, one QuestionnaireResponse, one Questionnaire. Separate provenance underdata/fixtures/ottehr/SOURCE.md; no accounts or Oystehr credentials used. - 2026-11-12: Oystehr authentication documentation confirms M2M POST
https://auth.zapehr.com/oauth/token, audiencehttps://api.zapehr.com, Bearer token andx-oystehr-project-id. Documented FHIR base ishttps://fhir-api.zapehr.com/r4. Adapter throws before any request unless all three environment variables exist. Only synthetic projects may be configured; adapter has not been exercised live. - 2026-11-12: FHIR version IDs are opaque strings. This demo compares numeric producer versions numerically; different opaque versions need strictly newer producer lastUpdated. Same version never mutates a row. No lexical ordering of UUIDs.
- 2026-11-12: ACC/AHA published vignette confirms the age-55, TC-213, HDL-50, untreated-SBP-120 nonsmoker/no-diabetes reference results 2.1%, 3.0%, 5.3%, 6.1% across four coefficient groups. Risk tests use ±0.5 percentage points. Absence of diabetes or treatment facts in an extract is not evidence of false; missing inputs remain unscored.
- 2026-11-12: Firely 6 rejects unknown JSON elements; a negative mapping test must place a quantity in a legal extension to verify it cannot masquerade as Observation.valueQuantity. DeserializationFailedException is caught by operational quarantine.
-
2026-11-12: Windows Application Control initially blocked some new managed assemblies (0x800711C7). Later ordinary executions succeeded without policy changes. Operational migration/idempotency/version/quarantine tests passed locally. Initial migration is provider-neutral; EF-generated snapshot omits provider-specific column types, letting each provider infer them. SQL Server model drift check reported no changes; SQLite migration tests passed.
-
2026-11-12: Captured SMART Synthea bundles contain 88 BP panels using LOINC 55284-4, not 85354-9. Both carry 8480-6 systolic and 8462-4 diastolic components in mm[Hg]. Mapping retained these components, but risk assembly originally filtered them out. Both panel codes now feed the same BP rule; a fixture regression test verifies cited BP evidence.
- 2026-11-12: Default offline sync and lakehouse read only top-level Synthea Bundles: 10 patients. Ottehr resources are separate upstream contract examples, not included in default app data. FixtureFhirSource can read the Ottehr directory explicitly and map its two standalone Patient resources, but the current CLI has no Ottehr-fixture switch. Questionnaire/QuestionnaireResponse resources are preserved as producer examples, outside the seven mapped types. Oystehr live credentials have not been supplied or used.
- 2026-11-12: Oystehr now additionally requires OYSTEHR_SYNTHETIC_PROJECT=true before credentials or network access. This is an operator attestation, not automated proof that the project contains no PHI. No live Oystehr requests were made.
- 2026-11-12: Operational databases persist one source identity (fixtures, sandbox, or Oystehr project/base URL). Switching identity is rejected before reading; use a separate empty database for live sources. The isolation migration conservatively labels previously synced demo databases fixtures. The web Run sync again button intentionally remains fixture-only.
- 2026-11-12: Live adapters freeze a UTC upper cutoff when instantiated and send _lastUpdated=le cutoff on every patient/type request, plus a five-minute overlap before the stored watermark. Versions beyond cutoff abort the type transaction without advancing its cursor. SMART accepted a GET with both gt and le filters and returned one known synthetic Patient. This addresses sequential-patient races with synchronized clocks and modest indexing lag; arbitrary server clock skew or indexing delays over five minutes need a reconciliation strategy. Oystehr filter behavior remains unverified live.