Skip to content
Alpha · We're looking for development partners. Build with us →
Menu

From a hospital's file to records.

Draft specification · Checked 14 Nov 2026

The Bridge turns a hospital’s file into records in the pod. Each file format has an adapter, which describes the format as data, with no code. An engine runs the adapter. One specification keeps every adapter and engine compatible.

An example

One allergy, in and out.

Meridian sends Alex’s penicillin allergy as FHIR. The FHIR R4 adapter turns it into two small records in her pod: the record itself, and the version of it Meridian sent.

In: Meridian’s FHIR

{
  "resourceType": "AllergyIntolerance",
  "code": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "7980",
        "display": "Penicillin G"
      }
    ],
    "text": "Penicillin G"
  },
  "patient": {
    "reference": "Patient/pat-conformance-1"
  },
  "criticality": "high",
  "id": "alg-pcn-1"
}

Out: records in the pod

# The record: what it is, and Meridian's own id for it
<urn:uuid:6996…> a cascade:AllergyOrIntolerance ;
    cascade:sourceRecordId "alg-pcn-1" .
# This version of it: what Meridian said, kept as sent
<ni:///sha-256;wC0O…>
    prov:specializationOf <urn:uuid:6996…> ;
    cascade:allergenName "Penicillin G" ;
    cascade:allergenCode rxnorm:7980 ;
    cascade:allergyCriticality "high" .

Each line of the output comes from a rule in the adapter. This is the whole rule for criticality, two lines of SPARQL:

?resource xyz:criticality ?o .
BIND (cascade:allergyCriticality AS ?p)

Every record also says who sent it (Meridian Health System), when it was retrieved, and which adapter and engine wrote it; those lines are left out above. Shortened ids end in “…”, and the prefixes are left out. This exact case, in the adapter’s tests ↗

Sources

Each source, and where its adapter stands.

SourceAdapterStageExplorerCases
FHIR R4cascade-bridge-adapter-fhir-r4In the protocol todayExplorer ↗Cases ↗
C-CDA R2.1cascade-bridge-adapter-ccdaIn the protocol todayExplorer ↗Cases ↗
Apple Health readingsNone yetPlannedNone yetNone yet
Google Health ConnectNone yetPlannedNone yetNone yet
WearablesNone yetPlannedNone yetNone yet
Medical imagingNone yetPlannedNone yetNone yet

Each source's name links its detail and its documentation on the sources page.

Add a format

A new format is a new adapter.

1

Copy the template

Start from the specification’s synthetic adapter, which has every required file in place.

2

Write the rules and the cases

A short SPARQL rule for each part of the format, like the one above, and a test case for each: an input file and the records it must produce.

3

Run the tests, then share it

The engine’s test command runs your cases. Open a pull request; every engine must pass your adapter’s cases.

Guide: Write an adapter ↗

For authors

For adapter and engine authors.

The rest of this page is the detail: how the specification keeps every adapter and engine compatible, what is built to it so far, and where each file lives.

The contract

One set of rules for adapters and engines.

How the Bridge specification holds an adapter and an engine to one contractAn adapter on the left, an engine on the right, and the specification between them with its checks. Check 1, the adapter profile, holds the adapter. Check 2, the manifest's cases, holds both. Check 3, the library cases, holds the engine. The lift and versioning vectors are written in the specification and are not in the shared check. An adapter a package of data for one source format, with no code in it COMPONENTS A crateone file describing all the others MappingsSPARQL CONSTRUCT queries A test manifesteach case an input and its graph A source accountingevery source path: carried, or not The source's schemathe case inputs are checked by it Findings queries and gapsreported where a value is not kept builds on SPARQL 1.1, RO-Crate 1.2, W3C test manifests, SKOS An engine a program that runs any adapter over a source document COMMANDS The test commandruns the cases, reports in EARL The convert commanddocument in; records, findings out The library commandruns the specification's own cases Each host it ships tonamed, set up and run on its own The stages around a mappingsplit, map, name versions, validate builds on SPARQL 1.1, EARL, PROV-O The Bridge specification ↗ the terms an adapter is declared in, the profile and shapes it must meet, the commands an engine offers, and the check both sides run in CI DRAFT CHECK 1 · HOLDS THE ADAPTER The adapter profile one requirement per file, each run over the whole package CHECK 2 · HOLDS BOTH The manifest's cases the engine runs each case on each host; one query judges its report CHECK 3 · HOLDS THE ENGINE The library cases the specification's own cases, run through library on each host WRITTEN, NOT IN THE SHARED CHECK The lift and versioning vectors run by an engine's own tests How the Bridge specification holds an adapter and an engine to one contractThe specification at the top, then an adapter, the checks, and an engine. Check 1, the adapter profile, holds the adapter. Check 2, the manifest's cases, holds both. Check 3, the library cases, holds the engine. The lift and versioning vectors are written in the specification and are not in the shared check. The Bridge specification ↗ the terms an adapter is declared in, the profile and shapes it must meet, the commands an engine offers, and the check both sides run in CI DRAFT An adapter a package of data for one source format, with no code in it COMPONENTS A crateone file describing all the others MappingsSPARQL CONSTRUCT queries A test manifesteach case an input and its graph A source accountingevery source path: carried, or not The source's schemathe case inputs are checked by it Findings queries and gapsreported where a value is not kept builds on SPARQL 1.1, RO-Crate 1.2, W3C test manifests, SKOS CHECK 1 · HOLDS THE ADAPTER The adapter profile one requirement per file, each run over the whole package CHECK 2 · HOLDS BOTH The manifest's cases the engine runs each case on each host, and one query judges its report CHECK 3 · HOLDS THE ENGINE The library cases the specification's own cases, run through library on each host WRITTEN, NOT IN THE SHARED CHECK The lift and versioning vectors run by an engine's own tests An engine a program that runs any adapter over a source document COMMANDS The test commandruns the cases, reports in EARL The convert commanddocument in; records, findings out The library commandruns the specification's own cases Each host it ships tonamed, set up and run on its own The stages around a mappingsplit, map, name versions, validate builds on SPARQL 1.1, EARL, PROV-O
A solid check is run by the specification's own tooling in the CI of every adapter and engine, and a failure blocks the merge. The dashed box is written in the specification and is not run by that tooling.

