HL7 & EHR integration

Live NEDOCS scores from your Epic, Cerner, or Meditech ADT feed

Point your interface engine at NEDOCS. We consume standard HL7 v2 ADT, ORU, and ORM messages, mine the ED patient-flow variables in real time, and calculate the score, surge level, and notifications automatically — no double entry at the charge desk.

  • HL7 v2 over HTTPS POST — Mirth, Rhapsody, Cloverleaf ready
  • ADT + ORU (flowsheet acuity/airway) + ORM (admit orders)
  • Optional MLLP socket listener for legacy interfaces
  • No PHI retained — synthesized flow metrics only
Epic / CernerInterface engine
ADT^A01 · ORU^R01 · ORM^O01
POST /api/hl7NEDOCS engine
Score 125 · Level 3 · Orange
3

Message families (ADT/ORU/ORM)

8

ADT trigger events

HTTPS

+ optional MLLP socket

0

PHI fields retained

Overview

A documented feed in, a live score out

NEDOCS consumes documented HL7 data sources and mines the variables that drive the National Emergency Department Overcrowding Scale. Like the NYU Langone deployment, a single consolidated feed carrying ADT, ORU, and ORM messages is the simplest path: one connection covers registrations, transfers, flowsheet acuity, and admit orders.

Each message updates a live ED-encounter model. NEDOCS re-derives the seven calculator inputs and, whenever they change, writes a score — firing the same timeline events, realtime updates, agency webhooks, and notifications as a manual charge-desk entry.

Architecture

Two ways to deliver messages

HTTPS POST (recommended)Modern

Your interface engine (Mirth, Rhapsody, Cloverleaf) translates MLLP to an HTTPS POST and sends each message to /api/hl7. NEDOCS has standardized on HTTP POST for API consumption; TLS terminates at our edge.

MLLP socket (legacy)Optional

For engines that only speak raw MLLP, NEDOCS can host a customer-facing listener (classic test port 5060) that accepts <VT>…<FS><CR> framed messages and returns an HL7 ACK. Kept on a private/VPN interface.

Message specifications

Event types and required elements

ADT — Admit / Discharge / Transfer

TriggerEventNEDOCS effect
A01AdmitAdd ED patient; inpatient class marks a boarder
A04Register (quick reg)Add ED patient; sets arrival time
A02TransferED departure when leaving an EMERG location
A03DischargeRemove from ED census
A06Rollover / inpatient admitMark admit decision (boarding starts)
A08UpdateRefresh class / location / bed
A11Cancel admitClear boarder flag
A13Cancel dischargeReturn patient to census

Required elements: PV1-2 class, PV1-3 assigned location, PV1-6 prior location, PV1-19 visit number, PV1-44 admit time, EVN-2/EVN-6 event time, PV2-2 accommodation.

ORU^R01 — Flowsheet results

OBX segments carry acuity (ESI) and airway data. Observation IDs are configured per site — for example the NYU Langone Epic FDC records 1600000010 (airway type) and 1600000009 (airway size). Required: PV1-19, OBX-3 (observation ID), OBX-5 (value).

ORM^O01 — Order messages (admit)

Admit orders flag a patient as a boarder before the ADT class flips. Required: PV1-19, ORC-1 (order control), ORC-9 (transaction time), OBR-4 (service ID), NTE-3 (comment).

Mapping

How HL7 becomes the seven NEDOCS inputs

NEDOCS inputDerived from
Total patientsActive encounters physically in the ED
Total admitsED patients with an admit decision still boarding
Ventilators / criticalED patients flagged airway (ORU) or ESI-1
Longest admitMinutes the longest-boarding admit has waited
Last bed timeDoor-to-bed minutes of the most recently roomed patient
ED beds / Inpatient bedsHospital record (Settings → Bed counts)

Bed capacity cannot be inferred from a message feed, so ED and inpatient bed counts are read from your hospital configuration.

Filtering & transfer logic

The NYU “EMERG” transfer fix

Interface-engine filters often exclude certain patient classes (e.g. Outpatient “O”) by default, which can silently drop the transfer that moves a boarder out of the ED when the class is flipped prematurely (E → O) mid-transfer.

NEDOCS applies the NYU refinement: an ED departure is inferred whenever the prior location field PV1-6 contains EMERG, regardless of patient class. The ED-location pattern is configurable per site.

Endpoints

Post messages over HTTPS

POSThttps://nedocs.org/api/hl7/message

Routes by MSH-9. Typed variants: /api/hl7/adt, /api/hl7/oru, /api/hl7/orm. Pipeline status: GET /api/hl7/status.

Send raw HL7 (curl)

# A02 transfer out of the ED (drives census down)
curl -X POST "https://nedocs.org/api/hl7/adt" \
  -H "Authorization: Bearer {your-hospital-api-key}" \
  -H "Content-Type: text/plain" \
  --data-binary $'MSH|^~\\&|EPIC|HOSP|NEDOCS|HOSP|20260701120000||ADT^A02|MSG001|P|2.5\rEVN|A02|20260701120000\rPID|1||MRN123^^^HOSP^MR\rPV1|1|O|WEST^W12^01|||EMERG^ED^BED4|||||||||||||||||||||||||||||||||20260701070000'

Or wrap in JSON

curl -X POST "https://nedocs.org/api/hl7/message?ack=hl7" \
  -H "Authorization: Bearer {your-hospital-api-key}" \
  -H "Content-Type: application/json" \
  -d '{ "message": "MSH|^~\\&|EPIC|HOSP|NEDOCS|HOSP|...||ORU^R01|MSG002|P|2.5\r..." }'

JSON response

{ "ok": true, "ack": "AA", "family": "ADT",
  "messageType": "ADT^A02", "scored": true,
  "score": 118, "scaleColor": "Orange", "level": 3 }

Add ?ack=hl7 (or Accept: application/hl7-v2) to receive a raw HL7 MSA|AA|… acknowledgement instead of JSON.

Authentication

Per-hospital API key

Send your hospital key any of these ways:

  • Authorization: Bearer {key}  (preferred)
  • X-API-Key: {key}
  • id={key} in the query string or body (legacy compatibility)

Keys are provisioned during enterprise onboarding and mapped to your hospital. Never publish production keys in source control.

MLLP

Optional socket listener

When an engine can only speak raw MLLP, NEDOCS runs a TCP listener that accepts <VT>message<FS><CR> frames and returns a framed HL7 ACK. Debug connectivity by verifying a TCP connection to the listener port; a “Connection refused” error means the listener is not reachable.

# quick reachability check
nc -vz interface.hospital.example 5060

Security

2048-bit TLS, no PHI at rest

All API traffic is transmitted over a 2048-bit (or higher) TLS connection. NEDOCS does not store PHI — it extracts synthesized numbers and metrics. Only a visit-number correlation key and the derived flow variables are persisted; names, dates of birth, and full MRNs are never retained. See our HIPAA & SOC compliance details.

Onboarding

What we need from your team

  • A consolidated ADT + ORU + ORM feed (or separate feeds) from your interface engine.
  • Your ED location naming so we can tune the EMERG / ED-location pattern.
  • Flowsheet observation IDs for acuity (ESI) and airway, if you send ORU results.
  • ED and inpatient bed counts entered under Settings.
  • A test message set — we validate parsing and scoring before go-live.

Machine-readable capability manifest: /.well-known/nedocs-integration.json. Prefer REST/JSON? See the REST API reference.

Ready to connect your ED feed?

We provision ingest endpoints, IP allowlists, field mapping, and a BAA for live clinical feeds. Enterprise onboarding includes an interface validation workshop.