We build open-source TypeScript libraries for healthcare data: HL7 v2, FHIR, C-CDA, X12, NCPDP, ASTM, DICOM, MLLP, terminology and de-identification. We also build and run integrations on them.
npm install @cosyte/hl7import { parseHL7 } from "@cosyte/hl7";
const msg = parseHL7(raw); // raw: an HL7 v2 message as a string
console.log(msg.patient?.mrn, msg.patient?.fullName); // MRN12345 John Q DoeNo segment or field numbers to look up: the parser accepts vendor-quirky messages as they arrive and hands back fields by name. The quickstart runs the same lines on a synthetic message.
All 14 are MIT licensed and run on Node.js 22 or later.
| Package | What it does | Links |
|---|---|---|
@cosyte/hl7 |
Parse, build and serialize HL7 v2 messages, and read fields by name | npm · docs · repo |
@cosyte/mllp |
Send and receive HL7 v2 over MLLP: framing, ACK correlation, reconnects and TLS | npm · docs · repo |
@cosyte/fhir |
Read, write and validate FHIR R4 resources, in JSON and XML | npm · docs · repo |
@cosyte/ccda |
Parse, build and serialize C-CDA documents, with typed problems, medications and allergies | npm · docs · repo |
@cosyte/x12 |
Parse and build X12 005010 healthcare transactions (837, 835, 270/271, 834, 999 and more) with exact decimal amounts | npm · docs · repo |
@cosyte/ncpdp |
Parse and build NCPDP SCRIPT ePrescriptions and Telecom pharmacy claims | npm · docs · repo |
@cosyte/astm |
Parse and build ASTM E1394 lab-instrument records and E1381 checksummed frames | npm · docs · repo |
@cosyte/dicom |
Read and write DICOM Part 10 metadata, with metadata-level de-identification (PS3.15 Basic Profile) | npm · docs · repo |
@cosyte/terminology |
Run FHIR $lookup, $validate-code, $translate and $expand over code systems you supply |
npm · docs · repo |
@cosyte/deid |
Apply a HIPAA Safe Harbor policy to HL7 v2, C-CDA, FHIR, X12, NCPDP Telecom and DICOM, failing closed | npm · docs · repo |
@cosyte/transform |
Convert HL7 v2 messages to FHIR R4, following the HL7 v2-to-FHIR implementation guide | npm · docs · repo |
@cosyte/synth |
Generate seeded, reproducible synthetic test data in HL7 v2, FHIR, C-CDA, X12, NCPDP and ASTM | npm · docs · repo |
@cosyte/dates |
Validate and convert healthcare dates without losing precision or guessing a timezone | npm · docs · repo |
@cosyte/cli |
Parse, validate, convert and redact from the terminal with the cosyte command, or from an agent over MCP |
npm · docs · repo |
cosyte/examples holds runnable end-to-end starters. Every message, document and image in it is synthetic.
- Lenient on parse, spec-clean on emit. Real vendor traffic parses, and each deviation we tolerate comes back as a stable warning code.
- No confident wrong values. When input contradicts itself, we withhold the value and flag it rather than guess. A wrong dose or a missed allergy is the failure we design against.
- Synthetic data only. No repository holds real patient data, and the parsers' CI runs a PHI scan on every change.
- Few dependencies. Most packages have no third-party runtime dependency, and none has more than one.
Need it integrated? Talk to us.