Guide
Cascade Protocol v1
Bring in records from two hospitals.
Every download from a patient portal repeats the whole record as of that day, so two hospitals’ downloads overlap heavily. The cascade command-line tool merges what matches and asks you about what disagrees.
Step 1
A minute
Make a pod and import the first
cascade pod init ./my-pod cascade pod import ./my-pod epic-download.zip --source-system epic-mychart
It reads C-CDA files, FHIR R4 and the zip bundles portals hand out (IHE XDM), and tags every record with its source.
Step 2
A minute
Import the second
cascade pod import ./my-pod other-hospital.xml --source-system other-hospital
Each incoming record is matched against what the pod holds, by its code first (RxNorm, SNOMED CT, LOINC, CVX, ICD-10), then by its name. A match with the same values is a duplicate and is merged; a match that disagrees becomes a question for you.
Step 3
A minute
See what disagrees
cascade pod conflicts ./my-pod
It exits with 0 when nothing is left to decide, and 1 when something is, so a script can stop on it.
Step 4
A minute each
Decide
cascade pod resolve ./my-pod --conflict <id> --keep source-a --note "Dose confirmed at the visit"
Take the ID from cascade pod conflicts: each conflict’s Resolve: line is this command, ready to copy. Keep one source, the other, or both. Your decision is kept in the pod as a record of its own, and cascade pod reconcile ./my-pod --apply carries it out now, or the next import does. No record is edited.
Step 5
Repeat
Add more sources
The same two commands work for a third source and every one after.