💵 Anesthesia Data Model — Billing & the Procedures→Charge Bridge (2 of 2)
How a documented procedure becomes a billable charge line — deterministically, no AI. This is the slice you'll touch most.
🌉 The bridge — one row in, one charge line out (idempotent)
anesthesia_procedures
a saved SynForm procedure
──▶
source_procedure_id FK
ON DELETE CASCADE · partial-unique = idempotent upsert
anesthesia_regional_blocks
the billable charge line
Service: AnesthesiaProcedureBillingBridge (aims-api), fired on PUT /api/anesthesia/cases/{id}/procedures & DELETE. Best-effort — a billing hiccup never blocks the chart save. Delete a procedure → the block cascades away and line flags clear.
🧮 The deterministic resolver — procedure_type → what gets billed
| procedure_type | What the bridge does | CPT / imaging rule (CPT-2025) |
peripheral_block (named-nerve) |
upsert a regional-block charge line |
64415 / 64447 / 64445 / 64450 · bilateral→-50, else -59 · 76942 imaging billed |
peripheral_block (fascial-plane) |
upsert a regional-block charge line |
thoracic 64466/64468 · abd 64486/64488 · lower-ext 64473 · bilateral→dedicated code (not -50) · 76942 SUPPRESSED (bundled) |
arterial_line central_line |
set has_arterial_line / has_central_line on the case |
existing found-money path bills 36620 / 36556 — single source, no double-bill |
| spinal · cse · epidural |
no charge line |
bundled into the anesthesia base (NCCI) |
⚠️ The codes live in a shared catalog (below) so the manual Add-Block UI and the automatic bridge always agree.
🧾 Charge-capture tables (all 1──N off anesthesia_cases unless noted)
- anesthesia_regional_blocks — block_type, cpt_code, modifier, laterality, ultrasound_guided, source_procedure_id
- anesthesia_surgical_cpts — surgical CPTs (primary + secondary)
- anesthesia_diagnoses — ICD-10, is_primary, is_asa_qualifying
- anesthesia_field_avoidance_flags — "found money" (e.g. 76942), detect→confirm→bill, est. revenue
- anesthesia_billing (1──1) — base_units, time_units, modifier_units, total_units
- anesthesia_charge_ticket_audit — status transitions (pending→review→complete→billed)
📋 SynForm layer — the forms are DATA
syn_form_layouts
- JSONB layout registry. The UI is hand-built Angular; this JSON drives the data contract + voice/NLP aliases, not generic rendering.
- organization_id = 0 rows are global templates (RLS lets every org read them); org-specific rows override.
- Keys: pre-anesthesia-v1 + the 6 procedure layouts.
- Served by GET /api/synform/layouts/{key}.
📚 Reference catalogs — schema ref. (shared, NOT org-scoped, no RLS — coding tables)
- ref.anes_regional_block_types — block_name → cpt_code → default_modifier. The catalog corrected to CPT-2025; used by manual + bridge.
- ref.anesthesia_billing_codes — CMS anesthesia codes 00100–01999 → base_units.
- ref.asa_crosswalk — surgical CPT → anesthesia code (e.g. 43235 EGD → 00740, 5 units).
- ref.anes_field_avoidance_types — field-avoidance categories + add-on modifiers/CPT.
- ref.anes_condition_icd10_map — intake condition → ICD-10 + ASA-qualifying.
🔎 End-to-end example: clinician saves a PECS-2 block, ultrasound ✓ in procedures-panel → bridge resolves 64466 (thoracic fascial-plane), suppresses 76942 (imaging bundled), writes ONE anesthesia_regional_blocks line keyed by source_procedure_id → re-saving updates the same line (idempotent) → deleting the procedure cascades the line away. No code was decided by an LLM.
Source: AnesthesiaProcedureBillingBridge + FieldAvoidanceDetectionService (aims-api), anesthesia_regional_blocks / ref.anes_regional_block_types migrations, anesthesia_procedures table (20260628_002) + source_procedure FK (20260628_004). Verified 2026-06-28.