Skip to main content
Version: v0.2.0

Built-in profiles

Eight profiles ship on the profiles object. Each is defined with the public defineHl7Profile() API, so you can use one directly (parseHL7(raw, hl7Profiles.epic)) or extend it (defineHl7Profile({ name: "mine", extends: hl7Profiles.epic })). Use and write vendor profiles shows both.

ProfileSenderDate formats it addsZ-segments it declares
hl7Profiles.epicEpic Bridges InterconnectMM/DD/YYYY HH:mm:ss, MM/DD/YYYYZDP, ZRS
hl7Profiles.cernerCerner MillenniumYYYY-MM-DD[T]HH:mm:ss, YYYY-MM-DDZDS, ZCO
hl7Profiles.meditechMEDITECH MAGIC, 6.x and ExpanseYYYYMMDDHHmmZF1, ZF2
hl7Profiles.athenaathenahealthMM/DD/YYYYZCA
hl7Profiles.genericLaba reference laboratoryYYYYMMDD HHmm, YYYY-MM-DDZLB, ZNT
hl7Profiles.visageVisage 7 imaging (PACS)noneZDS
hl7Profiles.philipsPhilips Vue PACS (IS Link)noneZDS, ZLK, ZAO, ZEB, ZAP, ZAV
hl7Profiles.vaVA VistA Radiology and Nuclear MedicinenoneZDS
import { hl7Profiles } from "@cosyte/hl7";

Object.keys(hl7Profiles).sort(); // => ["athena", "cerner", "epic", "genericLab", "meditech", "philips", "va", "visage"]
hl7Profiles.meditech.dateFormats; // => ["YYYYMMDDHHmm"]
Object.keys(hl7Profiles.philips.customSegments ?? {}); // => ["ZDS", "ZLK", "ZAO", "ZEB", "ZAP", "ZAV"]

Where each profile comes from​

Four profiles are grounded in a public interface specification, cited in the profile's source:

The other four (epic, cerner, athena, genericLab) carry formats and Z-segments common in those senders' feeds and cite no published specification. Check one against your own sender's interface specification before you rely on it, and extend it where your feed differs.

The Z-segments and their field names​

Each name reads with seg.get(name) once the profile is applied.

ProfileSegmentField names (position)
epicZDPdepartmentCode (3), departmentName (4)
epicZRSresultStatus (1), statusDateTime (2)
cernerZDSsummaryText (3)
cernerZCOcommentText (3), continuationFlag (5)
meditechZF1providerEncounter (1), misServiceGroup (2), serviceGroupCopay (3), visitCopay (4), copayMinimum (5), copayMaximum (6)
meditechZF2setId (1), providerEncounter (2), encounterDate (3), encounterProcedure (4), encounterProcedureQuantity (5), encounterProcedureCharge (6), prvProcedureAmountPaid (7), prvProcedureAmountDue (8)
athenaZCAcareTeamRole (3), providerId (5), providerName (6)
genericLabZLBspecimenOverride (3), methodOverride (5)
genericLabZNTnoteText (3)
visageZDSstudyInstanceUid (1)
vaZDSstudyInstanceUid (1)
philipsZDSstudyInstanceUid (1)
philipsZLKexternalWorkitemId (1), orderLinkId (2)
philipsZEBencryptedPatientInfo (1)
philipsZAVvisitAdditionalDetails (1)
philipsZAO31 fields, from orderAdditionalDetails (1) to acquisitionStatus (32): modality, body part, transfer and acquisition status, technician and radiologist
philipsZAP13 fields, from patientAdditionalDetails (1) to patientCustomDate3 (14)

ZDS in the three imaging profiles carries the DICOM Study Instance UID, which ties an HL7 order to its imaging study. In cerner, ZDS is a different segment that happens to share the name: a discharge summary. hl7Profiles.philips.customSegments lists every ZAO and ZAP field.

Reference​