After triage, every service line is assigned an appeal deadline, an urgency score, and a priority score — all deterministically, with no model calls. These three values drive the order of the denial work queue: the billing team sees the lines that need attention soonest, weighted by their financial recovery potential, at the top of the list. The algorithm is implemented inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sputhenofficial/claimjumper/llms.txt
Use this file to discover all available pages before exploring further.
lib/pipeline/prioritize.ts and is fully covered by regression tests.
Appeal deadline calculation
The deadline is calculated from the remittance’snotice_date using two constants that model the Medicare Part A/B redetermination window:
| Constant | Value | Purpose |
|---|---|---|
RECEIPT_PRESUMPTION_DAYS | 5 | Assumed days from notice date to provider receipt |
REDETERMINATION_DAYS | 120 | Standard redetermination filing window |
noticeDate is an ISO calendar date string (e.g. "2025-03-01"). The function returns the deadline as an ISO calendar date string. All arithmetic is performed in UTC to avoid daylight-saving edge cases.
The deadline is a conservative approximation for triage and queue-ordering purposes. Actual payer-specific deadlines — including Medicare Advantage, Medicaid, and commercial payer rules — vary significantly and must be verified by the billing team before acting on any line.
Urgency score
Urgency is a0–1 value that increases as the deadline approaches. It is calculated using the URGENCY_SCALE_DAYS constant (125), which equals the total presumed window from notice date to deadline.
Formula:
daysRemaining is the number of calendar days from today to the deadline.
- A line with 125 or more days remaining → urgency
0.0(no time pressure) - A line with 0 days remaining → urgency
1.0(at the deadline) - A line past the deadline → urgency clamped to
1.0 - A line with 62 days remaining → urgency ≈
0.50
Priority score
The priority score combines three signals: how much money is at stake, how likely recovery is, and how urgently the deadline is approaching. Formula:| Factor | Source | Notes |
|---|---|---|
billed_amount | AdjustmentLine.billed_amount | The provider’s charged amount for the line |
recovery_probability | DenialTriage.recovery_probability | Model-estimated 0–1 probability of successful recovery |
urgency | Calculated above | 0–1 time-pressure score |
Sort order
prioritize() returns lines in the following order:
Sort by deadline ascending
Lines with the soonest deadline appear first. A line due in 10 days always precedes a line due in 60 days, regardless of dollar value.
prioritize() function
The full function signature and sort logic from lib/pipeline/prioritize.ts:
PrioritizeInput is { line: AdjustmentLine; triage: DenialTriage }. The output is an array of PrioritizedLine objects, each carrying the original line and triage data alongside the three computed values (deadline, urgency, priority_score).
The deadline calculation is a conservative approximation for triage purposes. Actual payer-specific deadlines must be verified by the billing team before acting on any denial.