code wiki / (root) / nx_medbill_nsa.nx

nx_medbill_nsa.nx

buildroot/runtime/nx_medbill_nsa.nx

5551 B75 linesdepth 3pulls 3 transitivereach 4 importersview sourcekind librarytopic medbill
docsdependenciesstructsconstsfunctions

about

nx_medbill_nsa.nx -- ADV3 of the MEDICAL BILLING & PATIENT ADVOCACY ladder: classify a billing SITUATION to the federal protection that actually applies, then render the matching letter. Routes: 1 = NSA emergency (insured, emergency care from an out-of-network provider: balance billing prohibited, cost sharing limited to in-network) · 2 = NSA facility (insured, non-emergency care from an out-of-network provider AT an in-network facility: same protection) · 3 = PPDR (UNINSURED/self-pay with a Good Faith Estimate, billed substantially in excess -- the federal Patient-Provider Dispute Resolution process, 120-day window from the bill date) · 4 = standard dispute/appeal path (no situation-specific federal shield; use the audit/dispute/appeal organs). The substantially-in-excess THRESHOLD is caller data (federal figure today: $400 = 40000 cents), never hardcoded (#11). Flags bundle (i64 array): [0]=emergency [1]=oon_provider [2]=in_network_facility [3]=insured [4]=has_gfe. FAIL-SAFE: letters go to a caller buffer with placeholders; nothing is ever sent. Deadline math reuses the appeal organ's exact leap-safe civil-days calendar (DRY). license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_medbill_appeal.nx nx_medbill_nsa.nx nx_healthhelp_site.nx nx_medbill_cli.nx nx_medbill_nsa_gate.nx

imports: nx_syscalls.nxnx_medbill_appeal.nx

imported by: nx_healthhelp_site.nxnx_medbill_cli.nxnx_medbill_nsa_gate.nx

structs

none

consts

none

functions

16func nsa_classify(flags: *i64, over_cents: i64, threshold: i64) -> i64
called by 2: cli_nsamain
25func nsa_n(out: *u8, off: i64, v0: i64) -> i64
called by 1: nsa_money calls 1: sys_mmap
36func nsa_money(out: *u8, off: i64, cents: i64) -> i64
called by 1: nsa_letter calls 2: nsa_nmba_n2
48func nsa_letter(route: i64, over_cents: i64, bill_ymd: i64, out: *u8) -> i64