MoonBit Clinical Message HL7v2 Parser - Hospital LIS/HIS messaging infrastructure
moon version --all
moon update
moon check --target all
moon test --deny-warn
moon run cmd/main -- checkmoon add plhjbg/moonbit-hl7v2@0.1.3let raw = "MSH|^~\\&|LIS|HOSPITAL|HIS|CENTER|20260819120000||ADT^A01|MSG00001|P|2.5\rPID|1||10001||DOE^JOHN"
match @parser.parse_message(raw) {
Ok(message) => {
let patient_id = @path.get_value(message, "PID-3.1")
println("Patient ID: " + patient_id)
}
Err(error) => println(error.to_formatted_string())
}moon run cmd/main -- help
moon run cmd/main -- check
moon run cmd/main -- parse
moon run cmd/main -- benchmark --iterations 1000./tools/check-cli.ps1raw HL7 / MLLP frame
|
lib/mllp -------- framing and incremental stream state
|
lib/escape + lib/parser + lib/types -------- AST and limits
|
lib/segments -------- typed segment models
|
lib/messages + lib/batch -------- message and batch envelopes
|
lib/path + lib/validator + lib/terminology + lib/analytics
|
lib/serializer + lib/converter + lib/diff + lib/generator
|
cmd/main -------- stable local CLI entry point./tools/run-benchmark.ps1 -Iterations 1000./tools/measure-loc.ps1 | ConvertFrom-Json | Format-Listmoon check --target all --deny-warn
moon test --deny-warn
moon fmt --check
moon infoInstall
Download zipMoonBit Clinical Message HL7v2 Parser - Hospital LIS/HIS messaging infrastructure