Can AI do medical coding?
Yes. Visit coding is work AI now does as the note is written: the E&M level with its MDM justification, HCC mapping, care gap capture. The right question is not whether AI can produce a code. It is whether the code can be traced to the chart when someone asks.
Written by Dr. Tattvam A. Nair, Co-Founder & COO of Layrd. Updated August 2026.
What AI coding covers
The visit codes that follow directly from documentation: the E&M level with the MDM reasoning behind it, the diagnoses mapped to their HCC categories, and the care gaps a visit addresses. This is the coding work that used to happen days after the visit, from a note someone else wrote.
The defensibility bar
A code without a citation is a liability, whoever produced it. The bar for AI coding is the same bar a human coder is held to: every element of the code traceable to a line in the note. Systems that meet it are auditable by construction. Systems that produce bare codes are producing risk.
What changes operationally
The lag disappears. When codes are drawn from the note as the note is written, coding stops being a downstream step with its own queue and its own backlog. The note and its codes agree because one is derived from the other, at the same moment.
Where Layrd fits
Coding & Analytics is live today. Every visit is coded as the note is written: E&M with full MDM justification, HCC mapping, and care gap closure across every program, with every code cited back to the chart and practice-wide dashboards on top.
What kinds of coding can AI handle today?
Visit coding drawn from the note: the E&M level with its MDM justification, HCC mapping for risk adjustment, and care gap capture across quality programs. Layrd runs all of this live today as part of Coding & Analytics.
Is AI-generated coding defensible in an audit?
Only if it is cited. A code that cannot be traced to a line of documentation is a liability whoever produced it, human or machine. The standard to hold any system to is that every code points at the chart.
When does the coding happen?
As the note is written. Because the codes are drawn from the note itself, there is no lag between documentation and coding, and no drift between what the chart says and what was billed.
What should I ask an AI coding vendor?
Three things. Does every code cite its documentation? Is the MDM justification shown, not just the level? And is there an audit trail? A vendor without good answers to all three is selling suggestions, not coding.
See it on your own workflow.
Free for the first 4 weeks, and live in under a week.
HIPAA compliant, inside your EMR, at one flat monthly rate