- Ya
- 25 Agosti 2026, 15:24 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 2e54ea4
Completes the round trip: a resource can now be written, read back, read at a specific revision, and have its history walked. The JSON is SERVED rather than assembled. A resource fans out across many tables — an Observation has components, performers, reference ranges, codings, identifiers — so rebuilding it per request would make GET latency proportional to how complicated the resource is, and the sickest patients with the richest records would be the slowest to open. Two primary-key lookups instead, regardless of size. The cost is staleness, paid knowingly: projectorVersion on every version row is what lets a reprojection sweep find rows an upgraded mapper left behind, which is what stops a US Core bump quietly serving last year's shape until certification testing finds it. FhirReadOutcome exists because FHIR needs THREE answers where a naive lookup gives two. A resource that never existed is 404; one that was deleted is 410 Gone and still answers vread and history. Collapsing them tells a caller that a record they legitimately held a reference to never existed — which turns a deletion into a phantom, and when the caller is another system reconciling a chart, it reconciles against a fiction. A pointer row with no matching version throws rather than reporting 404. Those two are written in one transaction, so it cannot happen through the writer; if it is ever seen, something wrote outside it, and answering 404 would hide that while quietly losing a resource. isCurrentVersion is the optimistic-concurrency check, and a null If-Match answers false rather than true. Two clinicians editing the same problem list at once is ordinary, and last-write-wins silently discards one of their assessments — defaulting a missing precondition to "matches" is how that protection gets disabled without anyone deciding to. 1674 tests green.