FirmAdapt
FirmAdapt
Back to Blog
healthcareautomationcompliancecoding

How AI Detects Upcoding and Downcoding in Real Time

By Basel IsmailApril 6, 2026

Upcoding and Downcoding Are Two Sides of the Same Problem

Most conversations about coding accuracy focus on upcoding, which is billing for a higher-level service than what was actually provided. It is a compliance risk, a fraud risk, and the thing that gets practices investigated by the OIG. But downcoding is just as common and arguably more expensive in aggregate. Downcoding means billing for a lower-level service than what the documentation actually supports, and it happens constantly because coders and providers default to conservative coding to avoid compliance scrutiny.

A family medicine practice that consistently codes office visits at level 3 (99213) when the documentation supports level 4 (99214) might be leaving 20 to 30 percent of their office visit revenue on the table. Across thousands of visits per year, that adds up to hundreds of thousands of dollars in lost revenue. The irony is that downcoding is not safe. It can actually trigger audits because payer algorithms look for unusual coding patterns in both directions.

Why Human Coding Drifts

Coding accuracy depends on matching the documentation to the code definitions, and both of those things are moving targets. Code definitions change with annual CPT updates. Documentation guidelines evolve as CMS and the AMA revise their frameworks. The 2021 changes to E/M office visit coding, for example, fundamentally restructured how complexity is evaluated, shifting from a component-based system to one based on medical decision-making or total time.

Human coders and physicians develop habits. A physician who learned to code under the old system might continue using the same patterns even after the rules change. A coder who was trained to be conservative might systematically undercode because they were taught that it is better to code low than to face an audit. These habits create systematic drift away from accurate coding.

How AI Detection Works

AI coding analysis systems work by comparing the clinical documentation against the submitted code using the same criteria that auditors use. The system reads the note, evaluates the complexity of the medical decision-making (number and complexity of problems addressed, amount and complexity of data reviewed, risk of complications or morbidity), and determines which E/M level the documentation supports.

If the documentation supports a level 4 visit but the provider selected level 3, the system flags a potential downcode. If the documentation only supports level 3 but the provider selected level 4, it flags a potential upcode. In both cases, the system presents its analysis with the specific documentation elements that support its conclusion.

This happens before the claim is submitted, which is the critical difference from retrospective auditing. Traditional coding audits happen months or years after the fact, when it is too late to fix the documentation and when the financial impact has already accumulated. Real-time detection catches the issue while it can still be corrected.

Beyond E/M Levels

While E/M coding gets the most attention, AI detection applies across all coding categories. Procedure coding is another area where upcoding and downcoding are common. A surgeon who consistently uses an unspecified procedure code when a more specific code exists is downcoding. A practice that bills for a complex wound repair when the documentation describes a simple laceration closure is upcoding.

The AI system maintains the full CPT code set with definitions and documentation requirements for each code. When it encounters a claim, it cross-references the documentation against the code definition to verify that the code accurately represents the service provided. It checks modifiers, diagnosis code specificity, and procedure documentation completeness.

Pattern Detection Across the Practice

Individual claim analysis is valuable, but the bigger insight comes from pattern analysis across the entire practice. AI systems aggregate coding data across all providers and all payers to identify systematic patterns. If one provider consistently codes at level 3 while their peers with similar patient panels code at level 4, that suggests potential downcoding. If another provider has an unusually high percentage of level 5 visits, that warrants review.

These patterns are compared against specialty benchmarks. A cardiology practice should have a different E/M level distribution than a family medicine practice because cardiologists typically manage more complex patients. The AI accounts for specialty, patient acuity, and case mix when evaluating whether a coding pattern is within expected ranges.

The Feedback Loop to Providers

Detection without correction is just reporting. Effective AI coding systems feed their analysis back to providers in actionable ways. A provider who consistently undercodes might receive a monthly report showing specific examples where their documentation supported a higher code. The report does not just say you should have coded higher. It shows exactly which documentation elements supported the higher code and what the revenue impact was.

Over time, this feedback changes coding behavior. Providers learn which documentation elements matter for code selection and begin including them routinely. Coders learn which patterns the AI flags and adjust their approach. The result is a gradual improvement in coding accuracy that benefits the practice financially while also improving compliance posture.

Compliance Protection

The audit trail that AI creates is itself a compliance tool. If a practice is ever audited, they can demonstrate that they had a system in place to detect and correct coding anomalies. They can show that their providers received feedback on coding patterns. They can produce documentation showing that flagged codes were reviewed and either corrected or justified.

This is a much stronger compliance position than most practices have today. The standard approach of annual retrospective audits on a small sample of charts provides only a snapshot. Continuous AI-driven monitoring provides ongoing assurance that coding is accurate across all claims, all providers, and all payers. For more on how AI supports healthcare compliance and revenue integrity at FirmAdapt.

Ready to uncover operational inefficiencies and learn how to fix them with AI?
Try FirmAdapt free with 10 analysis credits. No credit card required.
Get Started Free
How AI Detects Upcoding and Downcoding in Real Time | FirmAdapt