Connects Epic to disease and procedure registries (STS, ACC NCDR, GWTG, cancer/tumor registries) using Cogito SQL extracts, Bulk FHIR Group export, and HL7v2, then reconciles registry acknowledgments and rejections back into a submission-tracking layer so every eligible case is accounted for.
Tags: healthcare, epic, fhir, hl7v2, cogito, analytics, interoperability, api-led
Specialty Registries
Objective: Registries reward completeness, not delivery: a cardiac or oncology program is scored on the fraction of eligible cases submitted with clean, coded data, and the failure mode is silent under-reporting. This blueprint identifies the eligible cohort from Epic, transforms it into each registry's field dictionary, submits on the required cadence, and matches acknowledgments and rejections back to the originating case so reconciliation is the measured outcome. Done looks like a nightly cohort count that agrees with the registry's accepted count, a bounded discrepancy queue worked by abstractors, and zero eligible cases aging past the submission deadline. This accelerator packages the Specialty Registries Epic Data Sharing Playbook as a MuleSoft-anchored solution plan.
What's Getting Built
- Extract (System API) — pulls the eligible cohort and coded clinical detail from Epic via Bulk FHIR, Cogito SQL, and HL7v2 event triggers ·
GET Group/{id}/$export, GET /bulkstatus/{id}, SQL SELECT Cogito workbook, MLLP LISTEN ORU/MDM/DFT/ADT
- Map and Validate (Process API) — transforms staged cases to the versioned registry field dictionary, crosswalks terminology, and runs edit-rule validation ·
POST /map, POST /validate, LOOKUP crosswalk
- Submission (Process API) — submits mapped records over the registry transport and records the returned submission or batch ID per case ·
POST /submit, SFTP PUT batch, POST vendor REST/SOAP upload
- Terminology Crosswalk (Object Store) — versioned reference tables mapping Epic LOINC/SNOMED/ICD-10-PCS/CPT to registry-proprietary code lists ·
RETRIEVE {code}, STORE {version} table
- Reconciliation Store (Object Store) — per-case state machine and submission keys that match acknowledgment and rejection files back to the Epic CSN ·
RETRIEVE case/{csn}, STORE case/{csn} state, MATCH ack by submissionId
- Discrepancy Queue (Anypoint MQ queue) — dead-letters locally-failed and rejected cases with the failed edit rule for abstractor review and replay ·
CONSUME queue, REPLAY from staging, ALERT missing-ack past SLA
Prerequisites
- Epic Cogito/Clarity or Caboodle read access with a service account scoped to the registry reporting workbooks and cohort logic
- Bulk FHIR backend-services (client_credentials) client registered in open.epic with Group/$export enabled for the registry cohort Groups
- Registry-specific field dictionary and eligibility spec (e.g. STS Adult Cardiac v4.20, ACC NCDR CathPCI, NAACCR for tumor registry) with valid code sets
- Registry submission endpoint and credentials (SFTP drop, vendor SOAP/REST API, or portal batch upload) plus the ack/rejection file format
- Anypoint Platform org with CloudHub or RTF, Object Store v2, and Anypoint MQ for the submission and reconciliation queues
- Terminology assets: LOINC, SNOMED CT, ICD-10-CM/PCS, CPT, and any registry-proprietary code crosswalks loaded as reference data
1. Epic interfaces and standards
This accelerator implements the Specialty Registries Epic Data Sharing Playbook. Register the connecting app on Epic on FHIR and confirm the customer has the relevant Epic modules licensed before building.
- Cogito / Caboodle registry reporting workbooks and Clarity SQL for cohort and clinical-field extraction
- Bulk FHIR R4 Group/$export yielding Encounter, Procedure, Condition, Observation, MedicationRequest NDJSON
- Bridges HL7v2 interfaces (ORU, MDM, DFT, ADT) for event-driven case identification
- FHIR R4 read on Patient, Encounter, Procedure, Condition, Observation for on-demand field enrichment
- SMART Backend Services (client_credentials, system scopes) for authenticated Bulk FHIR access
Architecture
2. Business requirements
- Report on cohort completeness, not message volume: the metric is eligible cases submitted and accepted versus eligible cases identified in Epic.
- Treat eligibility logic as owned by the registry, not by Epic: encode STS/NCDR/NAACCR inclusion criteria explicitly so it survives a clinician changing how they document.
- Meet each registry's submission window (quarterly harvest for NCDR, rolling for tumor registries) with a deadline clock per case, not a single batch date.
- Preserve a durable link from every submitted record back to the Epic CSN and abstractor so rejections are actionable, not anonymous.
- Support resubmission: registries expect corrected records keyed to the original submission ID, so idempotency and versioning are requirements, not niceties.
3. Cohort identification and extraction
- Drive the primary cohort from Cogito/Caboodle registry workbooks where abstraction logic already lives, and use Bulk FHIR Group/$export to pull the coded clinical detail for those patients.
- Use Bridges HL7v2 as an early-warning trigger — an OpTime ORM/procedure log or Beaker ORU can flag a candidate case days before Cogito finalizes it.
- Poll Bulk FHIR $export status with correlation IDs and back-off; never assume the export is ready when the kickoff returns 202.
- Deduplicate at the encounter grain using CSN plus procedure date, because a single admission can surface across FHIR, SQL, and HL7 feeds.
- Stage raw NDJSON and SQL result sets immutably before mapping so a schema change at the registry can be replayed without re-querying Epic.
4. Mapping, normalization, and validation
- Map to the registry field dictionary in DataWeave with one transform per registry version; pin the version in the flow name and reject if the source dictionary drifts.
- Crosswalk Epic terminologies (LOINC, SNOMED, ICD-10-PCS, CPT) to registry-proprietary code lists from versioned reference tables, not inline literals.
- Validate against the registry's edit rules (required fields, range checks, cross-field dependencies) before submission — catching a bad ejection-fraction value locally is far cheaper than a rejection round-trip.
- Compute derived fields (device-to-balloon time, tumor stage from TNM) in DataWeave with the same formulas the registry publishes, and log the inputs.
- Route any record failing local validation to the discrepancy queue with the specific failed rule, not a generic error.
5. Submission, reconciliation, and operations
- Submit via the registry's transport (vendor REST/SOAP, SFTP batch, or portal upload) behind a Submission API, and record the returned submission/batch ID against each case.
- Ingest the registry's acknowledgment and rejection files, parse them, and match back to originating cases by submission ID and record key.
- Alert on the absence of an expected acknowledgment file after the SLA window — the missing ack is the failure dashboards routinely miss.
- Keep a per-case state machine (identified, mapped, submitted, accepted, rejected, resubmitted) in Object Store so completeness is queryable at any moment.
- Dead-letter transport failures with the full payload and correlation ID so a resubmission is a replay, not a re-abstraction.
6. 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.
- Restrict the Cogito/Clarity service account to the registry reporting views only; do not grant broad Clarity read for a scoped registry job.
- Scope the Bulk FHIR client to the specific registry cohort Groups so an export cannot silently widen to the full patient population.
- Encrypt registry SFTP transfers with SSH keys rotated per registry policy and pin the registry host key to prevent redirection of PHI batches.
- Segregate the reconciliation store so abstractor-facing discrepancy data carries the minimum identifiers needed to locate the case in Hyperdrive.
Sample payload — Bulk FHIR Group export kickoff for the CathPCI cohort
GET /api/FHIR/R4/Group/ncdr-cathpci-2026Q3/$export?_type=Encounter,Procedure,Condition,Observation&_since=2026-04-01T00:00:00Z HTTP/1.1
Host: fhir.hospital.org
Authorization: Bearer {access_token}
Accept: application/fhir+json
Prefer: respond-async
HTTP/1.1 202 Accepted
Content-Location: https://fhir.hospital.org/api/FHIR/R4/bulkstatus/9f3c-corr-7a21
X-Correlation-Id: 9f3c-corr-7a21
Testing and validation
- Validate a known accepted case end to end against a registry test/sandbox harness and confirm the accepted count matches the submitted count.
- Feed a deliberately invalid record (out-of-range ejection fraction, missing required device field) and assert it lands in the discrepancy queue with the exact failed edit rule.
- Reconcile a canned rejection file and confirm each rejection matches back to the originating Epic CSN and updates the case state to rejected.
- Replay a stored NDJSON batch after bumping the registry dictionary version and confirm the version guard rejects the stale mapping.
- Simulate a missing acknowledgment file past SLA and confirm the absence-of-event alert fires.
- Run cohort reconciliation: Cogito eligible count minus registry accepted count must equal the discrepancy-queue depth, with no unexplained gap.
Phased rollout
Phase 1 — Connect
- Register the Bulk FHIR backend-services client and Cogito service account; confirm Group/$export and the registry sandbox transport handshake.
- Stand up the System API to pull one cohort Group and one Cogito workbook into immutable staging with correlation IDs.
Phase 2 — Map and test
- Build the versioned DataWeave transform and terminology crosswalks for one registry version and pass the registry's edit-rule validation.
- Submit a test batch to the registry sandbox and wire acknowledgment/rejection parsing into the reconciliation store and discrepancy queue.
Phase 3 — Production
- Cut over one registry (e.g. NCDR CathPCI) with a per-case state machine and completeness dashboard before adding STS or tumor registries.
- Enable the missing-acknowledgment SLA alert and dead-letter replay, then onboard additional registries by adding a transform module per version.
Success metrics
- Cohort completeness: eligible cases accepted divided by eligible cases identified in Cogito, per registry per period.
- Submission latency: median days from case eligibility to accepted acknowledgment against the registry deadline.
- Rejection rate and top rejection reasons, trended to drive upstream documentation or mapping fixes.
- Discrepancy-queue depth and age, with an alert when any case ages past the submission window.
- Reconciliation gap: unexplained difference between submitted, accepted, and rejected counts, target zero.
Troubleshooting
- Registry accepted count is lower than the Cogito eligible count with no rejections to explain the gap. — Likely cause: Cases were identified but never submitted because a batch failed silently or a case stalled in mapping. Fix: Query the per-case state machine for cases stuck before submitted state and replay them from staging; add the missing-transition alert.
- A large batch is rejected en masse with code-set errors after a registry release. — Likely cause: The registry updated its field dictionary or proprietary code list and the pinned mapping version is stale. Fix: Bump the versioned DataWeave transform and crosswalk tables to the new dictionary, revalidate against edit rules, and replay staged NDJSON.
- Bulk FHIR export never completes or returns partial resources. — Likely cause: The kickoff 202 was treated as done, or the cohort Group scope excludes required resource types. Fix: Poll the Content-Location status URL with back-off until complete, and confirm _type includes Encounter, Procedure, Condition, and Observation for the Group.
- Rejections arrive but cannot be tied back to a patient or encounter. — Likely cause: The submission record key was not persisted alongside the Epic CSN, breaking the reconciliation join. Fix: Persist the registry submission/batch ID and record key with the CSN at submit time and rematch the rejection file on both keys.
Deliverable: A deployable Anypoint blueprint that extracts qualifying encounters from Epic via Bulk FHIR, Cogito SQL, or HL7v2, maps them to the registry submission schema in DataWeave, submits on the registry cadence, and reconciles acknowledgments back to a case-tracking store with a discrepancy queue.