System Architecture
Every layer of the DenialsDX platform — what it is, what's inside it, and how the pieces connect to deliver consultant-grade denial management.
28
Pipeline Modules
26
Knowledge Bases
20+
Database Tables
15
Pipeline Steps
15
Client Templates
40+
API Endpoints
Client Data
CSV / Excel / 835 / FHIR
Ingest & Normalize
4 parsers, 1 router
Analysis Engine
15-step pipeline
Knowledge Bases
26 JSON files
Supabase DB
20+ tables, RLS
Web Platform
Next.js, 40+ APIs
Client Data Layer
Input — Where it all starts
Raw denial data from the client's billing system. DenialsDX accepts four industry-standard formats. Each is auto-detected and routed to the right parser — the client doesn't need to do anything special.
CSV / Excel
Standard denial exports from any billing system. 28-column template provided.
ANSI X12 835
Electronic remittance advice. Automatically parsed for CARC/RARC codes and payment details.
FHIR R4 Bundles
ExplanationOfBenefit JSON bundles from modern EHR systems.
15 Client Templates
Intake questionnaire, data submission, feedback forms, evidence templates, ROI models, and more.
Ingestion Layer
Format Detection & Normalization
Automatically detects the file format, routes it to the correct parser, and normalizes everything into a single unified schema. After normalization, every downstream module sees the same clean data regardless of how it came in.
Ingest Router
Auto-detects CSV, Excel, 835, or FHIR. Routes to the right parser.
CSV / Excel Parser
Validates required columns, maps headers, standardizes fields.
835 Parser
Extracts CARC/RARC codes, payment amounts, claim-level detail from X12 segments.
FHIR R4 Parser
Processes ExplanationOfBenefit bundles into denial records.
Normalizer
Standardizes codes, dates, amounts. Deduplicates. Flags data quality issues. 684 lines of cleaning logic.
Analysis Pipeline
Core Engine — 28 modules, ~29,000 lines
The heart of DenialsDX. A 15-step pipeline that analyzes denial data, generates findings using a 3-tier rule system, then enriches every finding with six domain-specific layers before scoring and synthesizing into workstreams. This is what replaces the consultant.
Core Analysis
Analyzer
50+ KPIs: denial breakdowns, signals, financial exposure, appeal gaps, root cause, aging, trends.
3-Tier Rule Engine
Tier 1: Signal-driven. Tier 2: KB-driven CARC rules. Tier 3: Behavioral/cross-cutting patterns.
LLM Enrichment
AI-synthesized root-cause diagnoses, prevention strategies, appeal strategies, EMR build recommendations.
6 Enrichment Layers
CMS Coverage
NCD/LCD coverage rules, SAD exclusions, medical necessity documentation, appeal success rates.
Payer Intelligence
Prior auth requirements, timely filing limits, payer behavior profiles for 27 major payers.
MA Clinical Criteria
Medicare Advantage plan-specific criteria (InterQual/MCG), CMS-0057-F compliance, peer-to-peer availability.
Regulatory & Audit Risk
OIG work plan items, CERT findings, MAC review priorities, RAC focus areas, HRRP/HAC/2-Midnight rules.
Coding Edits
NCCI PTP edits, MUE limits, modifier guidance, 837 claim element mapping, payment indicators.
Facility Guidance
Facility-type-specific rules (acute, CAH, ASC, SNF, etc.), MAC regional LCD by state.
Inference & Scoring
Root Cause Engine
Generates competing hypotheses with evidence chains (for/against/needed) and confidence tiers.
Opportunity Scoring
Composite score (0–100) using 5 weighted factors. Assigns tiers, action types, ROI projections.
Workstream Synthesis
Groups related findings into enterprise workstreams with phased implementation plans.
Output Generation
Report Generator
Excel workbook (26 columns) + Word action plan with CMS refs, payer auth, coding edits, and more.
Appeal Templates
Per-finding appeal letter templates with CARC-specific arguments, CMS citations, payer rules.
ROI Model
3-year financial projections with industry benchmarks (HFMA, Optum, MGMA).
Discovery PDF
Renders discovery packages (shadow guides, EMR checklists, interview guides) as PDF deliverables.
Knowledge Base Layer
26 JSON Knowledge Bases — Domain Intelligence
All domain logic lives here, not in code. CARC/RARC codes, payer behaviors, CMS coverage, regulatory rules, coding edits, facility rules — everything the pipeline needs to produce expert-level findings. Updated independently of the code; changes propagate to every analysis automatically.
CARC/RARC Master KB
308 CARC codes: denial categories, preventability, payer prevalence, appeal strategy, root causes, facility notes.
CARC+RARC Combinations
266 pairings with clinical meaning, appeal strategy, Epic build actions, recovery probability.
RARC Registry
1,180 Remittance Advice Remark Codes across 9 categories with RCM actions.
Payer Profiles
26 payer denial profiles, prior auth rules, timely filing limits, behavior patterns.
CMS Coverage
20 NCDs + 10 LCDs, SAD exclusion list, medical necessity documentation requirements.
MAC Regional Rules
7 MACs, 49 LCDs, all 50 states mapped to regional coverage determinations.
Regulatory Intelligence
OIG work plan (17 items), CERT findings, RAC topics, CMS enforcement actions, compliance rules.
MA Clinical Criteria
Medicare Advantage plan-specific clinical criteria, documentation requirements, appeal paths.
Coding Edit Rules
86 NCCI PTP pairs, 43 MUE limits, modifier rules, add-on rules, global surgery rules.
Payment Indicators
OPPS status indicators, APC packaging, MPFS indicators, site-of-service differentials.
Claim Schemas
UB-04/837I (147 entries) + CMS-1500/837P (52 entries) with loop references, validation rules.
Governance & Provenance
KB versioning schema, 28 authoritative sources, refresh schedules, evidence tier classifications.
Database Layer
Supabase PostgreSQL — Multi-Tenant, RLS-Protected
All pipeline outputs, client data, discovery context, and platform state are stored in Supabase with Row-Level Security (RLS). Every client only sees their own data. Admins see everything. 24 migrations have shaped the schema through development.
organizations
Tenant boundary. Name, tier, NPR range, engagement status. Every table links back here for RLS.
users
Auth users with roles (admin/client) linked to organizations.
assessments
One per pipeline run. Tracks upload metadata, findings count, status.
findings
Phase 1 output. Denial patterns with context gaps identifying what org info is needed.
recommendations
Phase 4 output. Prescriptive actions with people/process/technology frameworks and ROI.
discovery_packages
Shadow guides, EMR checklists, interview guides, policy reviews per validated finding.
org_context
Organization-specific data from discovery: workflow observations, EMR configs, staffing, payer contracts.
action_items & initiatives
Implementation tracking. Tasks tied to recommendations with owners, due dates, workstream grouping.
appeals
Appeal status tracking: pending, won, lost — with outcome dates and recovery amounts.
kpis
Real-time metrics: denial rate, appeal rate, recovery amount, prevention wins.
notification_log & audit_log
Alerts (spike, payer, milestone) and full audit trail of platform actions.
regulatory_updates
CMS/payer policy changes: NCDs, LCDs, bulletins, federal register entries.
Web Platform
Next.js — Client & Admin Interfaces, 40+ API Endpoints
The live platform clients use daily. Two portals: a client-facing denial management dashboard and an admin control panel. Connected to Supabase via 40+ API routes. Every action is RLS-protected and audit-logged.
Client Portal
Denials Dashboard
Real-time denial metrics, KPIs, attention items, trend visualization.
Discovery Center
Manage discovery sessions, conduct guided research, submit context findings.
Implementation Workplan
Track recommendation execution, assign owners, monitor progress by workstream.
AI Copilot
Conversational interface for denial questions, strategy advice, data exploration.
ROI & Reporting
ROI projections, executive dashboards, payer profiles, benchmarking.
Coverage Intel
Live CMS coverage intelligence, regulatory updates, payer bulletins.
Admin Panel
Client Management
Onboard new clients, view org details, manage engagement status.
Assessment Inventory
Track all pipeline runs, review outputs, manage assessment lifecycle.
Benchmarks & Notifications
Industry benchmark management, notification log, system monitoring.
Agent & Automation Layer
AI Agents, Scheduled Skills, Integrations
Autonomous agents that monitor, enrich, and act on behalf of DenialsDX. CMS coverage monitoring, payer intelligence, regulatory tracking, weekly digests — plus 11 automation skills for pipeline operations.
CMS Coverage Agent
Monitors NCD/LCD changes, flags coverage impacts for active findings.
Payer Intel Agent
Tracks payer behavior changes, prior auth updates, filing limit changes.
Regulatory Monitor
Scans CMS, OIG, Federal Register for regulatory changes impacting denial management.
Weekly Digest Agent
Generates executive-level weekly summaries of denial trends, actions, and outcomes.
11 Pipeline Skills
Automated skills: pipeline runs, data sync, client onboarding, KB health checks, deliverable packaging, ROI updates.
Epic/EHR Integration
OAuth-based Epic FHIR integration for direct EHR data ingestion.
End-to-End Process Flow
The complete DenialsDX journey — from first contact to ongoing denial management. Every step, who's involved, and what happens behind the scenes.
01
BAA & Intake
Client signs Business Associate Agreement. Completes the intake questionnaire covering org profile, EMR configuration, payer mix, department structure, and current denial management processes.
Client
Admin
02
Discovery Readiness
Client completes 22-item Discovery Readiness Scorecard. Verifies they have the access, personnel, documents, and systems needed for a successful engagement. Go/No-Go gate before proceeding.
Client
03
Data Submission
Client submits denial data using the 28-column template (or raw 835/FHIR files). Data is uploaded through the platform or provided directly. Format is auto-detected by the ingest router.
Client
Platform
04
Org & User Setup
Admin creates the organization in Supabase, sets up user accounts, configures RLS boundaries, and creates the assessment record. Client gets portal access.
Admin
Platform
05
Ingest & Normalize
Ingest router detects file format, routes to correct parser (CSV, Excel, 835, or FHIR). Normalizer standardizes codes, dates, amounts. Deduplicates records. Flags data quality issues. Output: clean, unified DataFrame.
Pipeline
06
Analyze
Generates 50+ KPIs: denial breakdowns by payer, CARC code, category, department. Identifies trigger and watch signals. Calculates financial exposure, appeal gaps, root cause distribution, aging analysis, trend detection.
Pipeline
07
3-Tier Rule Engine
Generates findings using three tiers of rules. Tier 1: signal-driven (category thresholds, payer outliers, appeal gaps). Tier 2: KB-driven CARC rules. Tier 3: behavioral patterns (write-offs, provider outliers, denial spikes). Confidence capped at Medium.
Pipeline
Knowledge Bases
08
LLM & KB Enrichment
Each finding is enriched with AI-synthesized root-cause diagnoses, prevention strategies, appeal strategies, and documentation requirements — all grounded in knowledge base data.
Pipeline
Knowledge Bases
AI Agent
09
6 Enrichment Layers
Each finding runs through all six enrichment modules: CMS coverage, payer intelligence, MA clinical criteria, regulatory/audit risk, coding edits, and facility-type guidance. Each adds domain-specific context from the knowledge bases.
Pipeline
Knowledge Bases
10
Score & Synthesize
Root cause engine generates competing hypotheses. Opportunity scoring assigns 0–100 composite scores (financial value, preventability, feasibility, recurrence, confidence). Synthesis groups findings into enterprise workstreams.
Pipeline
11
Write to Platform
Supabase writer pushes all findings, enrichment data, KPIs, and analysis results to the database. Generates Excel workbook and Word action plan. Findings appear in the client portal immediately.
Pipeline
Platform
12
Review Findings
Client reviews each finding in the platform. Each finding shows the denial pattern, context gaps (what the engine still needs to know), opportunity score, and initial root cause hypothesis.
Client
Platform
13
Validate & Add Context
Client confirms or rejects each finding using the Finding Validation Form. Adds initial context notes — "yes, we know about this" or "this doesn't apply because..." Only confirmed findings proceed to discovery.
Client
14
Discovery Packages Generated
The engine generates a discovery package per validated finding. Each package contains four research tools: a workflow shadow guide, an EMR checklist, an interview guide, and a policy review template — all tailored to that specific finding.
Pipeline
Platform
15
Client Conducts Discovery
Client uses the discovery packages to investigate each finding within their own org. Shadows workflows, reviews EMR configurations, interviews staff, checks payer contracts. This is the "boots on the ground" work that makes recommendations org-specific.
Client
16
Context Flows Back
Client submits discovery findings: meeting transcripts, document text, EMR screenshots, workflow observations. Agent processes them into typed org_context records (workflow observation, EMR config, policy gap, staffing, payer contract, etc.).
Client
AI Agent
Platform
17
Engine Re-Run
The full 15-step pipeline re-runs — but now with the client's org context data. Confidence can reach High. Depth shifts from "finding" to "recommendation." Every enrichment layer re-evaluates with the additional context.
Pipeline
Knowledge Bases
18
Deep Recommendations
Output: prescriptive, org-specific recommendations with people/process/technology frameworks, specific implementation steps, owners, timelines, and projected ROI. These replace the Phase 1 findings with actionable strategy.
Pipeline
Platform
19
Client Reviews Recommendations
Client reviews recommendations via Recommendation Feedback Form. Accept, reject, or defer each recommendation. Accepted recommendations generate action items and flow into the implementation workplan.
Client
Platform
20
Implementation Tracking
Accepted recommendations become action items in the workplan. Each has an owner, due date, priority, and status. Grouped into initiatives (workstreams). Progress is tracked with evidence submission templates.
Client
Platform
21
ROI Measurement
Denial outcomes tracked via outcome return template. KPIs auto-computed: denial rate changes, recovery amounts, prevention wins. Executive dashboard provides monthly CFO retention artifact with trend tracking.
Client
Platform
22
AI Copilot & Agents
AI copilot available for real-time denial questions. Agents monitor CMS coverage changes, payer bulletins, and regulatory updates. Weekly digests summarize trends and flag items needing attention.
AI Agent
Platform
23
Continuous Refinement
New denial data submissions trigger fresh pipeline runs. Recommendations refine as more org context accumulates. Appeal outcomes feed back into the knowledge base. The system gets smarter over time.
Pipeline
Platform
Knowledge Bases
How Layers Interact
The connections between each system layer — what feeds what, which direction data flows, and why each connection matters.
Client → Ingestion
Client uploads denial file (CSV, Excel, 835, or FHIR)
→ Ingest router auto-detects format
→ Routes to correct parser
→ Normalizer cleans and standardizes
→ Output: unified DataFrame
→ Ingest router auto-detects format
→ Routes to correct parser
→ Normalizer cleans and standardizes
→ Output: unified DataFrame
Ingestion → Pipeline
Normalized DataFrame enters the 15-step pipeline
→ Analyzer generates 50+ KPIs
→ Rule engine produces findings
→ Enrichment layers add domain context
→ Scoring and synthesis finalize output
→ Analyzer generates 50+ KPIs
→ Rule engine produces findings
→ Enrichment layers add domain context
→ Scoring and synthesis finalize output
Knowledge Bases ↔ Pipeline
Pipeline reads from KBs at every step:
→ CARC KB feeds the rule engine
→ Payer KBs feed payer enrichment
→ CMS KB feeds coverage analysis
→ Regulatory KB feeds audit risk
→ All 26 KBs lazy-load at runtime
→ CARC KB feeds the rule engine
→ Payer KBs feed payer enrichment
→ CMS KB feeds coverage analysis
→ Regulatory KB feeds audit risk
→ All 26 KBs lazy-load at runtime
Pipeline → Database
Supabase writer pushes all outputs:
→ Findings + enrichment data
→ KPIs and analysis results
→ Discovery packages
→ Recommendations (Phase 4)
→ RLS enforces tenant isolation
→ Findings + enrichment data
→ KPIs and analysis results
→ Discovery packages
→ Recommendations (Phase 4)
→ RLS enforces tenant isolation
Database ↔ Web Platform
40+ API routes read/write Supabase:
→ Dashboard reads KPIs, findings
→ Discovery center reads/writes context
→ Workplan reads action items
→ Client writes validation, feedback
→ All queries filtered by RLS
→ Dashboard reads KPIs, findings
→ Discovery center reads/writes context
→ Workplan reads action items
→ Client writes validation, feedback
→ All queries filtered by RLS
Agents ↔ Everything
Agents connect all layers:
→ CMS agent reads live coverage data
→ Payer agent tracks behavior changes
→ Skills trigger pipeline runs
→ Copilot queries KBs + database
→ Digest agent writes to notifications
→ CMS agent reads live coverage data
→ Payer agent tracks behavior changes
→ Skills trigger pipeline runs
→ Copilot queries KBs + database
→ Digest agent writes to notifications
Client → Platform (Discovery)
During discovery, client feeds context back:
→ Uploads meeting transcripts
→ Submits EMR screenshots
→ Documents workflow observations
→ Agent processes into org_context
→ Context enables Phase 4 re-run
→ Uploads meeting transcripts
→ Submits EMR screenshots
→ Documents workflow observations
→ Agent processes into org_context
→ Context enables Phase 4 re-run
Feedback Loop
Outcomes feed back into the system:
→ Appeal wins/losses update findings
→ KPIs auto-recompute
→ New data triggers fresh pipeline runs
→ Recommendations refine over time
→ System gets smarter each cycle
→ Appeal wins/losses update findings
→ KPIs auto-recompute
→ New data triggers fresh pipeline runs
→ Recommendations refine over time
→ System gets smarter each cycle
Templates ↔ Workflow
15 templates structure every touchpoint:
→ Intake questionnaire → org setup
→ Data template → ingestion
→ Validation form → finding review
→ Evidence template → implementation
→ Outcome template → ROI tracking
→ Intake questionnaire → org setup
→ Data template → ingestion
→ Validation form → finding review
→ Evidence template → implementation
→ Outcome template → ROI tracking