← Platform Foundation

FEAT-DATA-VERSIONING

Data Versioning

Healthcare data outlives every version of the software that wrote it. As the platform evolves, the shape of stored data evolves with it — deliberately, audibly, and without stranding a single record on an old shape or taking a hospital offline to catch up.

Why this matters

A hospital's data is written over years by many versions of the same platform. Systems that never planned for this end up in one of two bad places: records nobody dares touch because "the old module wrote those", or big-bang migration weekends where the system is down until the last record is converted.

Both are unacceptable in clinical operations. A ward cannot pause because the vendor released an update, and a clinician cannot be told that last year's orders display incorrectly because they predate a format change. At the same time, refusing to ever change data structures means the platform ossifies — every improvement bolted around the old shape instead of into it.

The resolution is to treat data structure change as a routine, governed activity: every record knows what shape it was written in, every shape change ships with the recipe to bring old records forward, and the platform updates its own data — mostly in the background, while the hospital keeps working.

What's in the box

  • Every record knows its shape. Each stored record is validated against a published, versioned structure definition and carries the version it was written under. "What shape is this data in?" is a query, never an investigation.

  • Shape changes ship with their recipe. A structure change is released together with the converter that upgrades existing records — declared in the standard FHIR mapping form, tested against real samples of the old shape in every build. The build fails if a shape changes without a version bump, or a breaking change ships without its converter. The discipline is enforced by machinery, not memory.

  • Updates ahead of time, not downtime. For a planned breaking change, the new shape is announced one release before the software starts relying on it. Stored data converges to the new shape quietly in the background while the hospital runs on the current one; when the follow-up release flips over, the work is already done.

  • A short, honest maintenance moment when it can't be avoided. Some changes genuinely conflict with running the old software on the data. After such an update, a customer organisation is held in maintenance — visibly, per customer organisation — only long enough to update its configuration and its active records: open orders, visits in progress. Years of history update afterwards, in the background, without anyone waiting on them.

  • Configuration updates arrive as reviewed git changes. For configuration data, the upgrade is written into the organisation's configuration repository as an audited commit — the same reviewed, promotable path every configuration change takes — and applied to the runtime store the normal way. Operational records are updated in place, each one carrying a provenance record of what converted it, when, and from what.

  • Old integrations keep working. A device driver or partner system still sending the previous shape is accepted at the door and converted on arrival, within a published support window. The hospital upgrades integrations on its own schedule, not the vendor's.

  • The platform refuses to guess. If a rollback or a skipped update would make the software older than the data it faces, the customer organisation stays in maintenance with a clear diagnosis. Silent misreading of clinical data is not a failure mode on offer.

Practices we follow

  • HL7 FHIR conformance machinery — StructureDefinition versions, version-specific canonical citations, and StructureMap / FHIR Mapping Language as the declarative converter form. The versioning grain and the conversion language are the standard's, not ours.
  • Expand/contract (parallel change) — the industry pattern for zero-downtime schema evolution, applied to FHIR shapes: announce, converge, flip.
  • GitOps — configuration data migrates through the same reviewed, audited, promotable git path as every other configuration change.

What customers and operators experience

  • A ward during a routine update notices nothing: the update lands, data converges in the background, dashboards and histories keep rendering.
  • A customer organisation after a breaking update sees a brief, explicit maintenance state — "your system is updating" — measured by its open workload, not by the size of its archive.
  • A compliance officer can trace any record's history of shape changes: what converted it, when, from which version, under which release.
  • A hospital's IT team reviewing the configuration repository sees structure upgrades as commits — diffable, revertable, promoted from staging to production like any other change.
  • An integration partner on last year's interface keeps sending the shape they built against; the platform converts at the door and publishes how long that window lasts.
  • An operator watching a fleet update sees per organisation migration progress; a customer organisation that is stuck is a visible fact, not a silent one.

Limits and trade-offs

  • Breaking changes take two releases. The zero-downtime path trades calendar time for uptime: announce first, flip second. A change that must land in one release buys that speed with a maintenance moment.
  • Not every change can be made seamless. A change that removes information cannot be converted back and forth losslessly; those take the maintenance path, and the release notes say so.
  • The support window for old shapes is finite and published. Integrations older than the window are refused with a clear message, not silently accepted.
  • Immutable evidence is left alone. Audit trails and wire-level traces are never rewritten to a new shape — their evidentiary value depends on it. They are converted on read if ever consumed.
  • Fleets are briefly heterogeneous. After a release, customer organisations finish their background convergence at different times. The per organisation gate makes this safe; the ops surface makes it visible.
