Modules
Pure Elixir HL7 v2.x toolkit.
Path-based access to HL7v2 message fields.
Builds HL7v2 ACK/NAK response messages.
Conformance fixture corpus statistics.
Serializes HL7v2 messages to wire format.
Encodes and decodes HL7v2 escape sequences.
MLLP (Minimal Lower Layer Protocol) framing for HL7v2 messages.
MLLP TCP client for sending HL7v2 messages.
Ranch protocol handler for MLLP connections.
Behaviour for MLLP message handlers.
MLLP TCP listener using Ranch 2.x.
TLS configuration helpers for MLLP connections.
Programmatic HL7v2 message construction.
Canonical message structure mappings and validation dispatch.
Parses HL7v2 messages into raw representation with canonical round-trip fidelity.
Represents a validated HL7v2 path.
Conformance profile for constraining HL7v2 message structures beyond the base HL7 spec.
Positional component access for HL7 composite data type structs.
Example conformance profiles demonstrating common integrator patterns.
Pre-built IHE conformance profiles for HL7 v2.x transactions.
Shared constraint helpers for the IHE profile pack.
IHE Laboratory Testing Workflow (LTW) conformance profiles.
IHE Patient Administration Management (PAM) conformance profiles.
IHE Patient Demographics Query (PDQ) conformance profiles.
IHE Patient Identifier Cross-Reference (PIX) conformance profiles.
IHE Radiology Scheduled Workflow (RAD-SWF) conformance profiles.
Represents a parsed HL7v2 message in raw form.
Base behaviour and helpers for typed HL7v2 segments.
Abstract (ABS) segment -- HL7v2 v2.5.1.
Accident (ACC) segment — HL7v2 v2.5.1.
Addendum (ADD) segment — HL7v2 v2.5.1.
Professional Affiliation (AFF) segment -- HL7v2 v2.5.1.
Appointment Information — General Resource (AIG) segment — HL7v2 v2.5.1.
Appointment Information — Location Resource (AIL) segment — HL7v2 v2.5.1.
Appointment Information — Personnel Resource (AIP) segment — HL7v2 v2.5.1.
Appointment Information — Service (AIS) segment — HL7v2 v2.5.1.
Patient Allergy Information (AL1) segment — HL7v2 v2.5.1.
Appointment Preferences (APR) segment -- HL7v2 v2.5.1.
Appointment Request (ARQ) segment -- HL7v2 v2.5.1.
Access Restriction (ARV) segment — HL7v2 v2.6+.
Authorization Information (AUT) segment — HL7v2 v2.5.1.
Batch Header (BHS) segment — HL7v2 v2.5.1.
Blood Code (BLC) segment — HL7v2 v2.5.1.
Billing (BLG) segment — HL7v2 v2.5.1.
Blood Product Order (BPO) segment -- HL7v2 v2.5.1.
Blood Product Dispense Status (BPX) segment -- HL7v2 v2.5.1.
Batch Trailer (BTS) segment -- HL7v2 v2.5.1.
Blood Product Transfusion/Disposition (BTX) segment -- HL7v2 v2.5.1.
Charge Description Master (CDM) segment — HL7v2 v2.5.1.
Certificate Detail (CER) segment -- HL7v2 v2.5.1.
Clinical Study Master (CM0) segment — HL7v2 v2.5.1.
Clinical Study Phase Master (CM1) segment — HL7v2 v2.5.1.
Clinical Study Schedule Master (CM2) segment — HL7v2 v2.5.1.
Clear Notification (CNS) segment — HL7v2 v2.5.1.
Consent (CON) segment -- HL7v2 v2.5.1.
Clinical Study Phase (CSP) segment — HL7v2 v2.5.1.
Clinical Study Registration (CSR) segment -- HL7v2 v2.5.1.
Clinical Study Data Schedule (CSS) segment — HL7v2 v2.5.1.
Contact Data (CTD) segment — HL7v2 v2.5.1.
Clinical Trial Identification (CTI) segment — HL7v2 v2.5.1.
Disability (DB1) segment — HL7v2 v2.5.1.
Diagnosis (DG1) segment — HL7v2 v2.5.1.
Diagnosis Related Group (DRG) segment — HL7v2 v2.5.1.
Continuation Pointer (DSC) segment — HL7v2 v2.5.1.
Display Data (DSP) segment — HL7v2 v2.5.1.
Equipment Command (ECD) segment — HL7v2 v2.5.1.
Equipment Command Response (ECR) segment — HL7v2 v2.5.1.
Educational Detail (EDU) segment — HL7v2 v2.5.1.
Embedded Query Language (EQL) segment -- HL7v2 v2.5.1.
Equipment Log Service (EQP) segment — HL7v2 v2.5.1.
Equipment Detail (EQU) segment — HL7v2 v2.5.1.
Event Replay Query (ERQ) segment -- HL7v2 v2.5.1.
Error (ERR) segment — HL7v2 v2.5.1.
Event Type (EVN) segment — HL7v2 v2.5.1.
Facility (FAC) segment — HL7v2 v2.5.1.
File Header (FHS) segment — HL7v2 v2.5.1.
Financial Transaction (FT1) segment — HL7v2 v2.5.1.
File Trailer (FTS) segment — HL7v2 v2.5.1.
Goal Detail (GOL) segment -- HL7v2 v2.5.1.
Grouping/Reimbursement — Visit (GP1) segment — HL7v2 v2.5.1.
Grouping/Reimbursement -- Procedure Line Item (GP2) segment -- HL7v2 v2.5.1.
Guarantor (GT1) segment — HL7v2 v2.5.1.
Patient Adverse Reaction Information (IAM) segment -- HL7v2 v2.5.1.
Allergy Reaction (IAR) segment — HL7v2 v2.7+.
Inventory Item Master (IIM) segment -- HL7v2 v2.5.1.
Material Lot (ILT) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Insurance (IN1) segment — HL7v2 v2.5.1.
Insurance Additional Information (IN2) segment — HL7v2 v2.5.1.
Insurance Additional Information, Certification (IN3) segment — HL7v2 v2.5.1.
Inventory Detail (INV) segment -- HL7v2 v2.5.1.
Imaging Procedure Control (IPC) segment -- HL7v2 v2.5.1.
Interaction Status Detail (ISD) segment -- HL7v2 v2.5.1.
Material Item Master (ITM) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Material Location (IVT) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Language Detail (LAN) segment -- HL7v2 v2.5.1.
Location Charge Code (LCC) segment -- HL7v2 v2.5.1.
Location Characteristic (LCH) segment -- HL7v2 v2.5.1.
Location Department (LDP) segment -- HL7v2 v2.5.1.
Location Identification (LOC) segment -- HL7v2 v2.5.1.
Location Relationship (LRL) segment -- HL7v2 v2.5.1.
Master File Acknowledgment (MFA) segment -- HL7v2 v2.5.1.
Master File Entry (MFE) segment -- HL7v2 v2.5.1.
Master File Identification (MFI) segment -- HL7v2 v2.5.1.
Merge Patient Information (MRG) segment — HL7v2 v2.5.1.
Message Acknowledgment (MSA) segment — HL7v2 v2.5.1.
Message Header (MSH) segment — HL7v2 v2.5.1, with v2.7+ extensions.
System Clock (NCK) segment -- HL7v2 v2.5.1.
Notification Detail (NDS) segment -- HL7v2 v2.5.1.
Next of Kin / Associated Parties (NK1) segment — HL7v2 v2.5.1.
Bed Status Update (NPU) segment — HL7v2 v2.5.1.
Application Status Change (NSC) segment -- HL7v2 v2.5.1.
Application Control Level Statistics (NST) segment -- HL7v2 v2.5.1.
Notes and Comments (NTE) segment — HL7v2 v2.5.1.
Observation Request (OBR) segment — HL7v2 v2.5.1, with v2.7+ extensions.
Observation/Result (OBX) segment -- HL7v2 v2.5.1, with v2.7+ extensions.
Dispatches OBX-5 (observation_value) parsing based on OBX-2 (value_type).
Dietary Orders, Supplements, and Preferences (ODS) segment -- HL7v2 v2.5.1.
Diet Tray Instructions (ODT) segment -- HL7v2 v2.5.1.
General Segment (OM1) -- HL7v2 v2.5.1.
Numeric Observation (OM2) segment -- HL7v2 v2.5.1.
Categorical Service/Test/Observation (OM3) segment -- HL7v2 v2.5.1.
Observations that Require Specimens (OM4) segment -- HL7v2 v2.5.1.
Observation Batteries (OM5) segment -- HL7v2 v2.5.1.
Observations Calculated from Others (OM6) segment -- HL7v2 v2.5.1.
Additional Basic Attributes (OM7) segment -- HL7v2 v2.5.1.
Common Order (ORC) segment — HL7v2 v2.5.1.
Practitioner Organization Unit (ORG) segment -- HL7v2 v2.5.1.
Override Segment (OVR) -- HL7v2 v2.5.1.
Possible Causal Relationship (PCR) segment -- HL7v2 v2.5.1.
Patient Additional Demographic (PD1) segment — HL7v2 v2.5.1.
Patient Death and Autopsy (PDA) segment — HL7v2 v2.5.1.
Product Detail Country (PDC) segment -- HL7v2 v2.5.1.
Product Experience Observation (PEO) segment -- HL7v2 v2.5.1.
Product Experience Sender (PES) segment -- HL7v2 v2.5.1.
Patient Identification (PID) segment — HL7v2 v2.5.1, with v2.7+ extensions.
Item Packaging (PKG) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Procedures (PR1) segment — HL7v2 v2.5.1.
Practitioner Detail (PRA) segment -- HL7v2 v2.5.1.
Problem Details (PRB) segment -- HL7v2 v2.5.1.
Pricing (PRC) segment -- HL7v2 v2.5.1.
Provider Data (PRD) segment -- HL7v2 v2.5.1.
Participation Information (PRT) segment — HL7v2 v2.7+.
Product Summary Header (PSH) segment -- HL7v2 v2.5.1.
Pathway (PTH) segment -- HL7v2 v2.5.1.
Patient Visit (PV1) segment — HL7v2 v2.5.1.
Patient Visit — Additional Information (PV2) segment — HL7v2 v2.5.1.
Query Acknowledgment (QAK) segment -- HL7v2 v2.5.1.
Query Identification (QID) segment — HL7v2 v2.5.1.
Query Parameter Definition (QPD) segment -- HL7v2 v2.5.1.
Original-Style Query Definition (QRD) segment -- HL7v2 v2.5.1.
Original Style Query Filter (QRF) segment -- HL7v2 v2.5.1.
Query Response Instance (QRI) segment -- HL7v2 v2.5.1.
Response Control Parameter (RCP) segment -- HL7v2 v2.5.1.
Table Row Definition (RDF) segment -- HL7v2 v2.5.1.
Table Row Data (RDT) segment -- HL7v2 v2.5.1.
Referral Information (RF1) segment -- HL7v2 v2.5.1.
Resource Group Segment (RGS) — HL7v2 v2.5.1.
Risk Management Incident (RMI) segment -- HL7v2 v2.5.1.
Role (ROL) segment — HL7v2 v2.5.1.
Requisition Detail-1 (RQ1) segment -- HL7v2 v2.5.1.
Requisition Detail (RQD) segment -- HL7v2 v2.5.1.
Pharmacy/Treatment Administration (RXA) segment — HL7v2 v2.5.1.
Pharmacy/Treatment Component Order (RXC) segment — HL7v2 v2.5.1.
Pharmacy/Treatment Dispense (RXD) segment — HL7v2 v2.5.1.
Pharmacy/Treatment Encoded Order (RXE) segment — HL7v2 v2.5.1.
Pharmacy/Treatment Give (RXG) segment — HL7v2 v2.5.1.
Pharmacy/Treatment Order (RXO) segment — HL7v2 v2.5.1.
Pharmacy/Treatment Route (RXR) segment — HL7v2 v2.5.1.
Specimen Container Detail (SAC) segment -- HL7v2 v2.5.1.
Anti-Microbial Cycle Data (SCD) segment -- HL7v2 v2.6 extension.
Scheduling Activity Information (SCH) segment — HL7v2 v2.5.1.
Sterilizer Configuration (SCP) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Sterilization Device Data (SDD) segment -- HL7v2 v2.6 extension.
Software Segment (SFT) — HL7v2 v2.5.1.
Substance Identifier (SID) segment -- HL7v2 v2.5.1.
Sterilization Lot (SLT) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Specimen (SPM) segment — HL7v2 v2.5.1.
Stored Procedure Request Definition (SPR) segment -- HL7v2 v2.5.1.
Staff Identification (STF) segment -- HL7v2 v2.5.1.
Sterilization Parameter (STZ) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Test Code Configuration (TCC) segment -- HL7v2 v2.5.1.
Test Code Detail (TCD) segment -- HL7v2 v2.5.1.
Timing/Quantity (TQ1) segment — HL7v2 v2.5.1.
Timing/Quantity Relationship (TQ2) segment — HL7v2 v2.5.1.
Transcription Document Header (TXA) segment -- HL7v2 v2.5.1.
User Authentication Credential (UAC) segment — HL7v2 v2.7+.
UB82 (UB1) segment — HL7v2 v2.5.1.
UB92 Data (UB2) segment — HL7v2 v2.5.1.
Results/Update Definition (URD) segment -- HL7v2 v2.5.1.
Unsolicited Selection (URS) segment -- HL7v2 v2.5.1.
Variance (VAR) segment — HL7v2 v2.5.1.
Purchasing Vendor (VND) segment — HL7v2 v2.6+ (Chapter 17 Materials Management).
Virtual Table Query Request (VTQ) segment -- HL7v2 v2.5.1.
Generic Z-Segment (ZXX) — HL7v2 v2.5.1.
Detects and manages HL7v2 message delimiters from MSH-1/MSH-2.
Compile-time validated HL7v2 path sigil.
HL7 v2.5.1 standard metadata — single source of truth.
Computes library coverage against the HL7 v2.5.1 standard.
HL7 v2.5.1 abstract message structure definitions.
HL7 v2.5.1 coded-value tables.
HL7 v2.x version utilities.
Tracks field optionality changes between HL7 v2.x versions.
Telemetry event helpers for HL7v2 operations.
Base behaviour for HL7v2 data types.
Address (AD) -- HL7v2 composite data type.
Authorization Information (AUI) -- HL7v2 composite data type.
Charge Code and Date (CCD) -- HL7v2 composite data type.
Channel Calibration Parameters (CCP) -- HL7v2 composite data type.
Channel Definition (CD) -- HL7v2 composite data type.
Coded Element (CE) -- HL7v2 composite data type.
Coded Element with Formatted Values (CF) -- HL7v2 composite data type.
Coded with No Exceptions (CNE) -- HL7v2 composite data type.
Composite Number and Name without Authority (CNN) -- HL7v2 composite data type.
Composite Price (CP) -- HL7v2 composite data type.
Composite Quantity with Units (CQ) -- HL7v2 composite data type.
Channel Sensitivity and Units (CSU) -- HL7v2 composite data type.
Coded with Exceptions (CWE) -- HL7v2 composite data type.
Extended Composite ID with Check Digit (CX) -- HL7v2 composite data type.
Daily Deductible Information (DDI) -- HL7v2 composite data type.
Date and Institution Name (DIN) -- HL7v2 composite data type.
Discharge to Location and Date (DLD) -- HL7v2 composite data type.
Driver's License Number (DLN) -- HL7v2 composite data type.
Delta (DLT) -- HL7v2 composite data type.
Date/Time Range (DR) -- HL7v2 composite data type.
Date (DT) -- HL7v2 primitive data type.
Date/Time (DTM) -- HL7v2 primitive data type.
Day Type and Number (DTN) -- HL7v2 composite data type.
Encapsulated Data (ED) -- HL7v2 composite data type.
Entity Identifier (EI) -- HL7v2 composite data type.
Entity Identifier Pair (EIP) -- HL7v2 composite data type.
Error Location and Description (ELD) -- HL7v2 composite data type.
Error Location (ERL) -- HL7v2 composite data type.
Financial Class (FC) -- HL7v2 composite data type.
Family Name (FN) -- HL7v2 sub-component composite type.
Formatted Text Data (FT) -- HL7v2 primitive data type.
General Timing Specification (GTS) -- HL7v2 primitive data type.
Hierarchic Designator (HD) -- HL7v2 composite data type.
Insurance Certification Definition (ICD) -- HL7v2 composite data type.
Coded Value for HL7-Defined Tables (ID) -- HL7v2 primitive data type.
Coded Value for User-Defined Tables (IS) -- HL7v2 primitive data type.
Job Code/Class (JCC) -- HL7v2 composite data type.
Location with Address Variation 1 (LA1) -- HL7v2 composite data type.
Location with Address Variation 2 (LA2) -- HL7v2 composite data type.
Multiplexed Array (MA) -- HL7v2 composite data type.
Money (MO) -- HL7v2 composite data type.
Money and Charge Code (MOC) -- HL7v2 composite data type.
Money or Percentage (MOP) -- HL7v2 composite data type.
Message Type (MSG) -- HL7v2 composite data type.
Numeric Array (NA) -- HL7v2 composite data type.
Name with Date and Location (NDL) -- HL7v2 composite data type.
Numeric (NM) -- HL7v2 primitive data type.
Numeric Range (NR) -- HL7v2 composite data type.
Occurrence Code and Date (OCD) -- HL7v2 composite data type.
Order Sequence Definition (OSD) -- HL7v2 composite data type.
Occurrence Span Code and Date (OSP) -- HL7v2 composite data type.
Practitioner Institutional Privileges (PIP) -- HL7v2 composite data type.
Person Location (PL) -- HL7v2 composite data type.
Practitioner License or Other ID Number (PLN) -- HL7v2 composite data type.
Performing Person Time Stamp (PPN) -- HL7v2 composite data type.
Parent Result Link (PRL) -- HL7v2 composite data type.
Processing Type (PT) -- HL7v2 composite data type.
Policy Type and Amount (PTA) -- HL7v2 composite data type.
Query Input Parameter List (QIP) -- HL7v2 composite data type.
Query Selection Criteria (QSC) -- HL7v2 composite data type.
Row Column Definition (RCD) -- HL7v2 composite data type.
Reference Range (RFR) -- HL7v2 composite data type.
Repeat Interval (RI) -- HL7v2 composite data type.
Room Coverage (RMC) -- HL7v2 composite data type.
Reference Pointer (RP) -- HL7v2 composite data type.
Repeat Pattern (RPT) -- HL7v2 composite data type.
Street Address (SAD) -- HL7v2 sub-component composite type.
Scheduling Class Value Pair (SCV) -- HL7v2 composite data type.
Sequence ID (SI) -- HL7v2 primitive data type.
Structured Numeric (SN) -- HL7v2 composite data type.
Specialty Description (SPD) -- HL7v2 composite data type.
Specimen Source (SPS) -- HL7v2 composite data type.
Sort Order (SRT) -- HL7v2 composite data type.
String Data (ST) -- HL7v2 primitive data type.
Time (TM) -- HL7v2 primitive data type.
Telephone Number (TN) -- HL7v2 primitive data type.
Timing/Quantity (TQ) -- HL7v2 composite data type.
Time Stamp (TS) -- HL7v2 composite data type.
Text Data (TX) -- HL7v2 primitive data type.
UB Value Code and Amount (UVC) -- HL7v2 composite data type.
Visiting Hours (VH) -- HL7v2 composite data type.
Version Identifier (VID) -- HL7v2 composite data type.
Value Range (VR) -- HL7v2 composite data type.
Channel Identifier (WVI) -- HL7v2 composite data type.
Waveform Source (WVS) -- HL7v2 composite data type.
Extended Address (XAD) -- HL7v2 composite data type.
Extended Composite ID Number and Name for Persons (XCN) -- HL7v2 composite data type.
Extended Composite Name and ID for Organizations (XON) -- HL7v2 composite data type.
Extended Person Name (XPN) -- HL7v2 composite data type.
Extended Telecommunication Number (XTN) -- HL7v2 composite data type.
Typed HL7v2 message with parsed segment structs.
Converts a raw-parsed HL7v2 message into typed segment structs.
Validates HL7v2 typed messages.
Field-level validation rules for HL7v2 typed segments.
Message-level validation rules for HL7v2 typed messages.
Evaluates a HL7v2.Profile against a typed message and returns validation
errors. Called from HL7v2.Validation.validate/2 when a :profile option
is provided.
Positional structural validation against HL7 v2.5.1 abstract message definitions.
Mix Tasks
Prints HL7 v2.5.1 coverage report for the hl7v2 library.
Generates reference documentation from code metadata.