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 transport
Wire protocol primitives: framing, encoding, decoding.
ACK middleware
Generate acknowledgments automatically from handler outcomes.
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.
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.
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 non-repeatable fields with multiple repetitions.
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.
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
Query
Read ASTs with canonical paths like PID-5[1].2.1.
SemVer
Parser, comparators, and range matcher for HL7v2 version strings.
Timestamp
Timestamp parser, formatter, and converter.
Visitor
Traverse AST trees with ancestor context and depth.
Helpers
Diagnostics reporting, length measurement, and conformance checks.