FHIR R4 explorer ↗: open a source path like a folder to see what it becomes, what is not carried and why, and the test case beside each mapping.

An adapter is held to the specification by a check of its package. An engine is held to it by the specification's own cases. The two are held to each other by the adapter's test manifest, which every engine must pass on every adapter.

An adapter is data.

An adapter is a package of data for one source format, with no code in it. One file, an RO-Crate, describes every other file. Its mappings are SPARQL CONSTRUCT queries, each one saying how a part of the source becomes Cascade terms. Its cases are a test manifest: a source document, and the graph and findings it must produce. Its source accounting goes through the source path by path, and what the adapter does not carry is reported with its reason.

An engine runs any adapter.

An engine loads an adapter, lifts the source document into RDF, runs the adapter's queries over it and writes the Cascade records that result. It offers three commands: test runs an adapter's manifest and writes an EARL report, convert turns one document into a graph of records and its findings, and library runs the specification's own cases. Because the adapter holds no code, anyone can read what it does with a source, and a second engine can run the same adapter.

LimitThe specification's lift and versioning vectors are run by an engine's own tests, not by the shared check. One engine is built, so the claim that any engine runs any adapter has been shown for one engine. The specification is a draft: no compatibility is promised before Cascade Protocol v2’s first stable release.

What is built

Two adapters and one engine are built to it.

Each box links to its repository and to what is published from it. All three repositories run the checks above on every pull request and every night, each against the others' default branch: nothing pins one to a commit of another.

The adapters and the engine built to the Bridge specification todayIn the protocol today: the FHIR R4 and C-CDA R2.1 adapters, and the engine cascade-bridge-rs, each with links to its repository and its reports. The specification's three checks run between them. Planned: adapters for Apple Health readings, Google Health Connect, wearables and medical imaging, and a second engine. Adapters IN THE PROTOCOL TODAY FHIR R4 JSON cascade-bridge-adapter-fhir-r4 Repository Explorer Cases report C-CDA R2.1 XML cascade-bridge-adapter-ccda Repository Explorer Cases report PLANNED Apple Health readings Google Health Connect Wearables Medical imaging (DICOM) The Bridge specification ↗ cascade-bridge-spec the contract, and the checks both sides run in their own CI CHECK 1 · THE ADAPTER PROFILE run on both adapters, on every pull request and every night CHECK 2 · THE MANIFESTS' CASES cascade-bridge-rs runs every case of both adapters, natively and on Node CHECK 3 · THE LIBRARY CASES run on cascade-bridge-rs, natively and on Node a planned adapter or engine would be held to the same three checks Engines IN THE PROTOCOL TODAY cascade-bridge-rs written in Rust; runs natively, and on Node through WebAssembly Repository Tests report Builds Not built yet in it: the stamp stage, and streaming a referenced dataset. PLANNED A second engine, in another language The adapters and the engine built to the Bridge specification todayIn the protocol today: the FHIR R4 and C-CDA R2.1 adapters, and the engine cascade-bridge-rs, each with links to its repository and its reports. The specification's three checks run between them. Planned: adapters for Apple Health readings, Google Health Connect, wearables and medical imaging, and a second engine. The Bridge specification ↗ cascade-bridge-spec the contract, and the checks both sides run in their own CI Adapters IN THE PROTOCOL TODAY FHIR R4 JSON cascade-bridge-adapter-fhir-r4 Repository Explorer Cases report C-CDA R2.1 XML cascade-bridge-adapter-ccda Repository Explorer Cases report PLANNED Apple Health readings Google Health Connect Wearables Medical imaging (DICOM) CHECK 1 · THE ADAPTER PROFILE run on both adapters, on every pull request and every night CHECK 2 · THE MANIFESTS' CASES cascade-bridge-rs runs every case of both adapters, natively and on Node CHECK 3 · THE LIBRARY CASES run on cascade-bridge-rs, natively and on Node a planned adapter or engine would be held to the same three checks Engines IN THE PROTOCOL TODAY cascade-bridge-rs written in Rust; runs natively, and on Node through WebAssembly Repository Tests report Builds Not built yet in it: the stamp stage, and streaming a referenced dataset. PLANNED A second engine, in another language
Dashed boxes are planned and not built. What each planned source would bring is on the sources page.

The sources page says what each source is and where its own documentation lives. The Standards page lists the standards the Bridge is built on and where Cascade defines its own terms.

Where to look

Where to look, by what it shows.

Each of these is a file in one of the repositories above, or a page the hub builds from their default branches. A hub page names the commit it was built from.

Show all the places to look

What an adapter maps

What is not carried yet

Whether an engine passes

The cases themselves

Building an adapter or an engine