What it rests on
0 / 8 passing 5 without a result yet
  • kept by its basis its basis has no result Every record knows which version of its shape it was written in, each past version of it keeps its own, and records can be found by the shape version they carry. REQ-DVR-EVERY-RECORD-KNOWS-ITS-SHAPE
    Based on 3 promises
    • not cited Every object accepted through the face carries, as a fact of the accept event stored beside the payload, the version of each declared pack profile it was validated against; re-accepting replaces the stamp, never accumulates it. REQ-DBO-SHAPE-WRITTEN-UNDER-STAMPED
    • not cited The shape stamp is a per-version fact column in state and history; the envelope's shape dimension is rebuilt from it on reindex, and every history version serves its own stamp. REQ-DBO-SHAPE-STAMP-IS-DERIVED
    • not cited Objects are searchable by shape-stamp bound — below, or at and above, a stated major for a stated profile — pageable like any search, on every serving surface. REQ-DBO-SHAPE-QUERYABLE-BY-VERSION
  • kept by its basis its basis has no result A change of shape never takes the system offline: old records are read in the new shape as they are needed, and converting them is an ordinary change that keeps the old version in the record's history. REQ-DVR-NO-MIGRATION-TAKES-THE-SYSTEM-DOWN
    Based on 2 promises
    • not cited Old payload versions are upgraded lazily by registered converters; a schema-version transition never requires a big-bang rewrite. REQ-DBO-CORE-UPGRADE-ON-READ
    • not cited The store converts stamped objects to a target major in place: each rewrite is an ordinary versioned write, so history keeps the pre-conversion object with its own stamp and the new version carries the new one. REQ-DBO-SHAPE-RESHAPED-IN-PLACE
  • kept by its basis its basis has no result Converting stored records runs at a bounded pace, reports what it did and picks up where it left off; a record it cannot convert is named and left for the next try instead of holding up the rest. REQ-DVR-CONVERSION-PICKS-UP-WHERE-IT-LEFT-OFF
    Based on 2 promises
    • not cited A reshape is paged and rate-bounded, hands back a cursor and its counts, and a re-run finds only what is still behind. REQ-DBO-SHAPE-RESHAPE-RESUMABLE
    • not cited An object no converter covers is named and left behind rather than stranding the rest; the run reports it and the next run tries again. REQ-DBO-SHAPE-REFUSED-OBJECT-LEFT-BEHIND
  • kept by its basis its basis has no result An organisation can count its records by kind and shape version before and after a change, records on shapes since withdrawn included, so none is stranded unseen. REQ-DVR-NO-RECORD-IS-STRANDED-UNSEEN
    Based on 2 promises
    • not cited The tenant inventory counts shape stock per type, profile and stamped version — including objects that declare a profile and carry no stamp at all — so the same report runs before and after a migration and diffs line by line. REQ-DBO-SHAPE-STOCK-COUNTED
    • not cited A stamp is a fact about a past accept: withdrawing or re-numbering a pack version leaves stock stamped with it findable, countable and convertible. REQ-DBO-SHAPE-STAMP-OUTLIVES-ITS-PACK
  • kept by its basis its basis has no result A record written by a newer version than the organisation runs is never shown half-understood or quietly left out: it is refused by name, with an answer other systems can tell apart from any fault. REQ-DVR-DATA-TOO-NEW-IS-REFUSED-PLAINLY
    Based on 2 promises
    • not cited An object stamped above what the tenant's pack declares for that shape is refused on every read — naming the object, the stamp and the pack's version — never served best-effort and never silently omitted from a search. REQ-DBO-SHAPE-NEWER-DATA-REFUSED
    • not cited The refusal is a distinct, documented error a consumer can gate on, told apart from a fault, a permission and a malformed request. REQ-DBO-SHAPE-TOO-NEW-IS-ITS-OWN-ANSWER
  • gap: not yet stated Where a short per-organisation maintenance moment cannot be avoided, it covers only configuration and active records. FEAT-GAP-f43d8886
  • gap: not yet stated Configuration upgrades arrive as reviewed changes to the customer's configuration. FEAT-GAP-954e055c
  • gap: not yet stated An older integration is converted at the door within a published window. FEAT-GAP-671e6af1