SHC vNext QR · Codec Registry
Codecs
Portable, zero-import WebAssembly codecs that expand dense QR card payloads into standard FHIR R4 Bundles. Each codec owns its own input model, FHIR profiles, wire format, and interactive tools.
Experimental codec registry. Only constrained codecs are registered: each has a published input model, one encoding per dataset, and a defined mapping to FHIR. Nothing here has been shared for use; ids may still change. The machine-readable registry is published at registry.json. Unregistered codecs can also be named directly in a card with a 0x00 prefix followed by the 32-byte SHA-256 of the WebAssembly module.
Registered codecs (1)
Longitudinal menstrual-cycle and health tracking spanning up to 10,000 days (bounded naturally by QR capacity): uniform FHIR-aligned entry arrays for bleeding and flow, pain, symptoms, basal and wearable temperature (with exclusions), fertility signs, wellbeing series, pill log, medications (with optional doses), contraception, pregnancy and breastfeeding intervals, procedures, screening answers, custom series, optional export timestamp, name and birth date.
WASM: 353,251 B
Canonical: Yes
SHA-256: f2811c67a352…
Open codec hub WASM
SHA-256 Extension Codecs (6)
Any clinical domain can ship a portable codec without central registry approval by using content-addressed framing: a leading 0x00 byte followed by the 32-byte sha256(wasm) digest. When a card opens, any viewer can fetch the module by hash and cryptographically verify its exact bytes before running it inside the zero-import WebAssembly sandbox.
ecg-strip · Lossless 1D signal codec (LPC + Golomb-Rice)
100% bit-exact lossless compression of 10-second human ECG rhythm strips (PhysioNet MIT-BIH & European ST-T) expanding to FHIR R4 Observation.valueSampledData.
WASM: 42,742 B
Card: 1,406–2,128 B
Max FHIR ÷ card: 8×
SHA-256: b37fa36f53a0…
Live viewer demo Codec hub WASM
cgm-agp · Lossless time-series + deterministic FHIR summary synthesizer
100% lossless 14-day FreeStyle Libre CGM glucose traces (up to 4,019 readings) expanding into full HL7 FHIR R4 CGM IG Bundles with integer-computed GMI, CV, Mean, and 5-band TIR.
WASM: 43,565 B
Card: 519–1,895 B
Max FHIR ÷ card: 1,386×
SHA-256: f57b5d846fea…
Live viewer demo Codec hub WASM
ips-summary · Embedded 8,207-concept SNOMED CT IPS + EDQM + LOINC dictionary
HL7 FHIR R4 International Patient Summary (document Bundle + Composition) with 8,207 verified SNOMED CT IPS Free Set, EDQM, and LOINC terms BPE-compressed right inside the WASM module.
WASM: 243,809 B
Card: 109–322 B
Max FHIR ÷ card: 99×
SHA-256: 47dbedbe2b67…
Live viewer demo Codec hub WASM
dental-chart · 2D spatial anatomical differential coding (32 teeth × 6 sites)
Full 32-tooth adult restorative and 6-site periodontal charting using arch-order spatial prediction, expanding to FHIR R4 Observation bundles plus computed AAP/EFP summary metrics.
WASM: 38,290 B
Card: 147–248 B
Max FHIR ÷ card: 982×
SHA-256: 5068296198af…
Live viewer demo Codec hub WASM
pgx-cpic · Embedded CPIC knowledge base + deterministic CDS expansion
14-gene pharmacogenomics diplotype panel in ~90 bytes that expands via embedded CPIC clinical tables into FHIR R4 Genomics Observations and actionable DetectedIssue drug-gene alerts.
WASM: 44,707 B
Card: 88–92 B
Max FHIR ÷ card: 358×
SHA-256: 8a0e73db854b…
Live viewer demo Codec hub WASM
vision-rx · Bit-packed clinical quantizer (quarter-diopter optical fields)
Bit-packed eyeglasses and contact lens prescriptions (sphere, cylinder, axis, add, prism, base curve, diameter, PD) expanding to FHIR R4 VisionPrescription + LOINC 79886-8 Observation.
WASM: 29,823 B
Card: 70–200 B
Max FHIR ÷ card: 20×
SHA-256: 7e6ae21f82b4…
Live viewer demo Codec hub WASM
| Codec | Paradigm | WASM size | Samples | Card bytes | QR L range | Max FHIR ÷ card | SHA-256 |
ecg-stripECG Rhythm Strip |
Lossless 1D signal codec (LPC + Golomb-Rice) |
42,742 B |
8 |
1,406–2,128 B |
Version 28–35 (L) |
8× |
b37fa36f53a0e481… |
cgm-agpCGM & Ambulatory Glucose Profile |
Lossless time-series + deterministic FHIR summary synthesizer |
43,565 B |
4 |
519–1,895 B |
Version 16–33 (L) |
1,386× |
f57b5d846fea9c2a… |
ips-summaryInternational Patient Summary (IPS) |
Embedded 8,207-concept SNOMED CT IPS + EDQM + LOINC dictionary |
243,809 B |
4 |
109–322 B |
Version 7–13 (L) |
99× |
47dbedbe2b671d97… |
dental-chartDental & Periodontal Exam |
2D spatial anatomical differential coding (32 teeth × 6 sites) |
38,290 B |
4 |
147–248 B |
Version 8–11 (L) |
982× |
5068296198af4824… |
pgx-cpicPharmacogenomics (CPIC Panel) |
Embedded CPIC knowledge base + deterministic CDS expansion |
44,707 B |
4 |
88–92 B |
Version 6–7 (L) |
358× |
8a0e73db854b448f… |
vision-rxVision Prescription |
Bit-packed clinical quantizer (quarter-diopter optical fields) |
29,823 B |
4 |
70–200 B |
Version 6–10 (L) |
20× |
7e6ae21f82b4f2bc… |
How codecs plug into viewers
Every QR card starts with its codec reference (a registry ID byte or a 32-byte SHA-256 hash), followed by the codec's binary payload and a 2-byte check. The universal viewer unpacks the reference, runs the matching WebAssembly module in a sandbox with zero imports, and receives a standard FHIR R4 Bundle.
Because the right clinical visualization differs completely across domains — a menstrual-cycle calendar looks nothing like an ECG waveform, CGM glucose profile, dental chart, or pharmacogenomics alert panel — each codec can register its own specialized viewer plugin. Any codec without a custom UI still opens in the universal viewer's generic FHIR Bundle view.
Adding a new codec
The platform is built for dozens of independent domain codecs. To add one, implement the Codec interface (ABI) (shc_decode, optional shc_encode, zero WASI/host imports, deterministic output, bounded memory), publish its schemas and profiles under codecs/<name>/, and either reference it directly via 0x00 || sha256(wasm) or register its module in registry.json.
Read the Codec ABI Developer guide