E/M Coding

Coding & Risk Adjustment

Evaluation & Management (E/M) CPT leveling from a clinical note — MDM-scored, with ICD-10 and evidence.

E/MCPTMDMICD-10Leveling

About

Levels a clinical encounter to the correct Evaluation & Management (E/M) CPT code. The pipeline extracts clinical facts from the note, scores the three Medical Decision Making elements — problems, data, and risk — independently on the 2023 AMA scale, then applies the 2-of-3 rule and a setting-specific crosswalk (ED, office new/established, critical care, nursing facility, home, telehealth, consult) to select the E/M level.

Alongside the E/M code it codes the encounter's ICD-10-CM diagnoses, each validated to a billable leaf against the official 2026 tabular and carrying the verbatim note text that supports it. A final CDI pass flags documentation-improvement opportunities (specificity gaps, missing conditions, laterality, clarifications), each with a verbatim citation. A deterministic MDM calculator rounds it out.

How it works

  1. 1Note ingest (inline text) — header/answer lines stripped so output is content-driven
  2. 2LLM fact extraction → independent MDM scoring (problems / data / risk) with evidence quotes
  3. 3Deterministic E/M level: 2-of-3 MDM rule → setting-specific CPT crosswalk
  4. 4ICD-10-CM coding grounded in the 2026 tabular — unvalidated candidates dropped, never fabricated
  5. 5CDI pass: documentation-improvement suggestions with verbatim citations (AHIMA/ACDIS-compliant — no reimbursement language, no leading queries)

Intended use

  • •E/M leveling assist and pre-bill review across encounter settings (ED, office, critical care, …)
  • •Coder workbenches that show the MDM rationale and the chart evidence behind each code
  • •Standalone deterministic tooling — the MDM-based E/M calculator (/em/calculate), no LLM cost

Key outputs

  • ▸result.em_level — the selected E/M CPT code, with mdm { problems, data, risk, rationale }
  • ▸result.icd10[] — billable-leaf-validated diagnoses, each with reasoning and a source citation
  • ▸result.cdi_suggestions[] — type, condition, existing/suggested code, rationale, citation, confidence
  • ▸token_usage — prompt/completion/total tokens for the LLM passes (null for the deterministic tools)

Endpoints

Try each endpoint with your signed-in session — usage counts toward your monthly budget.

Use synthetic data only. Do not submit real patient records or PHI when testing endpoints.

Limitations & caveats

  • –Scope is E/M leveling — for full diagnosis coding use ICD Coding; for operative CPT/bundling use Ortho Coding
  • –`/analyze` is JSON-only (a clinical note as text); it does not take file uploads
  • –`/analyze` runs 5 LLM calls — fact extraction then three parallel chains (MDM, secondary CPTs, ICD-10→CDI); an ~8k-character note measured 77s serial and parallelism cuts it to ~facts+longest-chain, but it can still near the 60s ALB idle timeout, so call it as a background task rather than synchronously
  • –Exactly two endpoints — `/analyze` and `/em/calculate`; there is no code search, compliance, or export surface