Package com.framed.interop.hl7.hl7v2
Class OruBuilder
java.lang.Object
com.framed.interop.hl7.hl7v2.OruBuilder
Builds
ORU^R01 (unsolicited observation result) HL7 v2.5 messages from FRAMED
observations. Segments are joined with \r as required by MLLP.
All data taken from observations, mapping and configuration is delimiter-escaped via
Hl7Escape before embedding; the configured patient location is treated as
component-structured (its ^ separators are preserved). Each OBX carries its own
observation's time in OBX-14, so receivers (including a FRAMED inbound side) keep the original
per-observation timestamps instead of re-stamping on arrival or inheriting the message time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA single observation to encode as an OBX segment. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringbuild(SendingIds ids, PatientContext patient, CodedConcept concept, String value, Instant timestamp, String controlId) Builds an ORU^R01 carrying a single observation.static Stringbuild(SendingIds ids, PatientContext patient, List<OruBuilder.Observation> observations, Instant timestamp, String controlId) Builds an ORU^R01 carrying one or more observations (one OBX each, stamped with its own observation time in OBX-14).
-
Method Details
-
build
public static String build(SendingIds ids, PatientContext patient, CodedConcept concept, String value, Instant timestamp, String controlId) Builds an ORU^R01 carrying a single observation.- Parameters:
ids- MSH sender/receiver idspatient- patient context for PID/PV1concept- the coded conceptvalue- the observation value (already formatted)timestamp- the observation timecontrolId- the MSH-10 message control id- Returns:
- the HL7 message text
-
build
public static String build(SendingIds ids, PatientContext patient, List<OruBuilder.Observation> observations, Instant timestamp, String controlId) Builds an ORU^R01 carrying one or more observations (one OBX each, stamped with its own observation time in OBX-14).- Parameters:
ids- MSH sender/receiver idspatient- patient context for PID/PV1observations- the observations to encodetimestamp- the message time (MSH-7)controlId- the MSH-10 message control id- Returns:
- the HL7 message text
-
