Lab &
Diagnostics
The Laboratory module manages the entire test lifecycle—from a doctor ordering a blood test to the lab collecting the sample, running the analysis, verifying the results, and delivering the report to the patient's record.
What is Lab Management?
Lab Management handles everything related to diagnostic testing—blood tests, urine tests, pathology, microbiology, biochemistry, and all other laboratory analyses. It tracks each sample from the moment it's collected to the moment the verified report is delivered to the doctor and patient.
The system manages test orders, sample collection with barcode tracking, result entry, quality verification by senior pathologists, report generation (including printable PDFs), closed-loop critical-value handling (ack → chart note → close), and a STAT / TAT board for overdue campus turnaround.
Why Does It Exist?
Laboratory errors can have serious clinical consequences. Without a proper system:
- → Sample mix-ups — One patient's blood could be swapped with another's
- → Lost results — Paper reports get misplaced, delaying treatment
- → Critical misses — Life-threatening abnormal results might not be flagged urgently
- → No audit trail — If a result is questioned, there's no record of who handled it
How Lab Testing Works
Test Ordered
A doctor orders lab tests during a consultation (e.g., "Complete Blood Count," "Blood Sugar," "Lipid Profile"). The order appears instantly in the lab system with the patient's MRN, the ordered tests, and any clinical notes.
Sample Collection
A phlebotomist (or nurse) collects the sample. They label the collection tube with a unique barcode generated by the system. The barcode links the physical sample to the digital order. The sample is logged as "Collected."
Analysis & Results
The lab technician runs the sample on the appropriate analyzer (or manually processes it). Results are entered into the system. For automated analyzers, results can be imported directly via LIS interface, eliminating manual entry errors.
Verification & Report
A senior pathologist or lab supervisor reviews the results. They can verify (approve) or reject (with reason for re-collection). Once verified, the report is available in the patient's record and can be printed as a PDF.
Every Feature Explained
Test Ordering
Doctors order lab tests from the consultation screen.
No paper forms. Orders arrive at the lab instantly.
Doctor selects tests from a categorized catalog. The order links to the patient, the encounter, and billing.
Barcode Sample Tracking
Every sample is labeled with a unique barcode.
Eliminates sample misidentification. The chain of custody is recorded electronically.
The barcode is printed on a sticker applied to the collection tube. Every scan logs who handled the sample and when.
Result Entry & Verification
Two-step process: technician enters results, pathologist verifies.
Prevents errors. A second pair of eyes catches mistakes before the report goes to the doctor.
Results can be imported from analyzers or entered manually. The system checks reference ranges. Verification is a digital signature.
Critical Value Closed-Loop
Life-threatening results require notify → acknowledge → chart note → close.
A critically high potassium or low hemoglobin needs immediate action and proof it was seen and documented, not only a toast.
Thresholds flag findings; staff with lab:critical-alert are notified. Ack with lab:critical:ack, link a patient chart note, then close. Escalate only if unread after local SLA, it does not replace ack. Inbox on the Lab hub; chart banner on the patient.
STAT / TAT Command Center
Campus wallboard of overdue and approaching diagnostic turnaround.
CMOs need one view of STAT risk across lab, radiology, and cath, not three separate queues.
Open /dashboard/lab/tat (GET /diagnostics/tat-board). Counts only, no PHI. SLA minutes from campus BranchSetting diagnostics.tat.* (or enterprise when Viewing All).
PDF Report Generation
Generate printable, shareable lab report PDFs.
Patients need physical copies for other providers or their own records.
Verified reports can be exported to PDF with hospital letterhead, patient info, test results, reference ranges, and pathologist signature.
LIS Integration
Direct connection to automated laboratory analyzers.
Auto-importing results eliminates manual transcription errors and saves time.
Analyzers post JSON to /lab/machine/reports or optional HL7 v2 to /lab/machine/hl7 (ORU^R01 with LOINC OBX). ADT^A01/A03 and ORM^O01 (NW/CA) default parse+ACK; opt-in write-back (settings hl7.writeback.* + feature hl7_clinical_writeback) can admit/discharge or match/create/cancel lab/radiology/cath orders with explicit UUIDs. Not a certified HL7 engine.
“Mr. Singh's Blood Test”
Mr. Singh sees a doctor for fatigue. The doctor orders a Complete Blood Count and Thyroid panel. The order appears in the lab system instantly.
A phlebotomist calls Mr. Singh to the collection area, draws blood, and labels the vial with a printed barcode. The sample is logged as collected.
In the lab, the analyzer processes the sample and sends results directly to the system. The pathologist reviews them, notices a slightly abnormal thyroid value, verifies the report. Within 2 hours of collection, the verified report is in Mr. Singh's patient record. The doctor gets a notification and discusses the results with Mr. Singh during a follow-up call.
Measurable Impact
- Turnaround Time
From collection to verified report: typically 2-4 hours for routine tests.
- Zero Mix-Ups
Barcode system ensures 100% sample-to-patient accuracy.
- Critical Alerts
Life-threatening results reach doctors within minutes, not hours.
Lab
Architecture
The LIS uses an event-mesh trigger to notify phlebotomy of new orders. Reports are stored in JSONB format to handle varying test parameters across different test types.
Technical Architecture
| Field | Type | Institutional Role |
|---|---|---|
| report_id | UUID | Unique diagnostic report identifier. |
| sample_barcode | Varchar(64) | Physical sample mapping code for chain of custody. |
| result_data | JSONB | Structured test values and reference ranges. |
| certifying_doc_id | UUID | Institutional ID of the signing consultant. |
Note: Sensitive fields use AES-256 field-level encryption where applicable.
Governance & Power
lab:orderlab:viewlab:uploadlab:verifyCritical Alerting
Test results outside the 'Critical Band' trigger a high-priority alert to the ordering physician and ward nurse simultaneously.
LIS Interfacing
HMIS Pro interfaces directly with automated analyzers, pulling raw result data without manual entry, reducing transcription errors to zero.
Regulatory Integrity: 100% of reports are cryptographically signed.