Annex G — Clinical Laboratories & Medical Analyzers

Sector annex to Morocco UNS Standard v0.1. Defines naming conventions, topic hierarchies, and telemetry contracts for clinical analysis laboratories, medical instrumentation (automates d’analyse), and laboratory workflows. Strategic anchor: SijiLab LIMS and newly opening clinical laboratories serving as real-hardware pilot sites in Morocco.


G.1 Scope

Covers:

  • Pre-analytical Operations: Sample collection, barcode registration, specimen reception, and processing (e.g., centrifugation).
  • Analytical Operations (Medical Instrumentation):
    • Hematology analyzers (cell counters, flow cytometers).
    • Clinical biochemistry analyzers (photometry, ion-selective electrodes).
    • Immunology analyzers (CLIA, ELISA).
    • Microbiology & molecular biology instruments.
  • Quality Control (QC): Internal Quality Control (IQC) runs, calibration cycles, and analyzer control logs.
  • Post-analytical Operations: Technical validation, biological approval, and LIMS event triggers.
  • Lab Infrastructure: Cold chain monitoring (reagent fridges, sample freezers) and environmental sensors.

G.2 Enterprise & Site archetypes

G.2.1 Enterprise segment

Use sijilab for laboratories running the unified Siji health ecosystem. For independent laboratory clients, use a unique enterprise slug matching their business name (e.g., lab-benahmed or biolab-maroc).

G.2.2 Site segment

Clinical laboratories are mapped by geographical location or branch identifier:

Site segmentRegionActivity
lab-pilot-settatma-07Primary pilot laboratory; multi-analyzer suite
lab-pilot-berrechidma-06Secondary pilot laboratory; focus on rapid testing and hematology
lab-central-casama-06Reference hub; high-throughput immunology, molecular biology, and pathology

G.3 Area inventory

Standard functional areas inside a medical laboratory, arranged in patient-flow order:

Area segmentDescription
pre-analyticalPhlebotomy, sample reception, barcode sorting, centrifugation
hematologyComplete blood count (CBC), coagulation, ESR
biochemistrySerum chemistry, metabolites, enzymes, urine analysis
immunologyHormones, tumor markers, infectious disease serology
microbiologyCulture, identification, antibiotic susceptibility testing (AST)
molecular-bioPCR, gene sequencing, viral load
cold-chainTemperature-controlled storage for reagents, controls, and specimens
quality-controlStaging area for analyzer calibration and control metrics
lims-bridgeThe integration service interface publishing validated values to LIMS

G.4 Equipment archetypes

Analyzers and lab equipment are represented under a <type>-<analyzer_id> pattern.

Equipment segmentCommon Brands / ModelsCommon Signals
analyzer-hem-<n>Sysmex XN/XS, Horiba Pentra, Mindray BCwbc, rbc, hgb, plt, state, calibration-status
analyzer-bio-<n>Roche Cobas, Beckman Coulter AU, Mindray BSglucose, urea, creatinine, ldl, state, lamp-intensity
analyzer-imm-<n>Abbott Alinity, Siemens Atellica, Beckman Accesstsh, crp, troponin, reagent-level, state, incubator-temp
centrifuge-<n>Hettich, Eppendorf, Sigmaspeed-rpm, run-duration-s, lid-state, temperature-c
fridge-reagent-<n>Liebherr, B medical systems, customtemperature-c, door-state, energy-kwh, power-state
gate-barcode-<n>Custom scanner, Zebrabarcode-scan, scan-time, status

G.5 Mandatory signals

Every clinical analyzer/device publishing to the UNS MUST support at minimum:

  • state — System state: idle, running, calibration, qc, maintenance, error.
  • connection-status — Network/serial link state: online, offline.
  • qc-status — State of the last QC run: pass, warn-westgard, fail-block.
  • calibration-status — Calibration status: valid, expired, re-calibration-required.

G.6 Quality & medical-specific signals

