Expand description
HL7 v2 path-based field access and query functionality.
This crate provides query functionality for HL7 v2 messages, including:
- Path-based field access via
get - Presence semantics via
get_presence
§Path Format
Paths use the format: SEGMENT.FIELD\[REP\].COMPONENT
Examples:
PID.5.1- First component of 5th field in PID segment (first repetition)PID.5[2].1- First component of 5th field, second repetitionMSH.9- 9th field of MSH segmentMSH.9.1- First component of 9th field of MSH segment
§Example
use hl7v2_model::Message;
use hl7v2_query::get;
// Assuming you have a parsed Message from hl7v2-parser
// let message = hl7v2_parser::parse(hl7_bytes).unwrap();
// let last_name = get(&message, "PID.5.1").unwrap();Functions§
- get
- Get value at path (e.g.,
PID.5[1].1) - get_
presence - Get presence semantics for a field at path.