Normalize RTLS patient, staff, and asset location events from any badge/tag vendor and drive Epic workflow automation, bed-status, and encounter location updates via an API-led MuleSoft layer that resolves tags to Epic identities.
Tags: healthcare, epic, event-driven, streaming, connected-devices, fhir, hl7v2, interoperability
Real Time Location Systems (RTLS)
Objective: RTLS badges track patients, staff, and assets, but the data sits in a vendor console cut off from clinical workflow, so nurses flip bed status by hand, room-to-room moves go unrecorded, and pumps get hunted. The problem is turning a firehose of low-value tag pings into a few deduplicated transitions that map to exactly one Epic patient, provider, or asset, then acting without flooding clinicians. Done looks like a patient arrival auto-updating their Encounter location, a clinician entering a room auto-documenting presence, and asset views reflecting real location within seconds, with unmatched tags surfaced rather than dropped. This accelerator packages the Real Time Location Systems (RTLS) Epic Data Sharing Playbook as a MuleSoft-anchored solution plan.
What's Getting Built
- RTLS Normalize (System API) — wraps the vendor egress and emits one canonical location-event schema with a correlation ID ·
POST /events, PUBLISH mq://rtls-events
- Location Resolve (Process API) — resolves each tag to one Epic identity, debounces transitions, and orchestrates the write-back ·
CONSUME mq://rtls-events, ADT A02, ADT A08, PATCH /Location/{id}, PUT /Encounter/{id}, PUT /Device/{id}
- Tag Identity Registry (Object Store) — maps badge to Practitioner, asset tag to Device, and patient band to Patient/Encounter ·
GET /{tagId}
- RTLS Event Buffer (target) — Anypoint MQ stream that buffers high-frequency reader bursts for replay ·
PUBLISH rtls-events, CONSUME rtls-events
- Dead Letter Queue (target) — holds unmatched or stale tag reads with raw payload and failed lookup key for reconciliation ·
PUBLISH dlq, REPLAY dlq
- Epic Bridges / FHIR (target) — applies confirmed patient moves and bed-status changes via ADT and FHIR resources ·
ADT A02, ADT A08, PATCH /Location/{id}, PUT /Encounter/{id}, PUT /Device/{id}
Prerequisites
- RTLS platform (CenTrak, Stanley/AeroScout, Sonitor, or Zebra MotionWorks) with a streaming or webhook egress and a documented tag/badge ID schema
- Epic Bridges interface engine configured to accept inbound ADT (A02 transfer, A08 update) and to emit staff/bed reference feeds
- Epic on FHIR R4 access with client credentials for Location, Encounter, Device, and Practitioner resources
- A maintained tag-to-identity registry: badge-to-Practitioner, asset-tag-to-Device, and patient-band-to-Patient/Encounter linkage
- Facility Structure export from Epic (department, room, bed) reconciled to the RTLS zone/coordinate map
- Anypoint Platform environment with a streaming broker (Anypoint MQ or Kafka) for event buffering and replay
1. Epic interfaces and standards
This accelerator implements the Real Time Location Systems (RTLS) 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 ADT (A02 patient transfer, A08 update) for encounter location and bed-status changes
- FHIR R4 Location (bed/room status via operationalStatus and physicalType)
- FHIR R4 Encounter (location component update for patient movement)
- FHIR R4 Device and Practitioner (asset tag and staff badge resolution)
- Hyperspace/Hyperdrive bed-management and Rover status boards as the clinician-facing consumers
- Cogito/Clarity for RTLS-derived throughput and asset-utilization analytics
Architecture
2. Business requirements
- Auto-update Encounter location when a patient band crosses into a new department, room, or bed zone, replacing manual bed-status keystrokes.
- Resolve every tag read to exactly one Epic identity, a Patient/Encounter, a Practitioner, or a Device, before any downstream write.
- Debounce location transitions so a tag lingering at a zone boundary produces one move, not a stream of flip-flops.
- Surface unmatched or stale tags for reconciliation rather than dropping them, since a lost asset tag is a real failure, not noise.
- Keep asset location as a read-mostly FHIR Device view; do not let a misplaced pump generate a patient encounter event.
3. Ingestion and normalization (System API)
- Wrap the RTLS vendor egress in a System API that emits one canonical location-event schema regardless of CenTrak, AeroScout, or Zebra origin.
- Normalize coordinates and zone IDs to the Epic Facility Structure using the reconciled zone-to-department/room/bed map.
- Stamp every event with a correlation ID and the raw vendor payload so a downstream mismatch can be traced to the exact tag read.
- Buffer high-frequency reads through Anypoint MQ so a reader burst or Epic slowdown never drops events.
- Classify each event as patient, staff, or asset at ingestion using the tag ID namespace, so downstream routing is deterministic.
4. Matching and debounce (Process API)
- Look up the tag in the identity registry; a patient band resolves to an active Encounter, a badge to a Practitioner, an asset tag to a Device.
- Apply a dwell threshold (for example 30 seconds settled in a zone) before emitting a transition, killing boundary flapping.
- Suppress a move when the resolved Encounter is discharged or the zone is unchanged, avoiding phantom ADT traffic.
- Route unmatched tags to the dead-letter queue with the raw read and the failed lookup key, never to a clinical write.
- Collapse rapid multi-zone reads into a single most-recent-location decision per identity per debounce window.
5. Orchestration and write-back
- Emit an HL7v2 ADT A02 to Bridges for a confirmed patient department/room/bed change, and A08 for same-encounter attribute updates.
- PATCH the FHIR Location operationalStatus to reflect bed occupied/cleaning/available where RTLS drives bed turnover.
- Update the FHIR Encounter location component for patient movement when the site prefers FHIR over ADT for a given department.
- Write asset presence as FHIR Device.location updates only, keeping asset tracking off the patient-clinical write path.
- Make every write idempotent on correlation ID so an MQ redelivery cannot double-post a transfer.
6. Error handling and operations
- Alert on the absence of expected reads from a fixed-location reader, which is the failure mode dashboards miss most often.
- Track unmatched-tag rate as a first-class metric; a rising rate means the identity registry has drifted from reality.
- Replay dead-lettered events after a registry backfill without re-emitting already-applied transitions, guarded by the idempotency key.
- Rate-limit ADT emission per department so a reader malfunction cannot storm Bridges with transfers.
- Keep the raw vendor payload for 30 days for tag-level dispute resolution and reader placement tuning.
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.
- Treat the tag-to-identity registry as PHI: a patient band ID linked to an Encounter is identifying, so encrypt it at rest and restrict registry read scope to the Process API.
- Strip staff real-time location from any analytics feed that leaves the clinical boundary; badge tracking is subject to labor and privacy agreements.
- Sign and verify RTLS webhook payloads so a spoofed location event cannot trigger a fraudulent patient transfer.
- Scope FHIR client credentials to Location, Encounter, Device, and Practitioner only, excluding broader read access the RTLS use case never needs.
Sample payload — Canonical RTLS location event emitted by the System API
{
"correlationId": "rtls-2f4a9c-20260820T143512Z",
"eventType": "location-transition",
"subjectClass": "patient",
"tag": {
"vendor": "CenTrak",
"tagId": "BND-0098231",
"namespace": "patient-band"
},
"location": {
"zoneId": "Z-4E-BAY07",
"epicDepartment": "4 EAST",
"epicRoom": "4E-07",
"epicBed": "4E-07-A",
"physicalType": "bed"
},
"dwellSeconds": 34,
"observedAt": "2026-08-20T14:35:12Z",
"resolved": {
"resourceType": "Encounter",
"encounterId": "eNZ8kd2",
"patientId": "ePq31a9"
}
}
Testing and validation
- Fire a boundary-flapping sequence (rapid A-zone/B-zone reads) and assert exactly one transition emits after the dwell threshold.
- Send a read for a discharged Encounter and confirm the move is suppressed, not posted as an ADT A02.
- Send an unregistered tag ID and confirm it lands in the dead-letter queue with the raw payload, and no FHIR/ADT write occurs.
- Replay a duplicated MQ message with the same correlation ID and assert no double transfer is posted (idempotency).
- Validate the outbound ADT A02 against the Bridges spec: PV1 assigned location matches the resolved department/room/bed.
- Simulate a silent reader (no reads for its window) and confirm the missing-event alert fires.
Phased rollout
Phase 1 — Connect
- Stand up the RTLS System API against the vendor egress and validate the canonical schema and correlation IDs in a sandbox.
- Reconcile the RTLS zone map to the Epic Facility Structure export and load the tag-to-identity registry.
Phase 2 — Map and test
- Run the Process API in shadow mode: resolve, debounce, and log intended writes without posting to Epic.
- Compare shadow transitions against a day of known patient moves and staff rounding to tune the dwell threshold and unmatched rate.
Phase 3 — Production
- Enable write-back for one pilot department (asset-only first, then patient bed-status) with ADT rate limits engaged.
- Expand to additional departments and turn on FHIR Encounter location updates once unmatched-tag rate holds under target.
Success metrics
- Unmatched-tag rate under 2 percent of resolved events
- End-to-end tag-read-to-Epic-update latency under 5 seconds at p95
- Manual bed-status keystrokes reduced by a target percentage per pilot unit
- Asset location accuracy above 95 percent versus physical audit
- Zero duplicate ADT transfers per week attributable to redelivery
Troubleshooting
- Beds flip between occupied and available every few seconds on the Hyperdrive board. — Likely cause: A patient band sits on a zone boundary and reads alternate between adjacent zones faster than the debounce window. Fix: Raise the dwell threshold for that zone and add hysteresis so the last confirmed zone is held until a new zone dwells past threshold.
- A batch of location events silently disappears with no Epic update and no error. — Likely cause: The tags resolved to no identity and were dropped instead of dead-lettered, so the failure is invisible. Fix: Route all unmatched lookups to the dead-letter queue with the raw payload and lookup key, and alarm on unmatched-tag rate.
- Bridges rejects the outbound transfer with an invalid assigned-location error. — Likely cause: The RTLS zone map has drifted from the current Epic Facility Structure after a unit renumbering. Fix: Re-run the Facility Structure reconciliation, reload the zone-to-bed map, and replay dead-lettered events guarded by the idempotency key.
Deliverable: A deployable Anypoint blueprint: RTLS System API (vendor-normalized location events), a location Process API that resolves tags to Epic identities and orchestrates FHIR Location/Encounter and HL7v2 ADT updates, DataWeave transforms, a tag-to-identity registry, dead-letter handling, and dashboards for stale-tag and unmatched-tag detection.