Medical telemetry must link patient/specimen identification with structured analytical data. Unlike industrial telemetry, data payloads must prevent clinical error by binding measurements strictly to barcode identifiers.

G.6.1 The Analytical Event Envelope

Every result payload published under the analytical namespace MUST use the following structured schema:

{
  "specimen_barcode": "2605220084",
  "analyzer_id": "sysmex-xn350-01",
  "timestamp": "2026-05-22T20:25:30.124Z",
  "measurements": [
    {
      "test_code": "WBC",
      "test_name": "White Blood Cells",
      "value": 7.42,
      "unit": "10^3/uL",
      "flag": "normal",
      "ref_range_low": 4.0,
      "ref_range_high": 10.0
    },
    {
      "test_code": "HGB",
      "test_name": "Hemoglobin",
      "value": 11.2,
      "unit": "g/dL",
      "flag": "low",
      "ref_range_low": 12.0,
      "ref_range_high": 16.0
    }
  ]
}

G.6.2 Key Clinical Test Codes (Standardized Reference)

Standardized codes aligned with the Moroccan NABM (Nomenclature des Actes de Biologie Médicale) and international LOINC standards:

Test CodeNameCommon UnitsTypical Reference Ranges
WBCWhite Blood Cells10^3/µL4.0 - 10.0
RBCRed Blood Cells10^6/µL4.5 - 5.9 (Male) / 4.0 - 5.2 (Female)
HGBHemoglobing/dL13.5 - 17.5 (Male) / 12.0 - 15.5 (Female)
PLTPlatelets10^3/µL150 - 450
GLUGlucoseg/L0.70 - 1.10
CRECreatininemg/L7.0 - 12.0
UREUreag/L0.15 - 0.45
TSHThyroid Stimulating HormoneµIU/mL0.40 - 4.00
CRPC-Reactive Proteinmg/L0.0 - 5.0

G.7 Worked path examples

Clinical telemetry published in compliance with the Morocco UNS standard:

# Reagent cold chain monitoring (Level 2 infrastructure)
ma/ma-07/sijilab/lab-pilot-settat/cold-chain/fridge-reagent-01/temperature-c
 
# Analyzer status and run-state (Level 2 real-time monitoring)
ma/ma-07/sijilab/lab-pilot-settat/hematology/analyzer-hem-01/state
 
# Raw clinical result payload from edge parser (Level 3 event)
ma/ma-07/sijilab/lab-pilot-settat/hematology/analyzer-hem-01/result-payload
 
# Quality Control telemetry (Westgard rule evaluation)
ma/ma-07/sijilab/lab-pilot-settat/quality-control/analyzer-bio-01/qc-deviation-sd

G.8 Strategic notes

  • Decoupled Architecture: Medical analyzers speak legacy protocols (ASTM, HL7 v2 over serial/MLLP). Direct API integration inside SijiLab core creates tight coupling and fragility. Interfacing via the Lab-Edge Gateway converts these legacy streams into standardized JSON/Protobuf published over the UNS. The LIMS (api-core and its integration-service) simply subscribes to the UNS, ensuring infinite scalability as new analyzers are added.
  • Health Data Privacy (CNDP Compliance): In accordance with Moroccan Law 09-08 (protection of personal data), raw patient demographic data (names, CIN) MUST NOT be published over the shared broker. The UNS topics only route anonymized specimen barcodes (specimen_barcode). The mapping between the barcode and the patient’s identity remains strictly locked inside SijiLab’s secure PostgreSQL database behind Keycloak auth.
  • Pilot Strategy: Utilizing newly opening private medical laboratories in Settat and Berrechid as pilot sites is a low-risk, high-return playground. Unlike heavy steel mills or chemical complexes, a lab is a highly clean, controlled, and intensely data-driven setting. Successfully running the UNS to capture, buffer, and deliver medical data proves the performance and absolute zero-data-loss capabilities of our Edge architecture before deploying into harsh factory floors.