Guide
Laboratory integration (HL7)
End-to-end: orders out, results back, matched and acknowledged.
The flow
1. A clinician orders tests in a consultation.
2. The laboratory polls GET /api/hl7/orders?mark_sent=1 and receives ORM^O01 messages; ORC-2/OBR-2 carry our order id.
3. The laboratory posts results to POST /api/hl7 (ORU^R01) with our order id in OBR-2.
4. ClinicView files the results on the patient, flags abnormal and critical values, and alerts the clinician. Patients see released results in the portal.
Message rules
| Transport | HTTPS POST (no MLLP); one message per request |
| Separators | Segments \r; fields |; components ^; repetitions ~; escape \; sub-components & |
| Versions | 2.3 – 2.5.1 |
| Character set | UTF-8 |
| Results | OBX value types NM, ST, TX, CE; OBX-8 flags (L, H, LL, HH, A, AA) mapped to low/high/critical |
| Idempotency | Same filler order + set id + test updates the existing result instead of duplicating it |