1. Back
  2. Application examples

Application examples

What the application computes and writes, on one example: the medical decision making (MDM) level of the American Medical Association's 2023 guidelines, computed from fixed rules, and the section ready to copy. Nothing is sent or stored.

Level calculator

Problems addressed (counts)
Data reviewed and analyzed
Risk of patient management

Problems: Straightforward Data: Straightforward Risk: Straightforward

MDM: Straightforward CPT 99221 initial, 99231 subsequent

Use this template

How the level is computed. Each element is scored 0 to 3 (straightforward, low, moderate, high). The MDM level is the highest level that 2 of the 3 elements reach.

  • Problems high: a chronic illness with severe exacerbation or progression, or a threat to life or function. Moderate: a chronic illness with exacerbation, 2 or more stable chronic illnesses, an undiagnosed new problem with uncertain prognosis, an acute illness with systemic symptoms, or an acute complicated injury. Low: 2 or more self-limited problems, a stable chronic illness, an acute uncomplicated illness or injury, a stable acute illness, or an acute uncomplicated illness needing hospital care.
  • Data counts tests, external notes and an independent historian together (category 1, met at 3), an independent interpretation (category 2) and a discussion with an external source (category 3). High: 2 of the 3 categories. Moderate: 1 category. Low: 2 of tests and notes, or an independent historian.
  • Risk high: intensive drug monitoring for toxicity, major surgery with risk factors or in an emergency, a decision about hospitalization or escalation of care, a decision not to resuscitate or to de-escalate, or parenteral controlled substances. Moderate: prescription drug management, minor surgery with risk factors, elective major surgery without risk factors, or care limited by social determinants of health. Low: low-risk management.

Reference. The levels and their elements follow the American Medical Association's CPT® Evaluation and Management guidelines (2023 revision) and the Centers for Medicare & Medicaid Services' Evaluation and Management Services Guide (MLN006764). The wording above is a paraphrase for illustration; the official text governs.

The calculation, as code
10 REM ============================================================
20 REM AMA 2023+ E/M MEDICAL DECISION MAKING (MDM) CALCULATOR
30 REM Based on CPT E/M Guidelines - Levels of MDM Table
40 REM Rule: Highest level where >=2 of 3 elements meet or exceed it
50 REM Levels: 0=Straightforward, 1=Low, 2=Moderate, 3=High
60 REM ============================================================
110 REM --- INPUT: NUMBER AND COMPLEXITY OF PROBLEMS ---
140 INPUT "Self-limited or minor problems: "; SLM
150 INPUT "Stable chronic illnesses: "; SC
160 INPUT "Acute uncomplicated illness/injury: "; AU
170 INPUT "Stable acute illness: "; SA
180 INPUT "Acute uncomplicated requiring hospital/obs: "; AUH
190 INPUT "Chronic with exacerbation/progression/side effects: "; CEX
200 INPUT "Undiagnosed new problem with uncertain prognosis: "; UNP
210 INPUT "Acute illness with systemic symptoms: "; AIS
220 INPUT "Acute complicated injury: "; ACI
230 INPUT "Chronic with SEVERE exacerbation/progression: "; CSE
240 INPUT "Illness/injury posing threat to life or function: "; TLF
250 REM --- SCORE PROBLEMS ---
260 PL = 0
270 IF CSE >= 1 OR TLF >= 1 THEN PL = 3: GOTO 320
280 IF CEX >= 1 OR SC >= 2 OR UNP >= 1 OR AIS >= 1 OR ACI >= 1 THEN PL = 2: GOTO 320
290 IF SLM >= 2 OR SC >= 1 OR AU >= 1 OR SA >= 1 OR AUH >= 1 THEN PL = 1: GOTO 320
300 IF SLM >= 1 THEN PL = 0
320 REM --- INPUT: DATA REVIEWED AND ANALYZED ---
350 INPUT "Unique tests ordered or reviewed: "; TST
360 INPUT "Unique external notes reviewed: "; NOT
370 INPUT "Independent historian used? (1=Yes, 0=No): "; IH
380 INPUT "Independent interpretation of a test? (1=Yes, 0=No): "; II
390 INPUT "Discussion with external provider/source? (1=Yes, 0=No): "; DIS
400 REM --- SCORE DATA ---
410 C1 = TST + NOT
420 IF IH = 1 THEN C1 = C1 + 1
430 DL = 0
440 CAT2 = 0: IF II = 1 THEN CAT2 = 1
450 CAT3 = 0: IF DIS = 1 THEN CAT3 = 1
460 CM = 0
470 IF C1 >= 3 THEN CM = CM + 1
480 IF CAT2 = 1 THEN CM = CM + 1
490 IF CAT3 = 1 THEN CM = CM + 1
500 IF CM >= 2 THEN DL = 3: GOTO 540
510 IF C1 >= 3 OR CAT2 = 1 OR CAT3 = 1 THEN DL = 2: GOTO 540
520 IF C1 >= 2 OR IH = 1 THEN DL = 1: GOTO 540
530 DL = 0
540 REM --- INPUT: RISK OF PATIENT MANAGEMENT ---
580 INPUT "Prescription drug management: "; RX
590 INPUT "Minor surgery with identified risk factors: "; MSR
600 INPUT "Elective major surgery WITHOUT identified risk factors: "; EMS0
610 INPUT "Diagnosis/treatment limited by social determinants: "; SDOH
620 INPUT "Drug therapy requiring intensive monitoring for toxicity: "; DINT
630 INPUT "Elective major surgery WITH identified risk factors: "; EMS1
640 INPUT "Emergency major surgery: "; EMSURG
650 INPUT "Decision re: hospitalization or escalation of care: "; HOSP
660 INPUT "Decision not to resuscitate or de-escalate care: "; DNR
670 INPUT "Parenteral controlled substances: "; PCS
680 INPUT "Low-risk management (OTC, rest, etc.): "; LRM
690 REM --- SCORE RISK ---
700 RL = 0
710 IF DINT=1 OR EMS1=1 OR EMSURG=1 OR HOSP=1 OR DNR=1 OR PCS=1 THEN RL = 3: GOTO 750
720 IF RX=1 OR MSR=1 OR EMS0=1 OR SDOH=1 THEN RL = 2: GOTO 750
730 IF LRM=1 THEN RL = 1: GOTO 750
740 RL = 0
750 REM --- CALCULATE OVERALL MDM (2 of 3 rule) ---
770 OV = 0
780 FOR TARGET = 3 TO 0 STEP -1
790   CNT = 0
800   IF PL >= TARGET THEN CNT = CNT + 1
810   IF DL >= TARGET THEN CNT = CNT + 1
820   IF RL >= TARGET THEN CNT = CNT + 1
830   IF CNT >= 2 THEN OV = TARGET: GOTO 850
840 NEXT TARGET
850 REM --- OUTPUT RESULTS ---
900 PRINT "Problems level: "; PL
910 PRINT "Data level: "; DL
920 PRINT "Risk level: "; RL
930 PRINT "Overall MDM level: "; OV
940 PRINT "(0=Straightforward, 1=Low, 2=Moderate, 3=High)"
950 END

