Skip to content
Alpha: see what works today →
Menu

One more source format, without one more engine

A hospital's export, a vendor's file: each source format is one adapter to write, not another engine. An adapter describes a source format. It is data, not code. cascade-bridge-rs is the one Bridge today.

Why adapters are built this way

  1. No new engine for a new format. The Bridge reads an adapter, so one more format means one more adapter and no change to the Bridge.
  2. Adapters are tested the same way. The same checks run over every adapter, so a new one is held to what the others are.
  3. Every source path is meant to be accounted for. For each path of its format an adapter says what the path becomes; what it does not carry is reported with its reason.
  4. There will be many. Hospitals and vendors each write their own format, so the cost of one more has to stay small.

One fact, three forms

Priya Natarajan's aspirin allergy arrives from three sources, each in its own shape. The adapters read the same two facts out of all three, the substance and the reaction, and they become one record.

FHIR R4 JSON

an Apple Health export: AllergyIntolerance-alg-aspirin-1.json

/code/coding/code
1191
/reaction/manifestation/coding/code
126485001

C-CDA

Kestrel Harbor Health's summary: kestrel-harbor-health-summary.xml

/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/participant/participantRole/playingEntity/code/@code
1191
/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/entryRelationship/observation/value/@code
126485001

C-CDA

Fernhill Family Clinic's summary: fernhill-family-clinic-summary.xml

/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/participant/participantRole/playingEntity/code/@code
1191
/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/entryRelationship/observation/value/@code
126485001

One Cascade record

what all three become: allergies.ttl

cascade:allergenName
"Aspirin"
cascade:allergenCode
https://ns.cascadeprotocol.org/codes/rxnorm/1191
cascade:reactionManifestationCode
http://snomed.info/id/126485001

The adapters

Each card links the adapter's explorer: open a source path like a folder to see what it becomes, what is not carried and why, and the adapter's own test case beside each mapping. Each explorer is read from the adapter's default branch as it stood when these pages were built.

Inside an adapter, and writing one