Healthcare Denial Management

Remittance-to-claim matching, denial pattern analysis, and automated appeal drafting. Revenue cycle teams spend 65+ hours per week on denials — most of which follow predictable patterns that an agent can identify, analyze, and draft responses for.

What Gets Automated

Matching ERA/835 remittance records to submitted claims. Parsing denial reason codes (CARC/RARC). AI agent analyzes denial patterns, cross-references payer-specific rules, identifies root causes, and drafts appeal letters with supporting documentation references.

What Humans Still Own

Final review of appeal language before submission. Payer negotiation on contested amounts. Process changes based on systemic denial patterns.

Pipeline

flowchart TD A[Input: Remittances + Submitted Claims] --> B[Matcher: Remittance-to-Claim] B -->|Paid in full ~45%| C[Close Claim] B -->|Denied or underpaid ~55%| D[Parse Denial Codes] B -->|No remittance found| E[Flag: No Response] D --> F[ReAct Agent: Denial Analysis] F --> F1[Decode CARC/RARC codes] F1 --> F2[Check payer-specific rules] F2 --> F3[Search prior appeal outcomes] F3 -->|Correctable| G[Draft Corrected Claim] F3 -->|Appealable| H[Draft Appeal Letter] F3 -->|Non-recoverable| I[Recommend Write-Off] G --> J[Human Review: RCM Analyst] H --> J I --> J J -->|Approve| K[Submit to Clearinghouse] J -->|Revise| L[Edit + Resubmit] C --> M[Custom Table: Denial Tracking] K --> M L --> M E --> M style B fill:#e8a84c,color:#09090b,stroke:none style F fill:#4ade80,color:#09090b,stroke:none style J fill:#60a5fa,color:#09090b,stroke:none

Workflow Definition

json
{
  "name": "denial_management",
  "definition": {
    "actions": [
      {
        "type": "matcher",
        "properties": {
          "left": "@input.submitted_claims",
          "right": "@input.remittances",
          "matchOn": ["claim_id", "payer_id"],
          "tolerance": 0.005,
          "dateWindowDays": 90,
          "outputMatched": "remittance_matched",
          "outputUnmatchedLeft": "no_response_claims",
          "outputUnmatchedRight": "unmatched_remittances"
        }
      },
      {
        "type": "loop",
        "properties": {
          "mode": "foreach",
          "items_path": "@remittance_matched",
          "item_variable_name": "pair",
          "actions_to_execute": [
            {
              "type": "loop",
              "filter": {
                "condition": {
                  "notEqual": ["@pair.b.payment_status", "paid_in_full"]
                }
              },
              "properties": {
                "mode": "react",
                "objective": "Analyze denial for claim {{pair.a.claim_id}}. Payer: {{pair.b.payer_name}}. Denial codes: {{pair.b.denial_codes}}. Billed: ${{pair.a.billed_amount}}. Paid: ${{pair.b.paid_amount}}. Steps: 1) Parse CARC/RARC codes and identify denial category, 2) Look up payer-specific rules for this denial type, 3) Search for prior appeals on same denial pattern and their outcomes, 4) Classify as correctable (resubmit with fix), appealable (submit appeal), or non-recoverable (write off), 5) If correctable or appealable, draft the response citing contract terms and clinical rationale.",
                "tools": [
                  { "type": "action", "name": "lookup_denial_codes" },
                  { "type": "action", "name": "get_payer_rules" },
                  { "type": "action", "name": "search_denial_history" },
                  { "type": "action", "name": "get_clinical_documentation" },
                  { "type": "action", "name": "draft_appeal_letter" }
                ],
                "max_iterations": 10,
                "on_stuck": {
                  "iterations": 4,
                  "action": "escalate"
                },
                "result_key": "denial_analysis"
              }
            }
          ],
          "max_concurrency": 5,
          "failure_strategy": "continue_on_error",
          "collect_results": true,
          "result_key": "all_analyses"
        }
      },
      {
        "type": "PbotApproval",
        "properties": {
          "comment": "Denial analyses complete. Review appeal drafts, corrected claims, and write-off recommendations before submission.",
          "request_payload": {
            "total_matched": "@remittance_matched.length",
            "no_response": "@no_response_claims.length",
            "analyses": "@all_analyses"
          }
        }
      },
      {
        "type": "custom-table",
        "properties": {
          "table": "denial_tracking",
          "operation": "write",
          "keys": ["batch_id", "run_date"],
          "values": ["@__run_id", "@now"],
          "fields": {
            "claims_analyzed": "@remittance_matched.length",
            "no_response_flagged": "@no_response_claims.length",
            "status": "completed"
          }
        }
      }
    ]
  }
}

Required Registered Actions

Action Kind Purpose
lookup_denial_codes db Translate CARC/RARC codes to reasons and appeal guidance
get_payer_rules http Retrieve payer-specific billing and appeal rules
search_denial_history db Find prior denials with same codes for pattern detection
get_clinical_documentation http Pull relevant clinical notes for appeal support
draft_appeal_letter llm Generate appeal letter from denial analysis and documentation

The draft_appeal_letter action is an LLM action — it generates text using an AI model. The agent uses it as a tool to produce appeal drafts that the human reviewer edits before submission.

## Customization Notes

Date window. 90 days covers typical payer response timelines. Some payers may take longer — adjust based on your payer mix.

Tolerance. The tight 0.5% tolerance (0.005) is appropriate for claims where payment amounts should closely match billed amounts. Widen for payers with known contractual adjustment patterns.

Prior appeal search. The search_denial_history action is critical for pattern detection. The agent uses historical appeal outcomes to predict which denials are worth appealing vs. writing off.

Concurrency. 5 concurrent analyses balances throughput with the need for sequential tool calls within each denial investigation.