Laboratory Order Service
Manages laboratory test ordering, specimen tracking, and integration with lab information systems (LIS)
Overview
The Lab Order Service manages the complete laboratory testing lifecycle from order entry through result reporting, with integration to laboratory information systems.
This service uses HL7 v2.5 for bidirectional communication with Laboratory Information Systems (LIS). See ⚠️ LabOrderWorkflow (broken link) for the complete process.
Key Capabilities
- Order entry with diagnosis support (ICD-10)
- Test selection with LOINC codes
- Panel and profile ordering
- Standing orders and order sets
- Duplicate test checking
:::tip Duplicate Prevention The system automatically checks for duplicate orders within 24 hours to prevent unnecessary testing and costs. :::
- Specimen collection workflow
- Barcode labeling
- Chain of custody tracking
- Specimen transport
Patient safety requires two-identifier verification at specimen collection.
- HL7 v2 ORU message parsing
- Results validation and review
- Critical value alerting
- Historical result comparison
- Graphical trending
HL7 v2 Integration
Outbound (ORM - Order Message)
MSH|^~\&|EHR|HOSPITAL|LIS|LAB|20231211120000||ORM^O01|MSG001|P|2.5PID|1||MRN12345||DOE^JOHN^||19800101|MORC|NW|ORD001||||||20231211120000OBR|1|ORD001||CBC^COMPLETE BLOOD COUNT^L|||20231211120000Inbound (ORU - Result Message)
MSH|^~\&|LIS|LAB|EHR|HOSPITAL|20231211140000||ORU^R01|MSG002|P|2.5PID|1||MRN12345||DOE^JOHN^||19800101|MOBR|1|ORD001||CBC^COMPLETE BLOOD COUNT^L|||20231211120000OBX|1|NM|WBC^White Blood Count^L||7.5|10*3/uL|4.5-11.0|N|||FOBX|2|NM|HGB^Hemoglobin^L||14.5|g/dL|13.5-17.5|N|||FCritical Value Management
-
Critical Value Detected
LIS identifies life-threatening result and flags for immediate notification
-
Provider Paged
Automated page sent to ordering provider with patient and result details
-
EHR Alert
Critical value banner displayed in EHR when provider accesses patient chart
-
Acknowledgment Required
Provider must acknowledge receipt and document clinical action taken
-
Escalation (if needed)
If not acknowledged within 15 minutes, escalate to attending or supervisor
-
Documentation
All notification attempts and responses logged for compliance
Automatic escalation for life-threatening results:
- WBC < 2.0 or > 30.0
- Hemoglobin < 7.0
- Platelets < 20
- Potassium < 2.5 or > 6.5
- Glucose < 40 or > 500
Time is critical - these values require immediate provider action.
Technology Stack
- Runtime: Java 17
- Framework: Spring Boot
- HL7 Parser: HAPI
- Database: PostgreSQL
- Message Queue: Apache Kafka
Safety Features
- Order appropriateness checking
- Duplicate prevention (same test < 24 hours)
- Fasting requirements
- Medication interference warnings