nx_medbill_codes.nx
buildroot/runtime/nx_medbill_codes.nx
about
nx_medbill_codes.nx -- M1 of the MEDICAL BILLING & PATIENT ADVOCACY ladder (see /compare/medbilling):
the sovereign CODE-PACK STORE + DECODE library. Billing codes (ICD-10-CM, HCPCS, CPT) map to their
OFFICIAL descriptors, stored as DATA in the sovereign seg-store (#6/#11/#25) -- the engine has ZERO
hardcoded descriptors. Descriptors are INGESTED from banked NLM ClinicalTables API responses
(clinicaltables.nlm.nih.gov, US-gov, fetched sovereignly by the researcher into knowledge/fetched/
mbc_*.raw) so nothing is fabricated: a code the store does not know returns -1, NEVER a made-up
description (the liar-kill invariant). CPT descriptors are AMA-licensed and cannot be bulk-fetched;
curated entries carry an explicit "curated:" cite so provenance is always visible.
Record layout under key "mbcode:<code>": system|descriptor|cite (pipe-delimited, NUL-terminated).
Commit segid = sys_now_us() (see reference-segstore-segid-use-now-us). No floats, no hardware writes.
license_tier: ORIGINAL
dependencies 2 imports · 9 importers
imports: nx_syscalls.nxnx_seg_store.nx
imported by: nx_healthhelp_site_gate.nxnx_medbill_advocacy_gate.nxnx_medbill_charity.nxnx_medbill_civic.nxnx_medbill_civic_gate.nxnx_medbill_cli.nxnx_medbill_codes_gate.nxnx_medbill_nsa_gate.nxnx_medbill_recon_gate.nx
structs
| none |
consts
| 14 | const K_MAGIC_2048: i64 = 2048 |
| 15 | const K_MAGIC_65536: i64 = 65536 |
| 16 | const K_MAGIC_1024: i64 = 1024 |
functions
| 19 | func mbc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 22 | func mbc_app(out: *u8, off: i64, src: *u8) -> i64 |
| 30 | func mbc_find(hay: *u8, n: i64, needle: *u8, from: i64) -> i64 |
| 45 | func mbc_contains(hay: *u8, needle: *u8) -> i64 |
| 51 | func mbc_streq(a: *u8, b: *u8) -> i64 |
| 59 | func mbc_read_all(path: *u8, buf: *u8, cap: i64) -> i64 called by 9: mainmbch_fplcv_expectcli_ingestcli_reviewcli_letter+3 calls 3: sys_openat_rdsys_readsys_close |
| 75 | func mbc_key(code: *u8, out: *u8) -> i64 |
| 85 | func mbc_put(prefix: *u8, code: *u8, system: *u8, desc: *u8, cite: *u8) -> i64 |
| 106 | func mbc_get(prefix: *u8, code: *u8, out: *u8, cap: i64) -> i64 |
| 126 | func mbc_field(rec: *u8, idx: i64, out: *u8, cap: i64) -> i64 |
| 149 | func mbc_ingest_nlm(prefix: *u8, rawpath: *u8, code: *u8, system: *u8) -> i64 |