Templates by level

High (99223, 99233)

MEDICAL DECISION MAKING (High: 2 of the 3 elements must reach it)

Problems addressed:
- Acute: [problem and its status]
- Chronic: [illness and its status: stable, exacerbation, severe exacerbation]
  (High needs: 1 chronic illness with severe exacerbation, progression or side effects of treatment, or 1 acute or chronic illness that poses a threat to life or bodily function.)

Data reviewed and analyzed:
- Reviewed: [each unique test result]
- Ordered: [each unique test]
- External records reviewed: [source]
- Independent historian: [who gave the history, if not the patient]
- Independent interpretation: [test and your reading]
- Discussed with: [outside physician or source, and what was discussed]
  (High needs: 2 of the 3 categories: (1) 3 of: external notes, test results reviewed, tests ordered, independent historian; (2) independent interpretation of a test; (3) management discussed with an external physician or appropriate source.)

Risk of patient management:
- [management decision and its risk]
  (High needs: e.g. drug therapy needing intensive monitoring for toxicity, a decision about escalation of hospital-level care, a decision not to resuscitate or to de-escalate care, or parenteral controlled substances.)

Total time: [minutes on the date of service and what they included]
  (By time instead of MDM: CPT 99223 needs at least 75 minutes, CPT 99233 at least 50 minutes, documented.)

Moderate (99222, 99232)

MEDICAL DECISION MAKING (Moderate: 2 of the 3 elements must reach it)

Problems addressed:
- Acute: [problem and its status]
- Chronic: [illness and its status: stable, exacerbation, severe exacerbation]
  (Moderate needs: 1 chronic illness with exacerbation, progression or side effects of treatment, 2+ stable chronic illnesses, 1 undiagnosed new problem with uncertain prognosis, or 1 acute illness with systemic symptoms.)

Data reviewed and analyzed:
- Reviewed: [each unique test result]
- Ordered: [each unique test]
- External records reviewed: [source]
- Independent historian: [who gave the history, if not the patient]
- Independent interpretation: [test and your reading]
- Discussed with: [outside physician or source, and what was discussed]
  (Moderate needs: 1 of 3 categories: (1) 3 of: external notes, test results reviewed, tests ordered, independent historian; (2) independent interpretation of a test; (3) management discussed with an external physician or appropriate source.)

Risk of patient management:
- [management decision and its risk]
  (Moderate needs: e.g. prescription drug management, a decision about minor surgery with risk factors, or diagnosis or treatment significantly limited by social determinants of health.)

Total time: [minutes on the date of service and what they included]
  (By time instead of MDM: CPT 99222 needs at least 55 minutes, CPT 99232 at least 35 minutes, documented.)

Straightforward or low (99221, 99231)

MEDICAL DECISION MAKING (Straightforward or low: 2 of the 3 elements must reach it)

Problems addressed:
- Acute: [problem and its status]
- Chronic: [illness and its status: stable, exacerbation, severe exacerbation]
  (Straightforward or low needs: 1 self-limited or minor problem.)

Data reviewed and analyzed:
- Reviewed: [each unique test result]
- Ordered: [each unique test]
- External records reviewed: [source]
- Independent historian: [who gave the history, if not the patient]
- Independent interpretation: [test and your reading]
- Discussed with: [outside physician or source, and what was discussed]
  (Straightforward or low needs: minimal or none.)

Risk of patient management:
- [management decision and its risk]
  (Straightforward or low needs: minimal risk of morbidity from further testing or treatment.)

Total time: [minutes on the date of service and what they included]
  (By time instead of MDM: CPT 99221 needs at least 40 minutes, CPT 99231 at least 25 minutes, documented.)

CPT® is a registered trademark of the American Medical Association. VisitRounds is not affiliated with or endorsed by the American Medical Association. The templates are section headers and blanks, not the AMA's text.