Solution Architecture
Map to a shared logical model, not column-to-column
A PBM's physical structures are a snowflake — no standard governs them. So mappings can't be looked up; they must be derived and proven. We anchor every field to a shared logical meaning, calibrate on what's already known, then map the new source with confidence.
The problem
Swap the engine without changing the dashboard
The core idea
Physical → logical → Gold
NCPDP is very different from any vendor's physical structures — but it's an excellent way to define the logical model and concepts for claims. Both sources resolve to the same logical meaning; the mapping then follows with a reason, not a guess. (Claims-scoped: EmpiRx's proprietary Gold structures — accumulators, pricing, rebates — use the Gold contract itself as the anchor.)
Physical sources
Vendor-specific, 100% different
- A · ING_CST_SUB (cents)
- A · TX_STAT_CD (1/2/3)
- B · pricing.ingredientCost
- B · status ("PAID")
Logical model (NCPDP concepts)
The stable "meaning" layer
- ● Ingredient Cost Submitted (409-D9)
- ● Patient Pay Amount (505-F5)
- ● Gross Amount Due (430-DU)
- ● DAW · NDC · Days Supply …
Gold contract (unchanged)
Databricks · claims_fact
- ingredient_cost ($)
- patient_pay_amount ($)
- claim_status (PAID/…)
- gross_amount_due ($)
Calibrate-first ties it together: prove the agents hit the target on the known source (Tredium→Gold) before trusting them on the new one (RxLogic→Gold).
The agent fleet
Seven cooperating agents
Each is model-driven reasoning + explicit checks + a human gate. Six build the migration; the seventh runs forever after — the recurring data-ops opportunity.
Lineage Excavator
Reads Databricks Unity Catalog lineage + pipeline SQL to derive the current source→Gold mapping — the calibration truth.
Logical-Model Mapper
Resolves each physical field (both sides) to its NCPDP logical concept. The shared anchor that makes confidence defensible.
Mapping & Confidence
Per Gold column: Direct / Probable / Gap with a confidence score and explicit type, unit, and value-domain checks. Gaps flagged.
Exception QA
Second-level review of every low-confidence item — confirm, adjust, or reject in favor of an honest Gap.
Transform / Pipeline Gen
Emits the Bronze→Silver→Gold transforms, Databricks-native, from the approved mappings.
DQ & Reconciliation
Medallion data-quality checks + a parallel-run regression that proves member-neutral adjudication — “$2 stays $2.”
Data-Ops Guardian
The recurring franchise: pre-flight data-contract checks, source schema-drift detection, and reasoning about failures instead of “just rerun the job.”
The live demo runs agents 1, 3, and 4 on synthetic data. Agents 2, 5, 6, 7 are shown here conceptually and built out in the engagement.
Mapped onto the medallion
Where each agent works, and the data-quality gate
| Layer | What happens | Agents | DQ gate |
|---|---|---|---|
| Bronze | Land RxLogic raw, reconciled to source | 1, 5, 7 | source = bronze row counts; every source column landed |
| Silver | Cleanse + conform to the Gold contract via the logical model | 2, 3, 4, 5 | casts valid (no silent null-on-fail); coded values valid |
| Gold | Commingle RxLogic alongside Tredium; no schema change | 5, 6 | grain match; tagged to source; unfilled cols explicitly null; cost/qty reconcile |
| Downstream | Existing reports unchanged post-commingle | 6 | Platform-A reports identical; cross-source queries correct |
Two opportunities
Migration now, franchise next
One-time
The migration
Move the feed from Tredium → RxLogic into the same Gold model, proven member-neutral. The foot in the door.
Recurring · bigger prize
The data-ops franchise
The same agents run forever after — contract-aware orchestration, schema-drift detection — replacing the daily pipeline-failure firefight. Recurring revenue, and a reusable accelerator for the next middle-market PBM.
Governance
Human-in-the-loop, inside Bounteous Arc
Agents draft ~80%; anything below the confidence threshold or classified Probable/Gap routes to a pharmacist + implementation-lead review. Every rule the agents produce is logged with its reasoning and the checks it passed — an audit trail of every mapping, with confidence distributions and reconciliation deltas as the dashboard.
See it run on synthetic data
Calibrate → map the new source → QA the exceptions, live.