Skip to content

Analyzers & Integration

Connect hematology, chemistry, immunoassay, and urinalysis analyzers to EaseLab for automatic result import. Supported protocols include HL7 v2 ORU^R01, ASTM E1381/E1394, and JSON REST.

Screen: /analyzers
Ingest endpoint: POST /integrations/v1/results

Integration overview

mermaid
flowchart LR
    A[Analyzer] --> M[Middleware / LIS bridge]
    M -->|HL7 ASTM or JSON| API[EaseLab API]
    API --> P[Parser]
    P --> M2[Catalog mapper]
    M2 --> R[Results inbox]

EaseLab does not replace full middleware for all instrument brands — many sites deploy a small bridge service that forwards normalized messages with the analyzer API key.

Registering a device

  1. Open Analyzers in the lab portal.
  2. Click Add Analyzer.
  3. Configure:
FieldDescription
NameFriendly label (e.g., "Chemistry – Cobas")
ProtocolHl7, Astm, or JsonRest
Serial / modelOptional asset tracking
ActiveDisable during maintenance
  1. Save — EaseLab displays a one-time API key (mlk_...).
  2. Copy the key into your middleware configuration immediately.

API key shown once

The raw key cannot be retrieved later. If lost, rotate by creating a new device or regenerating per your deployment policy.

Keys are stored as SHA-256 hashes server-side; only a prefix is shown for identification.

Authentication

All ingest requests require:

http
X-Analyzer-Key: mlk_your_device_key_here
EndpointAuth required
POST /integrations/v1/resultsYes
GET /integrations/v1/healthYes (except unauthenticated health probe in some configs)

Failed auth returns 401. Locked tenants return 403 with TENANT_LOCKED. Plans without analyzer feature return 403.

Protocol details

HL7 v2 ORU^R01

  • Content-Type: text/plain
  • Payload: raw HL7 message with OBX segments
  • Barcode typically in OBR or PID depending on middleware mapping
  • OBX-3 carries analyte identifier for catalog mapping

ASTM E1381/E1394

  • Content-Type: text/plain
  • Record-based framing (STX/ETX) handled by parser
  • Result records map to analyte codes and values

JSON REST

  • Content-Type: application/json
json
{
  "barcode": "S-20250611-0042",
  "patientRef": "MRN-1001",
  "results": [
    {
      "analyteCode": "WBC",
      "analyteName": "White Blood Cells",
      "value": "7.2",
      "unit": "10*3/uL",
      "referenceRange": "4.0-11.0",
      "abnormalFlag": "N"
    }
  ]
}
FieldRequired
barcodeYes — must match registered sample
results[]Yes
analyteCodeYes — maps to catalog parameter
valueYes
patientRefOptional cross-check

End-to-end setup flow

mermaid
sequenceDiagram
    participant Admin
    participant EaseLab
    participant Bridge
    participant Machine
    Admin->>EaseLab: Register analyzer + copy API key
    Admin->>EaseLab: Register sample with barcode
    Machine->>Bridge: Raw results
    Bridge->>EaseLab: POST /integrations/v1/results
    EaseLab->>EaseLab: Parse + match barcode
    EaseLab-->>Bridge: 200 OK + resultsImported

Response codes

CodeMeaning
200Success — check resultsImported count
401Missing or invalid API key
403Tenant locked or plan restriction
422Parse OK but business rule failed — see logId
400Empty payload

Success body example:

json
{
  "message": "Results imported successfully.",
  "barcode": "S-20250611-0042",
  "resultsImported": 12,
  "logId": "uuid"
}

Catalog mapping

Machine codeEaseLab field
OBX-3 / ASTM codeParameter code in catalog
UnitsParameter unit
Reference rangeMay override catalog default

Unmapped codes appear in inbox with import warnings — add parameters or alias tables in middleware.

Plan features

Analyzer integration may be gated by subscription plan (HasAnalyzerIntegrationAsync). Verify entitlement on Subscription before go-live.

Security practices

PracticeDetail
TLS onlyNever send API keys over HTTP in production
Key per deviceRevoke compromised keys individually
IP allowlistOptional at reverse proxy
Payload loggingRestrict log access — contains PHI

Health monitoring

Poll GET /integrations/v1/health with API key from middleware:

json
{
  "status": "ok",
  "device": "Chemistry – Cobas",
  "protocol": "Hl7"
}

Use for uptime dashboards and alert when ingest silence exceeds threshold.

Troubleshooting

SymptomCheck
401Key header name exact: X-Analyzer-Key
422 unknown barcodeSample registered before ingest
Partial importOBX codes not in catalog
Duplicate resultsMiddleware retry without idempotency
Example testingUse API docs sample payloads

Ease Lab — Cloud Pathology Lab Management