Bi-directional infusion-pump integration that turns an Epic MAR medication order into an executable pump program (auto-programming) and streams pump start, stop, rate-change, and infusion-complete events back into Epic flowsheets and the MAR. Closes the loop between Willow/pharmacy dosing and the bedside device.
Tags: healthcare, epic, connected-devices, hl7v2, interoperability, event-driven, system-api, process-api
Infusion Pumps
Objective: Nurses re-key medication rates from the MAR into the infusion pump by hand, and pump activity rarely lands in the chart until documented after the fact. Both are safety problems: transcription errors cause wrong-rate infusions, and missing pump events leave clinicians blind to what is flowing. Done looks like: a verified MAR order plus a barcode scan pre-populates drug, concentration, dose, rate, and DERS limits so the nurse only confirms; and every pump start, stop, rate change, bolus, occlusion alarm, and infusion-complete is recorded against the right encounter with no manual transcription. This accelerator packages the Infusion Pumps Epic Data Sharing Playbook as a MuleSoft-anchored solution plan.
What's Getting Built
- Device System API (System API) — terminates the vendor pump gateway and exchanges IHE PCD device messages ·
RECEIVE PCD-01 device observation, SEND PCD-03 auto-program
- Infusion Process API (Process API) — reconciles verified MAR orders to pump programs and pump telemetry back to flowsheets ·
POST /auto-program, POST /back-document, POST /reconcile
- Epic Bridges System API (System API) — consumes pharmacy give messages from Bridges and emits pump device results into Epic ·
CONSUME RGV_O15 give, EMIT ORU^R01 device results
- order-to-channel correlation state (Object Store v2) — holds patient/channel BCID to MAR-order association keyed by correlation ID until infusion complete ·
GET /{corrId}, PUT /{corrId}, DELETE /{corrId}
- dead-letter queue (VM Queue) — captures unmappable drugs, unknown channels, and gateway timeouts for replay ·
PUBLISH failed-event, REPLAY /{corrId}
- Epic Bridges (target) — documents pump events to Willow MAR and flowsheet rows against the encounter ·
ORU^R01 flowsheet post, RGV_O15/RDS pharmacy feed
Prerequisites
- Epic Bridges interface engine configured to emit RGV/RDE pharmacy messages and accept device flowsheet documentation, with an Epic technical contact to build the interface
- Infusion pump vendor server (BD Alaris, ICU Medical Plum 360, or B. Braun) exposing an interoperability gateway that speaks IHE PCD-01 device-to-enterprise and PCD-03 point-of-care infusion verification
- Signed Epic App Orchard / vendor services agreement covering auto-programming and the drug library (DERS) governance process
- Anypoint Platform environment with VM queues, Object Store v2 for order-to-channel correlation state, and access to an HL7v2 System API
- Positive patient and pump-channel identification in place: barcode medication administration (BCMA), patient wristband, and pump/channel BCID scanning
- Reconciled drug library on the pump matched to Epic medication ERX and Willow dispensing units of measure
1. Epic interfaces and standards
This accelerator implements the Infusion Pumps Epic Data Sharing Playbook. Register the connecting app on Epic on FHIR and confirm the customer has the relevant Epic modules licensed before building.
- Bridges (HL7v2 interface engine) for RGV/RDE pharmacy order and device flowsheet feeds
- Willow (pharmacy) medication orders, dose, concentration, and DERS drug-library mapping
- HL7v2 RGV_O15 pharmacy give and RDS dispense messages for auto-program payloads
- IHE PCD-01 device observation and PCD-03 point-of-care infusion verification profiles
- Epic flowsheet rows and MAR administration documentation via ORU^R01 device results
- Hyperdrive MAR and BCMA scan context for channel association
Architecture
2. Business requirements
- Turn a pharmacy-verified MAR order plus a bedside BCMA scan into a pre-populated pump program the nurse confirms rather than types.
- Enforce that only pharmacist-verified orders auto-program; never let an unverified or discontinued order reach a pump channel.
- Document every pump event start, stop, rate change, bolus, titration, occlusion alarm, infusion complete back to the correct encounter and flowsheet row.
- Preserve the nurse as the final safety gate: auto-programming pre-fills, the clinician confirms against DERS limits at the pump.
- Reconcile programmed and delivered rate against the ordered rate, and surface any mismatch as an operational alert, not a silent log line.
3. Auto-programming: order to pump channel
- Consume the RGV_O15 give segment from Bridges; map drug ERX, concentration, dose, rate, and duration into an IHE PCD-03 auto-program payload in DataWeave.
- Key each program on the association of patient BCID, pump channel BCID, and MAR order ID; hold it in Object Store keyed by correlation ID until the pump acknowledges.
- Translate Willow units of measure to the pump drug-library units; reject any order whose drug is absent from the reconciled DERS library rather than guessing.
- Send auto-program requests to the vendor gateway only after the pump reports the matching channel is scanned and idle; queue otherwise.
- Expire uncommitted programs after a configurable window and notify the MAR, so a scanned-but-never-started order does not linger.
4. Back-documentation: pump events to the chart
- Ingest PCD-01 device observations from the gateway; normalize vendor rate and volume units to Epic flowsheet units in DataWeave.
- Emit ORU^R01 device results to Bridges with the encounter and flowsheet row resolved from the original correlation state.
- Debounce high-frequency telemetry: post rate changes on transition, not on every heartbeat, to avoid flooding the flowsheet.
- Carry the pump alarm codes occlusion, air-in-line, downstream occlusion through as discrete flowsheet observations so clinicians see them in context.
- Emit an infusion-complete event that closes the MAR administration and releases the Object Store correlation entry.
5. Matching and reconciliation
- Match every inbound pump event to its order by pump channel BCID plus the correlation ID stamped at program time, never by patient name.
- Compare delivered rate and volume against ordered values on each event; flag deviations beyond a tolerance as reconciliation exceptions.
- Detect orphan telemetry a running channel with no matching Epic order and route it to a review queue rather than dropping it.
- Handle channel reuse across patients by clearing correlation state on infusion complete and on any patient-mismatch scan.
- Treat a pump event whose order was discontinued in Epic as a stop discrepancy and alert, since the physical infusion is still running.
6. Error handling and operations
- Route unmappable drugs, unknown channels, and gateway timeouts to a dead-letter queue tagged with correlation ID and raw payload.
- Alert on the absence of an expected infusion-complete event for a bag whose calculated volume should be exhausted, the failure mode dashboards miss most often.
- Make auto-program retries idempotent on correlation ID so a redelivered order never programs a channel twice.
- Keep a full audit trail of programmed versus delivered values for every channel to support pharmacy and safety review.
- Never auto-retry a failed auto-program silently; a stale rate reaching a pump is worse than a nurse programming manually.
7. Security and compliance
- Encrypt PHI in transit and at rest.
- Audit-log every access to and modification of patient data, and carry a correlation ID end to end.
- Enforce minimum-necessary access for integration operators and support users.
- Auto-programming is patient-safety-critical: sign PCD-03 payloads and mutually authenticate the vendor gateway with mTLS so no unauthenticated source can program a pump.
- Enforce that DERS drug-library and unit-of-measure changes flow through a governed, versioned mapping with pharmacy sign-off before deployment.
- Bind every program to a verified pharmacist order and a live BCMA patient-plus-channel scan; reject any auto-program lacking positive dual identification.
- Rate-limit and quarantine a gateway that begins emitting programs for channels with no corresponding scanned order, and page on-call rather than absorbing them.
Sample payload — IHE PCD-03 auto-program request derived from an Epic RGV_O15 give
MSH|^~\&|MULE_INFUSION|HOSP|PUMP_GATEWAY|ICU|20260820T134500||PCD_PC03^PCD^PCD_PC03|MSG00021|P|2.6|||AL|NE
PID|1||E1002847^^^EPIC^MR||DOE^JANE||19781104|F
PV1|1|I|ICU^BED4^01^HOSP||||||||||||||||V60021884
ORC|NW|ORD48815^EPIC|||||^^^20260820T134400
RXG|1|1|^^^20260820T134500^^R|||NOREPINEPHRINE 4 MG/250 ML^ERX9921^EPIC|4|mg|250|mL|||||8^mcg/min
RXR|IV^Intravenous^HL70162
OBX|1|NM|EPC^Infusion Rate^MDC|1|8|mcg/min^^UCUM|||||F
OBX|2|NM|EPC^Concentration^MDC|2|16|mcg/mL^^UCUM|||||F
OBX|3|ST|EPC^Channel BCID^LOCAL|3|CH-000472||||||F
OBX|4|ST|EPC^Correlation ID^LOCAL|4|corr-9f3a2c17-ord48815||||||F
Testing and validation
- Replay recorded vendor gateway PCD-01/PCD-03 traffic through MUnit against the Device System API and assert exact DataWeave unit conversions.
- Test the auto-program happy path: verified order plus matching channel scan yields one PCD-03 request keyed on correlation ID.
- Test the negative path: a drug absent from the DERS library is rejected before reaching the gateway and lands in the DLQ.
- Test back-documentation: a burst of PCD-01 rate observations debounces to discrete flowsheet transitions, not one row per heartbeat.
- Test orphan and mismatch handling: telemetry for an unassociated or discontinued channel routes to the review queue and raises the reconciliation alert.
- Load-test steady-state ICU telemetry with many concurrent channels to confirm correlation-state lookups and flowsheet posting stay within SLA.
Phased rollout
Phase 1 — Connect
- Stand up the Device System API against the vendor gateway in a non-clinical test bed with simulator pumps.
- Build the Epic Bridges interface for RGV_O15 give and ORU^R01 device results in a POC/test environment.
Phase 2 — Map and test
- Reconcile the pump drug library to Willow ERX and units, and encode the DataWeave mappings with pharmacy sign-off.
- Run MUnit against recorded gateway traffic and validate auto-program and back-documentation end to end in Epic test.
Phase 3 — Production
- Pilot on a single ICU unit with a fixed set of pumps and drugs, monitoring reconciliation exceptions daily.
- Expand drug library and units after the pilot shows zero silent program failures and clean back-documentation.
Success metrics
- Auto-program success rate: verified orders reaching the correct channel without manual entry, target above 98 percent.
- Manual transcription rate: percent of infusions still programmed by hand, trending toward zero on covered drugs.
- Reconciliation exception rate: delivered-vs-ordered mismatches per 1000 events, watched for drift.
- Back-documentation latency: pump event to flowsheet row, target under 10 seconds.
- Missing infusion-complete count: bags with no completion event past expected exhaustion, target zero.
Troubleshooting
- Auto-program requests reach the gateway but the pump never pre-fills the channel. — Likely cause: The channel BCID scanned at the bedside does not match the channel BCID in the correlation state, so the gateway drops the program. Fix: Verify the BCMA channel scan is captured and normalized identically on both the scan feed and the auto-program payload; align BCID formatting in DataWeave and re-key the correlation entry.
- Flowsheets show a flood of near-identical infusion-rate rows. — Likely cause: Every pump telemetry heartbeat is being posted instead of only rate transitions. Fix: Enable the debounce in the Process API to post on state change only, and confirm the vendor heartbeat interval is not treated as a rate-change event.
- A discontinued order still shows an active infusion documenting to the chart. — Likely cause: The pump kept running after the Epic order was discontinued and the stop was never reconciled. Fix: Treat inbound telemetry for a discontinued order as a stop discrepancy: raise the reconciliation alert to the unit and do not silently suppress the events.
- Orders for a specific drug consistently land in the dead-letter queue. — Likely cause: The drug or its unit of measure is missing from the reconciled DERS drug-library mapping. Fix: Add the drug and UCUM unit mapping through the governed, pharmacy-signed drug-library process and redeploy the mapping version; replay the DLQ entries.
Deliverable: A deployable Anypoint project: System APIs for the pump gateway and Epic Bridges, a Process API that reconciles MAR orders to pump programs and pump telemetry back to flowsheets, DataWeave 2.0 mappings, a VMQ dead-letter queue with correlation IDs, MUnit suites with recorded pump traffic, and runbooks for the closed-loop safety edge cases.