Lenient reader, spec-clean emitter
Postel's Law, applied to healthcare data: the parser tolerates the real-world quirks feeds actually ship and records a warning — it never silently drops or garbles a field. The serializer emits strictly to spec.
Open source
We build and maintain an MIT-licensed suite of parsers for the formats that carry clinical data — HL7 v2, MLLP transport, DICOM imaging, X12 claims, C-CDA documents, NCPDP pharmacy, and FHIR. Each one is engineered to the same bar: a lenient reader that never silently drops or garbles a field, a spec-clean emitter, and a dependency footprint small enough to audit in an afternoon.
The suite goes public alongside the cosyte launch. Until then, every package below is in pre-launch.
The bar
Postel's Law, applied to healthcare data: the parser tolerates the real-world quirks feeds actually ship and records a warning — it never silently drops or garbles a field. The serializer emits strictly to spec.
Most packages ship with zero runtime dependencies; the few that need an XML parser say so precisely. Small enough to read the whole tree, not just trust it.
Every package is MIT — permissive, auditable, and free to run in production. The credibility is the code, not a pitch.
The suite
Seven packages, one bar. Each is scoped to a single standard and honest about what a given release covers — the concrete surface lives in the docs when the package is public.
@cosyte/hl7
HL7 v2
Parse, validate, and build HL7 v2 messages — the standard that still carries the overwhelming majority of real hospital messaging traffic.
Available at launch.
@cosyte/mllp
MLLP
Minimal Lower Layer Protocol — the framing, ACK correlation, and reconnect behavior HL7 v2 needs over TCP.
Available at launch.
@cosyte/dicom
DICOM Part 10
Read, navigate, and de-identify DICOM Part 10 files — the standard behind medical imaging across PACS and modality vendors.
Available at launch.
@cosyte/x12
ASC X12 / HIPAA 005010
Parse and emit the HIPAA 005010 healthcare transaction sets — claims (837), eligibility (270/271), remittance (835), enrollment (834), and the rest.
Available at launch.
@cosyte/ccda
HL7 C-CDA R2.1
Parse and produce Consolidated CDA clinical documents — the format behind transitions of care, summaries, and document-based interoperability.
Available at launch.
@cosyte/ncpdp
NCPDP SCRIPT + Telecom
Handle NCPDP ePrescribing messages (NewRx, RxRenewal, RxChange) and Telecom Standard pharmacy claims (B1/B2/B3) — the formats behind Surescripts and PBM traffic.
Available at launch.
@cosyte/fhir
HL7 FHIR
Planned. Resource models, validation, and Bulk Data streaming for FHIR R4 + R5 — the modern REST-based interoperability standard.
Available at launch.
How it reads
The same shape across every parser: read tolerantly, keep every field, warn on the quirks, then emit strictly to spec. A synthetic HL7 v2 walk-through — invented identifiers, never real PHI.
import { parse, serialize } from '@cosyte/hl7';
// A synthetic ORU^R01 lab result — invented identifiers, never real PHI.
const raw = [
'MSH|^~\\&|LAB|HOSP|EHR|HOSP|20260701081500||ORU^R01|MSG42|P|2.5.1',
'PID|1||900000042^^^HOSP^MR||ROE^SAM^^^^||19770312|M',
'OBR|1|A100|B200|CBC^Complete Blood Count^L',
'OBX|1|NM|WBC^White Blood Cell^L||6.2|10*3/uL|4.0-11.0|N',
].join('\r');
// Lenient reader: tolerates a real-world quirk, warns, never drops a field.
const msg = parse(raw);
const wbc = msg.segment('OBX').field(5); // '6.2'
for (const w of msg.warnings) console.warn(w.code, w.path);
// Spec-clean emitter: serialize round-trips to byte-faithful output.
const out = serialize(msg);
console.assert(out === raw, 'round-trip preserves the wire bytes'); Consulting
The team that writes the parsers ships the integrations. When an HL7 v2 feed, an X12 claims pipeline, or a C-CDA exchange has to be right the first time, the same engineering that builds the open-source suite is available for the engagement.