Open source

The open-source suite.

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 never silently drops or garbles a field, a spec-clean emitter, 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. It is early: every package is on the pre-alpha 0.0.x line. Seven parsers are published on npm and carry a real install line below, as does the terminology library in the tooling tier; everything else here is source-available on GitHub, and a card shows an install line only once its package is really on npm.

The bar

One engineering standard across every package.

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.

Near-zero runtime dependencies

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.

MIT licensed

Every package is MIT: permissive, auditable, and free to run in production. The credibility is the code, not a pitch.

  • 8standards in the suite
  • MITacross every package
  • ~0runtime dependencies

The parsers

Parsers for the standards healthcare actually runs on.

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

Live

Parse, validate, and build HL7 v2 messages: the standard that still carries the overwhelming majority of real hospital messaging traffic.

License
MIT
Deps
Zero runtime dependencies.
@cosyte/hl7
npm install @cosyte/hl7

@cosyte/mllp

MLLP

Live

Minimal Lower Layer Protocol: the framing, ACK correlation, and reconnect behavior HL7 v2 needs over TCP.

License
MIT
Deps
Zero runtime dependencies.
@cosyte/mllp
npm install @cosyte/mllp

@cosyte/dicom

DICOM Part 10

Live

Read, navigate, and de-identify DICOM Part 10 files: the standard behind medical imaging across PACS and modality vendors.

License
MIT
Deps
Zero runtime dependencies.
@cosyte/dicom
npm install @cosyte/dicom

@cosyte/x12

ASC X12 / HIPAA 005010

Live

Parse and emit the HIPAA 005010 healthcare transaction sets: claims (837), eligibility (270/271), remittance (835), enrollment (834), and the rest.

License
MIT
Deps
Zero runtime dependencies.
@cosyte/x12
npm install @cosyte/x12

@cosyte/ccda

HL7 C-CDA R2.1

Live

Parse and produce Consolidated CDA clinical documents: the format behind transitions of care, summaries, and document-based interoperability.

License
MIT
Deps
One runtime dependency: @xmldom/xmldom.
@cosyte/ccda
npm install @cosyte/ccda

@cosyte/ncpdp

NCPDP SCRIPT + Telecom

Live

Handle NCPDP ePrescribing messages (NewRx, RxRenewal, RxChange) and Telecom Standard pharmacy claims (B1/B2/B3): the formats behind Surescripts and PBM traffic.

License
MIT
Deps
Telecom has zero runtime dependencies; SCRIPT uses one XML parser.
@cosyte/ncpdp
npm install @cosyte/ncpdp

@cosyte/astm

ASTM E1394 / E1381

Live

Read and emit the ASTM record and framing layers behind lab-instrument interfaces: analyzer results and orders, and the checksummed frames they arrive in.

License
MIT
Deps
Zero runtime dependencies.
@cosyte/astm
npm install @cosyte/astm

@cosyte/fhir

HL7 FHIR

Source

Resource models, validation, and Bulk Data streaming for FHIR R4 + R5: the modern REST-based interoperability standard.

License
MIT
Deps
Zero runtime dependencies.

The tooling

The libraries that build on the parsers.

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 early in development; @cosyte/terminology is the first of them published to npm, and the rest show an install line only once they really are.

@cosyte/transform

Transform

Source

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.

License
MIT
Deps
Builds on the @cosyte parser models.

@cosyte/terminology

Terminology

Live

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.

License
MIT
Deps
Zero runtime dependencies.
@cosyte/terminology
npm install @cosyte/terminology

@cosyte/cli

CLI + MCP

Source

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.

License
MIT
Deps
Builds on the @cosyte parser models.

@cosyte/deid

De-identification

Source

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.

License
MIT
Deps
Builds on the @cosyte parser models.

@cosyte/synth

Synthetic data

Source

Generate deterministic synthetic fixtures: spec-clean HL7, X12, C-CDA, and FHIR test data with no real PHI, for conformance suites and demos.

License
MIT
Deps
Builds on the @cosyte parser models.

How it reads

Lenient on the way in, spec-clean on the way out.

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.

parse-and-round-trip.tsts
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

Need one of these in production?

The engineer who 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.

How we work →