AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
오픈소스 HL7v2 프레임워크, MLLP 라우팅·프로파일 검증·플러그인 파이프라인 제공, Node·Bun·Deno·엣지에서 실행
Open-source HL7v2 framework. Ship production-ready applications with MLLP routing, profile validation, and a composable plugin pipeline. Runs on Node, Bun, Deno, and the edge.
개발 도구TypeScript · JavaScriptGitHub @rethinkhealth온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
Application framework for HL7v2
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Glion is an open-source application framework for building HL7v2 integrations. It includes a structured parser, a plugin ecosystem for validation and transformation, and a production-ready MLLP server.README 전문 보기 ↗
Glion is an open-source application framework for building HL7v2 integrations. It includes a structured parser, a plugin ecosystem for validation and transformation, and a production-ready MLLP server.
glion dev runs your app with live reload during development. glion start runs it in production with graceful shutdown and structured logs. glion send fires an HL7v2 message over MLLP and prints the ACK.ADT^A01, ADT^*, wildcards), middleware composition, and first-class ACK/NAK responses. Streaming TCP with back-pressure. Runs on Node, Bun, and Deno.unified-based parser that produces typed ASTs with lossless round-tripping, plus 25+ plugins for annotation, linting, encoding, and transformation.MSH-12.Install Glion and its runtime packages:
npm install @glion/mllp @glion/hl7v2 @glion/cli
Define your app in a single file:
// glion.app.ts
import { parseHL7v2 } from "@glion/hl7v2";
import { Mllp } from "@glion/mllp";
export default new Mllp().parser(parseHL7v2).on("ADT^A01", (ctx) => {
// Handle admit. Reply by returning a Response ({ raw: string }).
// Built-in ACK/NAK generation is landing in @glion/mllp — see ADR 0019.
});
Run npm dev to start the app with live reload during development. Run npm start to run it in production with graceful shutdown and structured logs.
See examples/ for runnable apps. Scaffold any of them with pnpm create glion my-app --example <name>.
Glion is split into two cooperating layers. Use them together, or pick the parts you need.
The server and tooling that run Glion applications.
unified processor integration.frame() envelopes outbound bytes and unframe() is a stream transform that reassembles inbound frames across reads.glion command for running Glion applications: glion dev for live reload during development, glion start for production with graceful shutdown and structured logs, and glion send for sending an HL7v2 message over MLLP and printing the ACK.@glion/mllp (ADR 0019).The parser, plugins, and utilities that process HL7v2 messages as structured data.
unified-compatible parser that converts HL7v2 text into a structured AST with delimiter detection and position tracking.unist specification.Composable plugins that annotate, enrich, and transform the AST.
file.data with the HL7v2 delimiters derived from MSH-1 and MSH-2.file.data for downstream plugins.\F\, \S\, \T\, \Xdd\, \.br\) in a tree parsed with decodeEscapes: false.Linting rules and presets for HL7v2 message quality and conformance.
MSH.MSH.9.3 or ORDER.ORC.1 for select, selectAll, value, format, and matches.examples/, each scaffolded with pnpm create glion my-app --example <name>.Glion is pre-1.0. APIs in published packages are stabilizing but may still change in minor releases. We recommend pinning exact versions in production applications.
Packages were previously published under @rethinkhealth/hl7v2-* and were renamed to @glion/*. The unscoped glion command is published as @glion/cli pending npm name approval.
Every pull request and every commit on main publishes preview packages to pkg.pr.new. Install an unreleased fix or feature by its commit SHA, without waiting for a Changesets release:
pnpm add https://pkg.pr.new/@glion/parser@<commit-sha>
Replace @glion/parser with any published @glion/* package. Preview URLs are surfaced as a bot comment on each open PR. See ADR 0016 for rationale and scope.
Every @glion/* package and create-glion is published to npm from GitHub Actions with npm provenance, which links each version to the commit and workflow that built it. Each GitHub release that carries a glion-<version>.sigstore.json asset also carries the same tarballs that went to npm, and that file is a Sigstore bundle attesting that the release workflow built them.
Check the registry signatures and provenance of every package installed in a project that uses npm. Run it in CI after npm ci to check every install:
npm audit signatures
Check a single tarball, downloaded from the release page or fetched with npm pack @glion/parser@<version>:
gh attestation verify glion-parser-<version>.tgz \
--repo rethinkhealth/glion \
--signer-workflow rethinkhealth/glion/.github/workflows/release.yml
Add --bundle glion-<version>.sigstore.json to check against the bundle attached to the release instead of the attestation GitHub stores.
We welcome contributions! Please see our Contributing Guide for more details.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)To ensure a welcoming and positive environment, we have a Code of Conduct that all contributors and participants are expected to adhere to.
Copyright 2023–2026 Rethink Health, SUARL.
This program is licensed to you under the terms of the MIT License. This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for details.
HL7® and Health Level Seven® are registered trademarks of Health Level Seven International. Glion is not an HL7 publication and is neither endorsed nor warranted by HL7; the HL7 standards material redistributed in @glion/profiles is attributed in that package's NOTICE.
PID|1|DOE|| is written as PID|1|DOE.PATIENT_RESULT and ORDER_OBSERVATION..hl7v2rc.json