nx_healthhelp_site.nx source
↩ module page · 91 lines · 9814 B
1// nx_healthhelp_site.nx -- M6 of the MEDICAL BILLING & PATIENT ADVOCACY ladder: the /healthhelp PORTAL
2// generator (the May-2026 healthhelp promise, rebuilt sovereign). hh_page emits a complete zero-JS,
3// no-form, no-PHI static page whose letter templates are produced BY THE SAME GATED ENGINES the CLI
4// uses (nx_fin_dispute / nx_medbill_appeal / nx_medbill_charity / nx_medbill_nsa / nx_medbill_civic)
5// -- single source: the published patterns can never drift from the tested organs. Phase 1 = education
6// + copyable patterns ONLY: no script tags, no external srcs, no inputs; nothing is collected, nothing
7// is sent (the no-PHI doctrine from the original healthhelp scaffold, kept by construction).
8// nx_cc traps honored: no '#'/'!'/'"' in literals (rgb() colors, byte-33 doctype, single-quote HTML
9// attributes). license_tier: ORIGINAL
10import "nx_syscalls.nx"
11import "nx_fin_dispute.nx"
12import "nx_medbill_appeal.nx"
13import "nx_medbill_charity.nx"
14import "nx_medbill_nsa.nx"
15import "nx_medbill_civic.nx"
16const K_MAGIC_16384: i64 = 16384
17const K_MAGIC_96413: i64 = 96413
18const K_MAGIC_20250310: i64 = 20250310
19const K_MAGIC_200000: i64 = 200000
20const K_MAGIC_40000: i64 = 40000
21const K_MAGIC_50000: i64 = 50000
22
23func hh_c(out: *u8, off: i64, s: *u8) -> i64 {
24 var o: i64 = off
25 var i: i64 = 0
26 while s[i] != (0 as u8) { out[o] = s[i]; o = o + 1; i = i + 1 }
27 return o
28}
29func hh_b(out: *u8, off: i64, b: i64) -> i64 { out[off] = b as u8; return off + 1 }
30
31// one letter section: heading + context line + the REAL engine output in a <pre>
32func hh_sec(out: *u8, off: i64, title: *u8, ctx: *u8, letter: *u8) -> i64 {
33 var o: i64 = off
34 o = hh_c(out, o, "<h2>\x00" as *u8)
35 o = hh_c(out, o, title)
36 o = hh_c(out, o, "</h2>\n<p>\x00" as *u8)
37 o = hh_c(out, o, ctx)
38 o = hh_c(out, o, "</p>\n<pre>\x00" as *u8)
39 o = hh_c(out, o, letter)
40 o = hh_c(out, o, "</pre>\n\x00" as *u8)
41 return o
42}
43
44func hh_page(out: *u8) -> i64 {
45 var o: i64 = 0
46 // <!DOCTYPE html> without '!' in a literal
47 o = hh_b(out, o, 60)
48 o = hh_b(out, o, 33)
49 o = hh_c(out, o, "DOCTYPE html><html lang='en'><head><meta charset='utf-8'><meta name='viewport' content='width=device-width, initial-scale=1'><title>Nishi HealthHelp - getting your medical bill right, together</title><style>body{font-family:system-ui,sans-serif;max-width:760px;margin:2rem auto;padding:0 1rem;color:rgb(28,32,38);background:rgb(250,250,248)}h1{font-size:1.7rem}h2{font-size:1.15rem;margin-top:2rem;border-bottom:2px solid rgb(180,160,90);padding-bottom:.2rem}pre{background:rgb(245,242,232);border:1px solid rgb(210,200,170);border-radius:6px;padding:1rem;white-space:pre-wrap;font-size:.85rem;line-height:1.45}ol li{margin:.35rem 0}table{border-collapse:collapse}td,th{border:1px solid rgb(200,200,190);padding:.35rem .6rem;font-size:.9rem}.note{background:rgb(240,246,240);border-left:4px solid rgb(90,140,90);padding:.6rem .8rem;font-size:.9rem}.foot{margin-top:2.5rem;font-size:.8rem;color:rgb(90,95,100)}</style></head><body>\n\x00" as *u8)
50 o = hh_c(out, o, "<h1>Nishi HealthHelp</h1>\n<p><strong>Free patterns for working with your provider and your plan to get a wrong medical bill corrected.</strong> Most billing errors are fixable when both sides can see the same facts - these patterns put the facts on the table, in good faith, with the paper trail that keeps everyone accountable. No account, no tracking, no scripts, no forms: this page collects nothing. You copy a pattern, replace every [BRACKET] with your facts, and send it yourself. Every template below is generated by the same tested engines that power the Nishi medical-billing tools.</p>\n\x00" as *u8)
51 o = hh_c(out, o, "<div class='note'>Decision-support only, not professional or legal advice. Verify findings with your provider and plan. Amounts and dates shown are EXAMPLES.</div>\n\x00" as *u8)
52
53 o = hh_c(out, o, "<h2>The playbook</h2>\n<ol><li><strong>Get the itemized bill.</strong> You are entitled to one; nothing below works from a summary.</li><li><strong>Decode every code.</strong> Look up each CPT/HCPCS/ICD-10 code (official descriptors; a decoder that does not recognize a code should say so, never guess).</li><li><strong>Audit the lines.</strong> Duplicates (same code, same date), bundled services billed separately, units beyond norms, prices far above benchmarks.</li><li><strong>Reconcile against your EOB.</strong> A charge not on the EOB, or above the plan-allowed amount, is disputable to the cent.</li><li><strong>Dispute in writing</strong> (letter below).</li><li><strong>Appeal any insurance denial</strong> - deadlines matter (letter below).</li><li><strong>Check charity care.</strong> Nonprofit hospitals MUST have a financial assistance policy; many families qualify and never apply.</li><li><strong>Know your federal shields.</strong> Surprise-billing protections and the uninsured dispute process (below).</li><li><strong>Escalate constructively.</strong> When direct channels stall, ask the right oversight body for help - and track responsiveness so the partnership stays honest.</li></ol>\n\x00" as *u8)
54
55 let letter: *u8 = sys_mmap(K_MAGIC_16384)
56 // 1) provider dispute letter -- the REAL R8 engine on a one-finding example
57 let reasons: *i64 = sys_mmap(64) as *i64
58 let cpts: *i64 = sys_mmap(64) as *i64
59 let fdates: *i64 = sys_mmap(64) as *i64
60 let amounts: *i64 = sys_mmap(64) as *i64
61 reasons[0] = 1
62 cpts[0] = K_MAGIC_96413
63 fdates[0] = K_MAGIC_20250310
64 amounts[0] = K_MAGIC_200000
65 disp_build("[PATIENT NAME]\x00" as *u8, "[PROVIDER NAME]\x00" as *u8, "[ACCOUNT NUMBER]\x00" as *u8, reasons, cpts, fdates, amounts, 1, letter)
66 o = hh_sec(out, o, "Dispute a billing error (to the provider)\x00" as *u8, "Use when the itemized bill has duplicates, unbundled components, impossible units, or prices far above benchmarks. Example below shows ONE duplicate-charge finding; list each of yours the same way.\x00" as *u8, letter)
67
68 // 2) insurance denial appeal -- the REAL engine, example denial date
69 mba_letter(1, K_MAGIC_20250310, letter)
70 o = hh_sec(out, o, "Appeal an insurance denial\x00" as *u8, "You generally have 180 days from the denial notice; the letter computes and states your window (example uses a 2025-03-10 denial). Reasons the engine supports: not medically necessary, experimental, out-of-network, missing prior auth, coding error.\x00" as *u8, letter)
71
72 // 3) charity care -- the REAL engine, example screen numbers
73 mbch_letter(K_MAGIC_40000, 4, 121, letter)
74 o = hh_sec(out, o, "Request financial assistance (charity care)\x00" as *u8, "Tax-exempt hospitals must maintain a Financial Assistance Policy under IRC section 501(r). Example screen: $40,000 income, household of 4 = about 121 percent of the federal poverty guideline - a level many hospital policies cover.\x00" as *u8, letter)
75
76 // 4) surprise billing / uninsured GFE -- the REAL NSA engine, PPDR route example
77 nsa_letter(3, K_MAGIC_50000, K_MAGIC_20250310, letter)
78 o = hh_sec(out, o, "Uninsured and billed over the estimate (PPDR)\x00" as *u8, "If you are uninsured/self-pay with a Good Faith Estimate and the bill runs at least $400 over it, the federal Patient-Provider Dispute Resolution process applies - 120 days from the bill date (example: $500 over a 2025-03-10 bill). Insured emergency or in-network-facility situations have their own balance-billing shields; those letters are in the toolkit too.\x00" as *u8, letter)
79
80 // 5) civic escalation -- the REAL engine, representative pattern
81 cv_letter(6, letter)
82 o = hh_sec(out, o, "Escalate: bring in the oversight partners\x00" as *u8, "When direct channels stall, ask the body that owns the problem to help: state insurance department, the CMS No Surprises Help Desk, the state attorney general, IRS Form 13909 for charity-care obligations, CFPB for collections, HHS-OIG for suspected improper billing - and write your representative. The pattern below asks for a WRITTEN answer so responsiveness can be measured fairly.\x00" as *u8, letter)
83
84 o = hh_c(out, o, "<h2>Deadlines that decide cases</h2>\n<table><tr><th>Window</th><th>Days</th><th>Starts from</th></tr><tr><td>Internal insurance appeal</td><td>180</td><td>denial notice</td></tr><tr><td>Federal PPDR (uninsured, over-GFE)</td><td>120</td><td>bill date</td></tr><tr><td>CFPB company response norm</td><td>15</td><td>complaint</td></tr><tr><td>State DOI / AG / representative norm</td><td>30</td><td>complaint</td></tr><tr><td>CMS No Surprises Help Desk norm</td><td>60</td><td>complaint</td></tr></table>\n<p>Write every window on a calendar the day it starts. The Nishi tools file these automatically into a reminder engine that surfaces them at 14/7/1/0-day leads.</p>\n\x00" as *u8)
85
86 o = hh_c(out, o, "<h2>Accountability: is the partnership moving?</h2>\n<p>A good-faith partnership runs on answered letters - in both directions. Every request you send has an expected response window. Track three dates - sent, acknowledged, responded - and each case earns a mechanical verdict: <strong>MOVING</strong> (responded or resolved), <strong>PENDING</strong> (inside the window), or <strong>OVERDUE-UNRESPONSIVE</strong> (window passed, silence). Share the tallies with your community and your representative: a measured record, kept fairly, is what helps every side improve.</p>\n\x00" as *u8)
87
88 o = hh_c(out, o, "<div class='foot'>Nishi HealthHelp, phase 1: education and patterns only - no data collected, no scripts, nothing sent on your behalf. Generated by nx_healthhelp_site from the same gate-tested engines (dispute, appeal, charity, surprise-billing, civic). Decision-support, not professional or legal advice.</div>\n</body></html>\n\x00" as *u8)
89 out[o] = 0 as u8
90 return o
91}