- Shipped
- August 25, 2026 at 6:13 PM UTC
- Author
- Kamo
- Commit
- 6af99a3
Coverage models ORDER, because a patient with two policies has a primary and a secondary and billing the wrong one first is a denial that costs a month and a resubmission. The subscriber is separate from the patient because it usually IS someone else, and payers match on the subscriber's details — a claim filed with the child's name in that field is denied for what reads like a data problem. Benefit amounts are explicitly a CACHE with an as-of date: a deductible met in March is not met after the plan year rolls, and a patient quoted from a stale cache was told the wrong number by their doctor's office. Self-pay is a real coverage row, not the absence of one — §164.522(a)(1)(vi) gives self-pay patients a right that depends on knowing the difference between "pays directly" and "we never asked". Every eligibility check is kept, with the raw 271 beside the parsed fields. When a payer denies a claim saying the patient was not covered, the practice's defence is the response that payer itself returned before the visit; storing only the latest answer throws away exactly the evidence that matters, because the latest answer is the one that agrees with the denial. A technical failure is neither a yes nor a no: treating "payer unavailable" as "not covered" turns away covered patients, and the reverse sees uncovered ones. Claims separate REJECTED from DENIED, and that distinction is most of the value. Rejected means a clearinghouse stopped it and no payer ever saw it; it goes nowhere unless someone resubmits. This is where practices lose money silently — never denied, never paid, simply stopped, with nothing failing loudly. timelyFilingDeadline is stored rather than derived because it is payer-specific and absolute: miss it and the money is gone with no appeal, usually discovered months later. Claims snapshot the identifiers they were billed with, so a patient changing insurance in March cannot retroactively change what January's claim said. Claim lines carry their own status and CARC code because payers adjudicate line by line — a claim reported as paid routinely contains a denied line, and the code determines the work: CO-97 is a coding conversation, PR-1 a patient one, CO-50 a documentation one. One status field cannot hold three different jobs. Remittance keeps unappliedAmount honest. Interest, a takeback for a claim paid last quarter, a payment for a claim this practice cannot find — these are constant, and forcing the remainder to zero by adjusting something is how a ledger stops being trustworthy. Posting to claims and matching the bank are tracked separately, because the second is the half nobody does. PriorAuthorization tracks units used, because authorizations are granted for a COUNT and the thirteenth of twelve is denied — discovered when the denial arrives, after care was delivered that cannot be billed to the payer OR to the patient. 1827 tests green.