Ingest payer and ACO attribution rosters, resolve each member to an Epic patient, and keep Epic panels, registries, and PCP assignments in sync using FHIR R4 Group resources and Bridges HL7v2. Handles add, remove, and re-attribution deltas with full reconciliation, not just naive upserts.
Tags: healthcare, epic, payer, fhir, us-core, api-led, interoperability, da-vinci
Patient Rostering
Objective: Value-based contracts hand health systems monthly (or weekly) attribution rosters from payers and ACOs that name which patients a provider or panel is accountable for. Loaded by hand or with brittle scripts, these lists drift: members get double-attributed, terminated members linger in registries, and PCP assignments in Epic disagree with the payer's system of record. Done looks like every roster delta resolving to a confidently matched Epic patient, panels and registries reflecting the current attribution within the contract SLA, and every unmatched or ambiguous member landing in a worked exception queue instead of silently disappearing. This accelerator packages the Patient Rostering Epic Data Sharing Playbook as a MuleSoft-anchored solution plan.
What's Getting Built
- Roster System API (System API) — lands SFTP roster files into a raw-immutable zone and parses X12 834 into a canonical roster record ·
SFTP LISTEN roster file, PARSE X12 834 (INS/REF/DTP), REJECT on trailer control-total mismatch
- Patient Match Process API (Process API) — resolves each roster member to an Epic patient by deterministic keys first, then probabilistic above a confidence threshold ·
GET /Patient?identifier, GET /Patient?name&birthdate&gender, ROUTE below-threshold to exception queue
- Attribution Recon Engine (Process API) — diffs the incoming roster against current Group membership and applies adds, removes, and re-attributions with history preserved ·
GET /Group/{id}, PUT /Group/{id} (member.period / member.inactive), idempotency-keyed mutation
- member-link-cache (Object Store) — confirmed payer-member-id-to-Epic-patient links, keyed by payer and member id, for deterministic resolution on later rosters ·
GET /{payer}/{memberId}, PUT /{payer}/{memberId}
- Epic Healthy Planet / Bridges (target) — commits panel and registry membership via FHIR Group and updates PCP of record via Bridges HL7v2 ADT ·
PUT /Group/{id}, HL7v2 ADT A28/A31, HL7v2 SIU (outreach scheduling)
- Exception Queue DLQ (target) — captures parse, match, and Epic-write failures on distinct Anypoint MQ queues, each with its own reprocessing path ·
PUBLISH parse-fail, PUBLISH match-fail, PUBLISH write-reject, REPLAY by correlationId
Prerequisites
- Epic on FHIR R4 with Group and Patient read/write, plus Bridges interface for HL7v2 ADT and SIU where roster changes drive registration events
- Registered SMART on FHIR backend-services client with client-credentials JWT auth and scopes for Group.write, Patient.read, and Group.read
- Epic build for the target registries, panels, and the coverage/relationship records that back PCP attribution (Cadence/Prelude and Healthy Planet)
- Payer or ACO roster feed spec: file format (X12 834, CSV, or FHIR Group), cadence, and full-file-versus-delta semantics
- MPI or enterprise EMPI access, or Epic patient-matching endpoint, for member-to-patient resolution
- Anypoint Platform runtime (CloudHub 2.0 or RTF), Object Store v2, Anypoint MQ, and Secrets Manager provisioned
1. Epic interfaces and standards
This accelerator implements the Patient Rostering Epic Data Sharing Playbook. Register the connecting app on Epic on FHIR and confirm the customer has the relevant Epic modules licensed before building.
- FHIR R4 Group (panel/registry membership: member.entity, member.period, member.inactive)
- FHIR R4 Patient (identifier and demographic read for member matching)
- Bridges HL7v2 ADT (A28/A31 registration and PCP updates) and SIU where attribution drives outreach scheduling
- Healthy Planet registries and Epic panel management for population attribution
- SMART on FHIR backend services (client_credentials, JWT bearer) for unattended batch runs
- X12 834 benefit enrollment as the common upstream payer roster format
Architecture
2. Business requirements
- Treat the payer roster as the system of record for attribution and Epic as the system of record for the clinical patient record; never let a roster feed invent a patient.
- Distinguish full-file rosters from delta feeds up front, because a full file with missing members means terminate-the-absent, and a delta file means change-only.
- Honor the contract SLA: most VBC agreements expect panel reflection within days of the roster drop, so measure lag from file receipt to Group commit.
- Preserve attribution history with member.period start and end dates so retrospective quality measures can reconstruct who was attributed when.
- Route every unmatched or ambiguous member to a human-worked queue; a dropped member is a gap in care accountability, not a log line.
3. Ingestion and parsing
- Land files via SFTP listener into a raw-immutable zone, then parse in the Roster System API so the original feed is always replayable.
- Parse X12 834 with the DataWeave EDI module into a canonical roster record; map INS, REF, and DTP segments to member id, subscriber, and coverage dates.
- Stamp every record with a correlation ID and the source file name plus line number so an exception can be traced to its exact origin.
- Reject the whole file, not individual rows, when the control totals or member count in the trailer disagree with what was parsed.
- Normalize member identifiers to a canonical namespace before matching so payer member ids and MRNs never collide.
4. Member matching and normalization
- Match on deterministic keys first: payer member id already linked in a prior run, then MRN, then SSN-plus-DOB where policy allows.
- Fall back to probabilistic matching on name, DOB, sex, and address only above a configured confidence threshold; below it, route to review.
- Cache confirmed member-id-to-Epic-patient links in Object Store v2 keyed by payer and member id so subsequent rosters resolve deterministically.
- Never auto-create an Epic patient from a roster; unmatched members are an outreach and registration task, handled by staff.
- Re-verify a cached link when the roster demographics diverge materially from Epic, and flag suspected merges or splits.
5. Attribution reconciliation and orchestration
- Compute a true diff between the incoming roster and current Epic Group membership: adds, removes, and re-attributions, not blind overwrites.
- Add members by appending member.entity with member.period.start; retire members by setting member.inactive true and closing member.period.end, preserving history.
- Handle re-attribution as an atomic remove-from-old-panel plus add-to-new-panel so a member is never simultaneously in two accountable panels.
- Where attribution drives the PCP of record, emit an ADT A31 through Bridges so Hyperdrive shows the correct provider, not just the registry.
- Idempotency-key each Group mutation so a retried batch after a partial failure does not double-apply or thrash member.period entries.
6. Error handling and operations
- Route parse failures, match failures, and Epic write rejections to distinct Anypoint MQ dead-letter queues so each has its own reprocessing path.
- Alert on the absence of an expected roster file by its scheduled window; a missing monthly feed is the failure mode dashboards miss most often.
- Emit a per-run reconciliation report: counts of added, retired, re-attributed, matched, and quarantined members, reconciled against the file trailer.
- Make the exception queue actionable: each item carries the source line, the candidate Epic matches, and the reason it could not auto-resolve.
- Support safe replay of a single file by correlation ID after Epic downtime, relying on idempotency keys to no-op already-applied changes.
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.
- Scope the SMART backend client to Group.write and Patient.read only; a rostering client has no business reading clinical notes or writing observations.
- Encrypt landed roster files at rest and purge the raw zone on a retention clock, since 834 files carry subscriber SSNs and coverage detail.
- Log the payer, contract, and member id behind every attribution change for VBC audit, but redact SSN from application and DLQ logs.
- Segregate roster feeds by payer tenant so one payer attribution can never write into another payer panels or registries.
Sample payload — FHIR R4 Group update adding a member to an attributed panel
{
"resourceType": "Group",
"id": "panel-aco-pcp-4821",
"meta": { "versionId": "37" },
"type": "person",
"actual": true,
"code": {
"coding": [{ "system": "http://example-health.org/attribution", "code": "ACO-PRIMARY", "display": "ACO Primary Care Attribution" }]
},
"name": "Dr Alvarez ACO Attributed Panel",
"managingEntity": { "reference": "Practitioner/PRAC-2201" },
"member": [
{
"entity": { "reference": "Patient/eL9k2Qf0bXm3", "display": "Rivera, Marcus" },
"period": { "start": "2026-08-01" },
"inactive": false
}
]
}
Testing and validation
- Load a full-file roster with a member removed from a prior run and assert that member is retired with member.inactive true and a closed period, not deleted.
- Feed a re-attribution case and assert the member ends the old panel and starts the new one in a single reconciled run with no overlap.
- Replay the same file twice and assert idempotency: no duplicate member entries and no second period start on the second pass.
- Inject an ambiguous probabilistic match below threshold and assert it lands in the exception queue with candidate matches attached, not auto-applied.
- Corrupt the 834 trailer control total and assert the whole file is rejected before any Epic write occurs.
- Simulate an Epic Group.write 412 version conflict and assert the run refetches, re-diffs, and reapplies without losing history.
Phased rollout
Phase 1 — Connect
- Register the SMART backend client, confirm Group and Patient scopes in the Epic sandbox, and validate JWT client-credentials auth.
- Stand up the SFTP landing zone and pull one real de-identified payer roster end to end into the canonical model.
Phase 2 — Map and test
- Tune deterministic and probabilistic matching against a sandbox patient set and measure auto-match rate versus exception rate.
- Run reconciliation dry-runs that compute diffs and produce reports without writing to Epic, and reconcile counts against the file trailer.
Phase 3 — Production
- Enable Group writes and Bridges ADT for one payer contract and one panel, with the exception queue actively worked by staff.
- Onboard additional payers and registries once per-run reconciliation reports and SLA lag hold steady.
Success metrics
- Roster-to-panel lag: hours from file receipt to Group commit, tracked against the contract SLA.
- Auto-match rate: percent of roster members resolved to an Epic patient without human review.
- Exception queue age: oldest and median unworked exception, since stale exceptions are unaccounted-for patients.
- Reconciliation accuracy: applied adds, removes, and re-attributions versus file trailer counts, target zero unexplained variance.
- Re-attribution overlap incidents: count of members found in two accountable panels at once, target zero.
Troubleshooting
- Members silently vanish from a panel after a monthly load. — Likely cause: A delta feed was processed as a full file, so members merely absent from the delta were treated as terminations. Fix: Detect feed type from the file header or naming convention and gate the terminate-the-absent logic to full-file rosters only.
- Group.write intermittently returns HTTP 412 and the run aborts. — Likely cause: The Group was modified between read and write, so the ETag versionId no longer matches. Fix: Use optimistic concurrency: capture meta.versionId on read, retry on 412 by refetching, re-diffing, and reapplying the reconciliation.
- The same member appears twice in a panel with two period.start entries. — Likely cause: A batch was retried after a partial failure without idempotency keys, so adds re-applied. Fix: Attach an idempotency key per member mutation and no-op when the member already has an open active period for that panel.
- Exception queue balloons after onboarding a new payer. — Likely cause: The payer uses a member-id namespace not yet mapped, so deterministic matching misses and everything falls to probabilistic review. Fix: Register the payer identifier system in the normalization config and seed the link cache from any existing coverage records in Epic.
Deliverable: A deployable Anypoint Platform blueprint that ingests external attribution and roster feeds, matches members to Epic patients, and maintains Epic panels/registries via Group FHIR resources and Bridges HL7v2, with reconciliation and dead-letter recovery.