Ingests scope telemetry, still images, and video clips from endoscopy processors and DICOM image managers, then formats and binds them to the matching Epic Lumens procedure log. Turns loose device output into attributable, coded documentation attached to the right encounter and performing endoscopist.
Tags: healthcare, epic, connected-devices, hl7v2, fhir, interoperability, system-api, event-driven
Endoscope Data Capture
Objective: Endoscopy suites generate images, video, and structured findings on scope processors and DICOM stations that never reliably reach the patient chart, so endoscopists re-key findings, images land in the wrong encounter, and procedure logs are incomplete at sign-off. The problem is capturing device output the moment a procedure runs and binding each artifact to the correct Lumens procedure log, encounter, and performing provider without manual reconciliation. Done looks like: every still, clip, and measurement from a scope session arrives coded and attributed in Epic, attached to the right procedure order and encounter, before the endoscopist signs the report, with orphaned captures surfaced for reconciliation rather than lost. This accelerator packages the Endoscope Data Capture Epic Data Sharing Playbook as a MuleSoft-anchored solution plan.
What's Getting Built
- Device Ingest (System API) — terminates DICOM and the HL7v2 scope feed and buffers each capture to Anypoint MQ on receipt ·
DICOM C-STORE SCP, DICOM MWL C-FIND SCP, MLLP LISTEN ORU^R01
- Normalize and Bind (Process API) — resolves the accession to an Epic order, codes findings, and binds artifacts to the procedure log ·
CONSUME queue, GET /ServiceRequest?identifier={accession}, POST /bind
- correlation state (Object Store) — caches the study-UID-to-ServiceRequest/Encounter mapping for the session ·
GET /{studyUID}, PUT /{studyUID}
- Dead Letter Reconciliation (Batch flow) — holds unmatched or unacknowledged captures for retry and idempotent replay once identity resolves ·
CONSUME dlq, POST /replay
- Epic Bridges (target) — files structured findings and the procedure note document against the Lumens procedure log ·
POST ORU^R01, POST MDM^T02
- Epic FHIR (target) — posts images and clips as Media referencing the grouped DiagnosticReport ·
POST /DiagnosticReport, POST /Media, GET /ServiceRequest
Prerequisites
- Epic Bridges interface enabled for inbound ORU and MDM messages, with a registered application and interface spec for endoscopy results
- Epic on FHIR R4 client credentials (backend OAuth 2.0) scoped for DiagnosticReport, Media, ServiceRequest, and Encounter read/write
- DICOM connectivity to the endoscopy image manager: C-STORE SCP endpoint and Modality Worklist (MWL) query access, with device AE titles registered
- Anypoint Platform with CloudHub 2.0 or RTF, VM/Anypoint MQ queues for buffering, and Object Store v2 for correlation state
- Accession number and procedure order mapping between the endoscopy scheduling system and Epic ServiceRequest/procedure log
- Network path from endoscopy processors and capture workstations to the Mule System API, with DICOM TLS and MLLP over TLS configured
1. Epic interfaces and standards
This accelerator implements the Endoscope Data Capture 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 ORU-R01 for structured endoscopy findings and measurements
- Bridges HL7v2 MDM-T02 for the procedure note and image reference documents
- FHIR R4 Media resource for still images and video clip references
- FHIR R4 DiagnosticReport and ServiceRequest to bind captures to the procedure order
- DICOM C-STORE and Modality Worklist to receive images and resolve accession numbers
- Cupid and Radiant image manager conventions reused for Lumens procedure documentation
Architecture
2. Business requirements
- Capture every still image, video clip, and structured measurement from a scope session and attach it to the correct Lumens procedure log before the endoscopist signs off.
- Bind each artifact to the accession number, encounter, and performing provider so nothing lands in the wrong chart.
- Preserve device-native metadata such as scope serial number, insertion and withdrawal times, and photodocumentation counts for quality reporting.
- Surface orphaned captures that cannot be matched to a scheduled procedure into a reconciliation queue rather than dropping them.
- Deliver structured findings as discrete, coded results so Cogito can report on adenoma detection rate and withdrawal time without chart abstraction.
3. Device ingestion at the System API
- Run a DICOM C-STORE SCP inside the System API to receive stills and video from capture workstations, and a Modality Worklist SCP to hand scheduled procedures back to the scope.
- Accept structured device output over MLLP as vendor HL7v2 or as a proprietary payload, and normalize both into a canonical capture envelope in DataWeave.
- Stamp every inbound artifact with a correlation ID keyed on accession number plus study instance UID before anything else touches it.
- Buffer captures to Anypoint MQ immediately on receipt so a slow downstream Epic call never backpressures the scope processor mid-procedure.
- Keep the System API strictly device-facing and Epic-agnostic: it speaks DICOM and MLLP, not FHIR.
4. Matching, normalization, and binding
- Resolve the accession number to an Epic ServiceRequest and Encounter by querying FHIR, and cache the mapping in Object Store keyed by study UID for the duration of the session.
- When the study UID has no worklist match, hold the capture in the reconciliation queue and query MWL and FHIR on a retry schedule rather than failing outright.
- Map DICOM tags and device fields to LOINC and SNOMED CT codes for site, finding, and instrument in a versioned DataWeave library.
- Group stills and clips from one scope session into a single DiagnosticReport so Lumens shows one procedure, not scattered Media resources.
- Reject and quarantine any capture whose resolved patient identity disagrees between DICOM patient ID and the Epic Encounter subject.
5. Orchestration and delivery to Epic
- Post images and clips as FHIR R4 Media referencing the DiagnosticReport, and emit structured findings and measurements as an ORU-R01 through Bridges.
- Send the rendered procedure note and image contact sheet as an MDM-T02 so it files against the Lumens procedure log as a document.
- Order delivery so the DiagnosticReport and ServiceRequest linkage lands before Media, avoiding orphaned images that render with no parent report.
- Make every Epic write idempotent using the study UID plus artifact hash so a retried capture does not duplicate images in the chart.
- Confirm filing by reading back the procedure log status; do not consider a session complete until Epic acknowledges every artifact.
6. Error handling and operations
- Route any capture that fails identity matching, coding, or Epic acknowledgment to a dead-letter queue tagged with correlation ID and failure reason.
- Alert on the absence of an expected result: a MWL entry that started but produced no captures by a timeout is the failure mode dashboards miss most often.
- Track a per-session artifact count and reconcile it against the DICOM object count so a dropped clip is caught, not silently lost.
- Replay reconciled captures from the DLQ through the same idempotent delivery path once identity is resolved.
- Expose correlation ID, accession number, and study UID on every log line so an operator can trace one image from scope to signed report.
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.
- Enforce DICOM TLS for C-STORE and MLLP over TLS for the device feed; do not accept unencrypted DICOM or HL7 on the ingest listeners.
- Quarantine any capture where the DICOM patient ID and the resolved Epic Encounter subject disagree, and never auto-file a mismatched identity.
- Strip or hash burned-in patient identifiers in image pixel data and DICOM overlays before persisting captures outside Epic.
- Register and pin device AE titles and source IPs so an unrecognized scope or workstation cannot push images into the pipeline.
Sample payload — FHIR R4 Media for an endoscopy still image bound to a procedure
{
"resourceType": "Media",
"status": "completed",
"type": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/media-type",
"code": "image",
"display": "Image"
}]
},
"modality": {
"coding": [{
"system": "http://dicom.nema.org/resources/ontology/DCM",
"code": "ES",
"display": "Endoscopy"
}]
},
"subject": { "reference": "Patient/eXYZ123" },
"encounter": { "reference": "Encounter/eENC456" },
"basedOn": [{ "reference": "ServiceRequest/eSR789" }],
"createdDateTime": "2026-08-20T14:32:11-05:00",
"operator": { "reference": "Practitioner/ePROV321" },
"bodySite": {
"coding": [{
"system": "http://snomed.info/sct",
"code": "32713005",
"display": "Sigmoid colon"
}]
},
"content": {
"contentType": "image/jpeg",
"title": "Colonoscopy still 0007 - polyp at 30cm",
"creation": "2026-08-20T14:32:11-05:00"
},
"identifier": [{
"system": "urn:dicom:uid",
"value": "1.2.840.113619.2.55.3.2831164356.783.1692557531.7"
}]
}
Testing and validation
- Send a DICOM C-STORE from a test AE title and assert the System API emits a canonical capture envelope with a correlation ID derived from study UID and accession.
- Run a MWL query for a scheduled colonoscopy and verify the returned worklist item resolves to the correct Epic ServiceRequest and Encounter.
- Feed a session with a known image count and confirm the reconciled artifact count matches the DICOM object count end to end.
- Post a duplicate capture with the same study UID and artifact hash and assert Epic shows one Media, proving idempotency.
- Inject a patient-ID mismatch between DICOM and the Encounter subject and confirm the capture is quarantined, not filed.
- Simulate a Bridges ORU NAK and verify the finding routes to the DLQ with the failure reason and replays cleanly after fix.
Phased rollout
Phase 1 — Connect
- Stand up the System API DICOM C-STORE and MWL SCPs against one endoscopy suite and register device AE titles.
- Establish Bridges connectivity in a non-production Epic environment and confirm FHIR backend OAuth token issuance.
Phase 2 — Map and test
- Build and version the DataWeave DICOM-to-FHIR and device-to-ORU mappings with LOINC and SNOMED coding.
- Run full-session tests with recorded scope captures and reconcile artifact counts against Epic filing acknowledgments.
Phase 3 — Production
- Cut over one procedure room with the reconciliation queue and mismatch quarantine actively monitored.
- Scale to all endoscopy suites once orphaned-capture and duplicate rates hold at zero across a full clinic day.
Success metrics
- Percentage of scope captures filed to the correct Lumens procedure log before endoscopist sign-off
- Orphaned-capture rate: artifacts that could not be bound to a scheduled procedure per day
- Median latency from DICOM C-STORE receipt to artifact visible in Epic
- Identity-mismatch quarantine count per week
- Session artifact reconciliation accuracy: filed count versus DICOM object count
Troubleshooting
- Images arrive in Epic but attach to no procedure log or the wrong encounter. — Likely cause: The study UID could not be resolved to a ServiceRequest because the MWL entry and Epic order accession numbers do not match. Fix: Hold the capture in the reconciliation queue, re-query MWL and FHIR on the accession number, and only file once the ServiceRequest and Encounter resolve.
- Duplicate stills appear in the Lumens procedure log after a network retry. — Likely cause: Epic writes were not idempotent, so a replayed capture created a second Media resource. Fix: Key delivery on study UID plus artifact hash and check for an existing Media before posting, so retries update rather than duplicate.
- A scope session shows fewer images in Epic than the endoscopist captured. — Likely cause: One or more DICOM objects were dropped or backpressured and never reconciled against the session count. Fix: Compare the per-session filed count against the DICOM object count and replay missing objects from the buffer or DLQ.
- Structured findings never reach Cupid or Cogito reporting. — Likely cause: The ORU-R01 device fields were passed through as free text instead of mapped to LOINC and SNOMED codes. Fix: Route findings through the versioned coding library so measurements and observations file as discrete coded results.
Deliverable: A deployable Anypoint Platform blueprint: a DICOM/HL7 System API fronting endoscopy processors and image managers, a normalization Process API that binds captures to the correct Lumens procedure log, and Epic Bridges ORU/MDM plus FHIR Media/DiagnosticReport delivery, with Mule flows, DataWeave mappings, DLQ, and a Postman test suite.