Lenient reader, warnings on the record
Postel's Law, applied to healthcare data: the parser tolerates the real-world quirks feeds actually ship and records each one as a stable, value-free warning, rather than throwing on the first deviation.
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, ASTM lab instruments, and FHIR. Each one is engineered to the same bar: a lenient reader that records what it tolerated as a stable warning, and a dependency footprint small enough to audit in an afternoon.
The suite is open source and public on GitHub: read the code, file an issue, or watch a repo. Every package is on the 0.1.x line; below 1.0, a breaking change moves the minor version and the changelog says so. Eight parsers are published on npm and carry a real install line below, as do all five tooling libraries; a card shows an install line only once its package is really on npm.
The bar
Postel's Law, applied to healthcare data: the parser tolerates the real-world quirks feeds actually ship and records each one as a stable, value-free warning, rather than throwing on the first deviation.
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 parsers
Eight packages, one bar. Each is scoped to a single standard and honest about what a given release covers: the concrete surface lives in each package’s repo.
@cosyte/hl7
HL7 v2
Parse, validate, and build HL7 v2 messages: the standard that still carries the overwhelming majority of real hospital messaging traffic.
@cosyte/mllp
MLLP
Minimal Lower Layer Protocol: the framing, ACK correlation, and reconnect behavior HL7 v2 needs over TCP.
@cosyte/dicom
DICOM Part 10
Read, navigate, and de-identify DICOM Part 10 files: the standard behind medical imaging across PACS and modality vendors.
@cosyte/x12
ASC X12 / HIPAA 005010
Parse the HIPAA 005010 healthcare transaction sets into typed models: claims (837), eligibility (270/271), remittance (835), enrollment (834), and the rest.
@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.
@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.
@cosyte/astm
ASTM E1394 / E1381
Read and emit the ASTM record and framing layers behind lab-instrument interfaces: analyzer results and orders, and the checksummed frames they arrive in.
The tooling
A higher layer of consumer libraries sits on top of the parser models: the parse → validate → transform → map → de-identify → synthesize lifecycle. All five are source-public on GitHub and on npm at 0.1, which means the public surface of each is now the surface we keep stable. @cosyte/terminology, @cosyte/transform, @cosyte/deid, @cosyte/synth and @cosyte/cli each carry an install line below.
@cosyte/transform
Transform
Map between healthcare standards (an HL7 v2 message into a FHIR resource) on top of the Cosyte parser models, so a transform is typed code rather than a brittle mapping sheet.
@cosyte/terminology
Terminology
Validate and map clinical codes across code systems (LOINC, SNOMED CT, RxNorm, ICD-10), the terminology layer a transform leans on to bind a value set correctly.
@cosyte/cli
CLI + MCP
The developer and LLM front door to the suite: a command-line interface and an MCP server that put parse, validate, and transform one command (or one tool call) away.
@cosyte/deid
De-identification
De-identify healthcare data toward HIPAA Safe Harbor: strip and surrogate the identifiers in a parsed message or document before it leaves a trusted boundary.
How it reads
A synthetic HL7 v2 walk-through with @cosyte/hl7: read tolerantly, keep every field, warn on the quirks, then emit strictly to spec. Invented identifiers, never real PHI.
import { parseHL7 } from "@cosyte/hl7";
// A synthetic ADT^A01 as it came off the socket: MLLP framing
// bytes still around it, and two stray spaces after the name.
const raw =
"\x0bMSH|^~\\&|EPIC|MAIN|LIS|REF|20260419101500||ADT^A01^ADT_A01|MSG00001|P|2.5\r" +
"EVN|A01|20260419101500\r" +
"PID|1||MRN12345^^^HOSP^MR||Doe^John^Q \r" +
"PV1|1|I|ICU^101^A^HOSP\r\x1c\r";
// Lenient on the way in: each quirk is tolerated and reported
// with a stable code.
const msg = parseHL7(raw);
console.log(msg.warnings.map((w) => w.code));
console.log(msg.patient?.fullName);
// Spec-clean on the way out: no framing, no stray whitespace.
const wire = msg.toString();
for (const segment of wire.split("\r").filter(Boolean)) {
console.log(segment);
}[ 'MLLP_FRAMING_STRIPPED', 'FIELD_WHITESPACE_TRIMMED' ]
John Q Doe
MSH|^~\&|EPIC|MAIN|LIS|REF|20260419101500||ADT^A01^ADT_A01|MSG00001|P|2.5
EVN|A01|20260419101500
PID|1||MRN12345^^^HOSP^MR||Doe^John^Q
PV1|1|I|ICU^101^A^HOSPIntegration services
We build and run integrations on these libraries: an HL7 v2 feed, an X12 claims pipeline, a C-CDA exchange, a FHIR API, a pharmacy or lab interface. The libraries stay free and MIT-licensed; the integration work is what we sell.