{"id":"b5308d81-c1bf-4f3c-bd3e-fe9571a5de9c","task":"Integrate with a Laboratory Information System (LIS) via HL7v2 lab order and result messages","domain":"hl7.org","steps":["Establish an MLLP TCP connection between your ordering system and the LIS; define the interface direction (bidirectional is typical: orders flow from ordering system to LIS, results flow from LIS to ordering system) and agree on port assignments and message types with the LIS vendor","Send lab orders as ORM^O01 messages: the ORM contains MSH, PID (patient), PV1 (visit), ORC (common order), and OBR (observation request) segments; populate OBR-4 with the ordered test code using the code system agreed with the LIS (often a local code or LOINC)","Handle ORM acknowledgments: the LIS responds with an ORR^O02 or plain ACK; check MSA-1 for acceptance and store the filler order number returned in ORC-3 for subsequent result correlation","Receive ORU^R01 result messages from the LIS containing OBR (observation request) and OBX (observation result) segments; correlate results to orders using the filler order number in OBR-3 / ORC-3","Parse each OBX segment for LOINC code (OBX-3), result value (OBX-5), units (OBX-6), reference range (OBX-7), and abnormal flag (OBX-8); store all fields to support clinical decision support and display","Implement order status update handling for ORM cancellations and result corrections (ORU with OBX-11 set to 'C' for corrected); treat corrections as a new authoritative result that supersedes prior values"],"gotchas":["LIS systems commonly use proprietary local test codes rather than LOINC in OBR-4 and OBX-3; you must maintain a local-to-LOINC mapping table aligned with the specific LIS installation, not assume a universal code set","Result messages for panels (e.g., CBC) produce multiple OBX segments within a single OBR group; your parser must associate each OBX with its parent OBR using the set ID in OBX-1 and not treat OBX segments as independent records","Reflex orders triggered by abnormal results may arrive as additional ORM messages referencing the original order; without explicit reflex order tracking your system may treat them as unrelated new orders"],"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:26.626Z"},"url":"https://mcp.waymark.network/r/b5308d81-c1bf-4f3c-bd3e-fe9571a5de9c"}