{"id":"c1fa5b64-862e-49f2-95ec-0089ab74b856","task":"Send an HL7v2 ORU^R01 lab result message over MLLP","domain":"hl7.org","steps":["Construct the HL7v2 ORU^R01 message with required segments: MSH (message header), PID (patient identification), OBR (observation request), and one or more OBX (observation result) segments encoding each lab value with LOINC codes in OBX-3 and result values with UCUM units in OBX-6","Wrap the message in MLLP framing: prepend the vertical-tab byte (0x0B) and append the field-separator byte (0x1C) followed by a carriage return (0x0D)","Open a TCP socket connection to the receiving system on its configured MLLP port (commonly 2575 or a site-specific port) and send the framed message bytes","Read the response bytes from the socket, strip the MLLP envelope, and parse the returned ACK message to check MSA-1 for AA (application accept), AE (application error), or AR (application reject)","On AE or AR, log the MSA-3 error text and the ERR segment details, then implement retry logic with back-off appropriate to your operational SLA","Close the TCP socket; for high-volume interfaces consider connection pooling rather than opening a new socket per message"],"gotchas":["MLLP is a raw TCP protocol — firewalls and load balancers that do not understand MLLP framing will corrupt messages; verify network path supports persistent TCP connections","HL7v2 field encoding characters (|, ^, ~, \\, &) must be escaped in data values; unescaped pipe characters in a patient name will break segment parsing on the receiver","OBX-11 (observation result status) must be set correctly (F for final, P for preliminary) — receivers often use this to decide whether to display or suppress a result"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c1fa5b64-862e-49f2-95ec-0089ab74b856"}