Skip to main content

Function: resolvePayerFromBillingPayers()

resolvePayerFromBillingPayers(payerName, rows, activeFacilityIds): PayerResolution

Defined in: src/lib/facility-match/index.ts:157

Resolve a payer to its facility set from the admin-managed billing_payers rows -- the runtime source of truth (DEFAULT_PAYER_RULES/resolvePayerFacilities is only the pre-seed fallback used before any rows exist). All matching rows union their facilities; any coversAll row makes the payer span every active facility (a management company). No match -> 'unmatched' so the UI asks an admin to map the payer rather than guessing.

Parameters

payerName

string | null | undefined

rows

readonly BillingPayerRow[]

activeFacilityIds

readonly string[]

Returns

PayerResolution