Packages
Every package in the Glion framework, grouped by purpose.
The Glion framework is composed of focused, single-purpose packages — install only the ones you need.
Core
Glion CLI
Dev server, build, and config loader for HL7v2 applications.
HL7v2 toolkit
Parse, lint, annotate, and serialize messages.
HL7v2 parser
Produces the Glion AST from raw messages.
AST types
Types and helpers for the HL7v2 AST.
AST builder
Typed helpers for assembling HL7v2 ASTs by hand.
Config loader
Schema and loader for HL7v2 configuration files.
create-glion
Scaffold a new Glion app from an example.
MLLP
MLLP server
Transport-agnostic engine with a middleware-driven server.
MLLP client
Send messages and receive acknowledgments.
MLLP codec
Encode and decode the MLLP frame around a message.
ACK builder
Acknowledgment message builder and typed exception classes.
Output
HL7v2 serializer
Compile ASTs back to HL7v2 text.
JSON serializer
Serialize an AST into a compact JSON document.
Transformation
Escape decoder
Decode escape sequences in literal values.
Escape encoder
Encode special characters as escape sequences.
Segment grouper
Nest segments in the groups their event schema defines.
Profiles & Annotations
HL7v2 profiles
Version-specific profile data: segments, fields, datatypes, and tables.
Delimiters annotator
Annotate file data with delimiters derived from the MSH header.
Profile context annotator
Centralize profile loading onto the file context.
Datatype annotator
Annotate field, component, and subcomponent nodes with datatype metadata.
Field annotator
Annotate field nodes with profile metadata.
Code-system annotator
Annotate coded values with UTG code-system metadata.
Segment annotator
Annotate segment nodes with profile metadata.
Table annotator
Annotate coded values with their table entry.
Recommended preset
Every profile-based annotation in a single use call.
Linters
Max message size
Flag messages exceeding a byte size or segment count.
Message version
Check MSH-12 against a semver range.
No trailing empty field
Flag segments with empty trailing fields.
Segment order
Validate segment order against the profile.
Extra components
Warn on composite fields with more components than the profile defines.
Extra fields
Warn on fields beyond the profile's maximum sequence.
Field max length
Validate field lengths against the profile's max length.
Field repetition
Flag fields with more repetitions than the profile allows.
Required components
Validate required components in composite datatype fields.
Required fields
Validate required fields per HL7v2 profile.
Table values
Validate coded field values against HL7v2 tables.
Timestamps
Flag DT, TM, and DTM values that are not valid dates or times.
Withdrawn
Flag values in elements the standard has withdrawn.
Backward compatible
Warn on values in elements kept only for backward compatibility.
Required message header
Require MSH to be the first segment.
Segment header length
Flag segment header names not exactly three characters.
Recommended preset
Core, version-independent lint rules.
Recommended profile preset
Every profile-based lint rule.
Utilities
Charset
Encode and decode wire bytes as UTF-8.
Query
Read ASTs with paths like PID.5[1].2.1.
SemVer
Parser, comparators, and range matcher for HL7v2 version strings.
Timestamp
Parse and format DT, TM, and DTM values.
UID
Time-ordered unique IDs that fit MSH-10.
Visitor
Traverse AST trees with ancestor context.
Helpers
Diagnostics reporting, length measurement, and conformance checks.