SHC vNext QR proof of concept

Reference

Platform-level design documents, architecture diagrams, WebAssembly codec interface, research notes, and machine-readable files.

Platform specification

Architecture & data flow
Four diagrams explaining the input model, lifting, omission-only planning, and how a codec packs a dense record into a QR code.
Principles
How this is meant to work: the statements the design, the model, the profiles and the pages are held to.
Design
The design: digits in the QR, the card, the codec, what has been measured and what is still open.
Codec interface
What a codec module must export and guarantee, and what a host does to run one.
Codec directory & registry
Published WebAssembly codecs (1 registered and 6 SHA-256 content-addressed extensions), their module hashes, and per-codec hubs.

Per-codec documentation

Each codec keeps its own input model, wire format, sample files, and documentation under its hub in the Codec directory:

Codec #1: cycle-log
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. Includes input model, FHIR profiles, wire format, tools, and sample files.
SHA-256 extension: ecg-strip (ECG Rhythm 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.
SHA-256 extension: cgm-agp (CGM & Ambulatory Glucose Profile)
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.
SHA-256 extension: ips-summary (International Patient Summary (IPS))
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.
SHA-256 extension: dental-chart (Dental & Periodontal Exam)
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.
SHA-256 extension: pgx-cpic (Pharmacogenomics (CPIC Panel))
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.
SHA-256 extension: vision-rx (Vision Prescription)
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.

Research

Prompt: find histories the cycle-log codec handles badly
Give everything below the line to an agent with a shell on this machine.
Dense QR transport: interoperability facts and prior art
What scanners and platforms do with binary and digits, prior dense encodings, practical scanning limits, and decoders that ship as code; each fact marked verified or not.
Scan density for on-screen dense QR codes on Android
Research date: 2026-12-03.

Platform files

llms.txt
Concise coding-agent integration guide: architecture, WASM ABI, TypeScript snippets, QR budgets, SHA-256 extension codecs, and field cheat sheet.
llms-full.txt
Single-file bundle of llms.txt plus verbatim model.d.ts, CODEC-ABI.md, PRINCIPLES.md, and LIFT.md for large-context LLMs.
registry.json
The codec registry as JSON: id, name, SHA-256, size, summary and where to get each module.
codecs/1.wasm
The cycle-log module by registry id, 353,251 bytes. The same bytes are at codecs/sha256/f2811c67a352393f632482b61756815b4d99dc574b070ebb9fb9a89b046a0f68.wasm.
ecg-strip.wasm (by SHA-256)
ECG Rhythm Strip WebAssembly extension module, 42,742 bytes (SHA-256 b37fa36f53a0e4818c8456be8ee7fe0532806a20fb35772607f38938e6ffb75c). Also served at codecs/ecg-strip/ecg-strip.wasm.
cgm-agp.wasm (by SHA-256)
CGM & Ambulatory Glucose Profile WebAssembly extension module, 43,565 bytes (SHA-256 f57b5d846fea9c2ad54a06b77b9c48458d88b367610b0788997e7e00a4e58dac). Also served at codecs/cgm-agp/cgm-agp.wasm.
ips-summary.wasm (by SHA-256)
International Patient Summary (IPS) WebAssembly extension module, 243,809 bytes (SHA-256 47dbedbe2b671d9751de871f22506ebc0120da1ea798a26f113c6da61df98e74). Also served at codecs/ips-summary/ips-summary.wasm.
dental-chart.wasm (by SHA-256)
Dental & Periodontal Exam WebAssembly extension module, 38,290 bytes (SHA-256 5068296198af4824ac326e7f50718830b2552e5456a37518d7f1d26d76947335). Also served at codecs/dental-chart/dental-chart.wasm.
pgx-cpic.wasm (by SHA-256)
Pharmacogenomics (CPIC Panel) WebAssembly extension module, 44,707 bytes (SHA-256 8a0e73db854b448f7b4975d42c1917b1fa563c1055f232333b705349bdf36f3f). Also served at codecs/pgx-cpic/pgx-cpic.wasm.
vision-rx.wasm (by SHA-256)
Vision Prescription WebAssembly extension module, 29,823 bytes (SHA-256 7e6ae21f82b4f2bc5c9046d0416d2870bdbbf869401b90a645577e5aac3f9cd0). Also served at codecs/vision-rx/vision-rx.wasm.
lib/shc2.js
A JavaScript module with digits and bytes, card framing, a codec host and a QR encoder, used by the developer example.
Source on GitHub
Everything on this site, the codec's Rust source and the tests, under the MIT licence.

Fonts

The pages use Inter, Source Serif 4 and JetBrains Mono, served from this site (3 files, 136 KB, Latin subsets from Fontsource), under the SIL Open Font License 1.1: Inter, Source Serif 4, JetBrains Mono. The look follows the SMART Health IT design system as used on smart-health-checkin.org.