AI Engineering · Healthcare
Pre-payment in days, not weeks · denial risk scored before submission
An EDI 837 claims pipeline built on AWS — rules + RAG scrubber, XGBoost + LLM denial risk model, and ISO 20022 pre-payment — so the health network receives cash before the insurer even processes the claim.
Challenge
EDI claims take weeks to months to settle. Manual review overwhelmed the revenue cycle team, denial rates were climbing, and cash flow was hostage to insurer turnaround times that the health network had no control over.
Approach
Built a four-stage pipeline: EDI 837 ingestion via Stedi, automated rules + RAG scrubber to catch denial risk before submission, XGBoost + LLM denial risk scoring, and ISO 20022 pre-payment calculation that decouples cash flow from insurer settlement timelines.
Outcome
The health network now receives pre-payment days after claim submission rather than waiting for insurer settlement. Denial risk is scored at the point of submission, not discovered at rejection. The revenue cycle team reviews exceptions rather than processing every claim.
The background
The health network was processing thousands of claims monthly across institutional (837I) and professional (837P) billing. The bottleneck wasn't generation — it was what happened after. Claims entered the insurer's adjudication queue and the health network waited. Typical settlement cycles ran 30 to 90 days, with denied claims requiring rework before resubmission added another cycle on top. The revenue cycle team spent the majority of their time on manual review: checking scrubbing errors, reconciling denied claims, and chasing down payer responses that arrived weeks after submission.
A secondary problem was visibility. Denial risk was only discovered at rejection — by which point the claim had already been submitted, the adjudication clock was running, and a rework cycle was guaranteed. There was no mechanism to score a claim's likelihood of denial before it left the system. Both problems — slow settlement and reactive denial management — were rooted in the same architecture: a passive pipeline that submitted claims and waited, with no intelligence between submission and outcome.
The challenge
What was built
Rather than patching the existing scrubbing layer, Adimen designed the pipeline from the ground up — with pre-payment as the architectural goal, not an afterthought.
Claims arrive as HIPAA X12 837I and 837P transactions via Stedi's real-time EDI API. A custom parser built on EDIFabric handles the full transaction set — claim headers, service lines, diagnosis codes, NPI validation — and normalises the output into a canonical JSON structure consumed downstream. Malformed transactions are quarantined and flagged for review without blocking the pipeline.
Each parsed claim runs through a two-layer scrubber. The first layer applies rules-based checks against HIPAA X12 edit sets and payer-specific billing requirements. The second uses a RAG pipeline against a vector store of historical denial reasons — retrieving similar past claims and their outcomes to surface payer-specific denial patterns that rules alone cannot catch. Claims flagged at this stage are corrected or routed before submission.
Scrubbed claims are scored by an XGBoost model trained on 18 months of historical adjudication data, enriched by an LLM layer that extracts features from free-text fields — clinical notes, remarks codes, authorisation text. The model outputs a denial probability score and the top contributing factors (via SHAP), giving reviewers an actionable signal rather than just a flag. High-risk claims are held for review; low-risk claims proceed automatically.
Low-risk claims trigger an ISO 20022-compliant pre-payment calculation using contracted fee schedules and adjudication history to estimate the expected reimbursement. The calculated amount is transmitted to the health network's treasury system for same-day funding. When the actual insurer settlement arrives, the delta is reconciled automatically. The result: cash flow decoupled from insurer turnaround timelines.
Architecture
Results