Skip to main content

Laboratory Service — Service Overview

Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · 03 platform-services · 02 DDD


1. Purpose

The laboratory-service is the national eHealth platform's bounded context for end-to-end laboratory diagnostic operations. It unifies two previously separate modules — laboratory-lis (LIS workflow) and results (clinical result filing and acknowledgment) — into one service owning the complete laboratory lifecycle: order receipt, specimen tracking, result production, verification, chart filing, and clinician acknowledgment.


2. Bounded Context

AttributeValue
DDD context namelaboratory
Source module IDsCLIN-LIS, CLIN-RESULTS
Licensing categoryOptional add-on (diag.laboratory)
FHIR resource ownersSpecimen, Observation (lab), DiagnosticReport (lab)
ServiceRequest readerConsumes from orders-service

3. Responsibilities

ResponsibilityDetail
Test catalog managementLOINC-mapped panels, components, specimen requirements, reference ranges
Lab order receiptConsumes ServiceRequest from orders-service; creates accession
AccessioningAccession number generation, label printing, chain-of-custody
Specimen lifecycleState machine: ordered → collected → received → in-process → resulted → verified → released → canceled
Result entryManual entry and analyzer-import: value, unit, reference range, flags, comments
Verification & authorizationRole-based (technologist verify → pathologist sign-off); versioned corrections
Critical value alertingConfigurable thresholds; acknowledgment enforcement; escalation via communication-service
Worklist managementBench/analyzer/priority-filtered views; TAT tracking
Result filingPublishes Observation + DiagnosticReport to FHIR after release
Result acknowledgmentClinician inbox/queue, ack actions (reviewed, forwarded, plan-documented), escalation
HL7 v2 adapterORM/ORU exchange routed through interop-service

4. Non-Responsibilities

  • Imaging studies (radiology-service)
  • Alert delivery channel (communication-service)
  • Patient portal display (patient-portal-service)
  • Clinical chart context (patient-chart-service)
  • Order placement UI (orders-service)

5. Upstream Dependencies

ServiceTypeDetail
orders-serviceEvent consumer + FHIR readclinical.orders.placedServiceRequest
registration-serviceFHIR readPatient, Encounter resolution
provider-directory-serviceFHIR readPerforming lab Organization
terminology-serviceSync RESTLOINC validation, reference range lookup
interop-serviceHL7 v2 passthroughORM/ORU with external LIS platforms

6. Downstream Consumers

ServiceWhat it consumes
patient-chart-servicediag.laboratory.result.released events; DiagnosticReport + Observation FHIR reads
patient-portal-serviceReleased results (policy-filtered) via FHIR gateway
communication-servicediag.laboratory.critical.triggered → critical alert dispatch
audit-serviceAll state-transition and data-access events
population-health-serviceAggregate result data for HMIS indicator export

7. Slice Involvement

SliceScope
S0Catalog, accessioning, specimen lifecycle, manual result entry
S1Verification, critical alert hooks, worklist, result acknowledgment
S2Analyzer adapter (HL7 v2 ORU), external LIS coexistence
S3TAT reporting, trending queries, HMIS export

8. Key Architectural Decisions

DecisionRationale
Merged LIS + Results into one serviceEliminates cross-service handoff; single transaction for verify → file
FHIR-native persistenceObservation + DiagnosticReport stored as FHIR JSON with indexed columns
Verified result immutabilityCorrections create a new version; prior version preserved per ISO 15189
Critical alerts via event busDecouples alert channel from lab workflow
HL7 v2 via interop-serviceService never parses raw MLLP; receives canonical FHIR/REST

9. Context Diagram


10. Source Reconciliation

Legacy moduleKey contributionsMerge decision
laboratory-lisAccession, specimen lifecycle, result entry/verification, worklist, HL7 ORM/ORU adapterCore LIS domain retained verbatim
resultsChart filing, FHIR persistence, acknowledgment queues, critical alerting, trendingIntegrated as post-verification release phase within same service boundary

Boundary rule: LIS sub-domain handles operational workflow through verification. Results sub-domain handles chart filing, acknowledgment, and downstream events. Both share one PostgreSQL schema and one NestJS process.