code wiki / (root) / nx_fin_audit_gate.nx

nx_fin_audit_gate.nx

buildroot/runtime/nx_fin_audit_gate.nx

5852 B110 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic fin
docsdependenciesstructsconstsfunctions

about

nx_fin_audit_gate.nx -- R5 GATE: proves the medical-overbilling audit is exact + data-driven, on a cancer-treatment-style bill (date 2025-03-10): L0 99214 office visit 1u $400.00 L1 96413 chemo infusion 1u $2,000.00 L2 96413 chemo infusion 1u $2,000.00 <- DUPLICATE of L1 L3 36415 blood draw 1u $150.00 <- NCCI-bundled into 96413 (unbundling) L4 85025 CBC lab 8u $800.00 <- MUE max 3 units (5 excess) AND ~73x Medicare Packs (data, grounded on NCCI/MUE/Medicare): bundle (96413,36415); MUE (85025->3); benchmark 99214->$130, 96413->$300, 85025->$11; fair multiplier 400% (4x Medicare). Negative controls: a CLEAN bill flags nothing; raising the multiplier to 1000% drops all but the egregious lab markup -> the multiplier is a real data knob, not magic. Exits 0 iff ALL pass. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_money.nx nx_fin_audit.nx nx_fin_audit_gate.nx

imports: nx_syscalls.nxnx_money.nxnx_fin_audit.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap seti aud_duplicates mny_add g_puts sys_write g_putn sys_write ↻ sys_mmap ↻ chk g_puts ↻ g_putn ↻ aud_unbundle mny_add ↻ aud_mue aud_lookup mny_div_round mny_div_floor mny_add ↻ aud_fairprice aud_lookup ↻ mny_div_round ↻ mny_add ↻

structs

none

consts

none

functions

17func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: chkmain calls 1: sys_write
18func g_putn(v: i64) -> i64
called by 2: chkmain calls 2: sys_writesys_mmap
27func chk(name: *u8, got: i64, want: i64, st: *i64) -> i64
called by 1: main calls 2: g_putsg_putn
32func seti(a: *i64, i: i64, v: i64) -> i64 { a[i] = v; return 0 }
called by 1: main
34func main() -> i64