EMR coding is the work of turning what a clinician documents in the electronic medical record into standard codes for diagnoses, procedures, services and supplies. Those codes drive claims, quality reporting and analytics, so a gap in the record becomes a gap in revenue and in data.
This guide is for founders and health system technology leaders building or improving coding inside the EMR. It covers the HIPAA code sets and their owners, the path from note to claim, clinical documentation improvement, computer-assisted coding, the coding data model and the gaps that turn into denials.
What is EMR coding?
Building coding into your EMR?
Agnotic Technologies builds AI medical coding software for clients, from code suggestions and edit checks to coder review queues.
EMR coding is the assignment of standard codes, mainly ICD-10-CM diagnoses, CPT and HCPCS procedures and services, and ICD-10-PCS inpatient procedures, to the care documented in an electronic medical record. Clinicians, coders or software propose the codes, and edits check them before they leave the EMR on a claim.
Two working patterns exist side by side. In clinics, the clinician often picks diagnosis codes and the visit level at the point of care, and coders audit a sample. In hospitals, professional coders work each account from the documentation after discharge.
Software has to support both patterns, and many organizations run both at once across their clinics and inpatient units.
Which code sets does the EMR have to support?
HIPAA names the code sets that covered transactions must use, so every EMR coding module is built around them. Each set has a different owner and a different update cycle, and three facts shape the design.
- HIPAA code sets: 45 CFR 162.1002 adopts ICD-10-CM for diagnoses and ICD-10-PCS for inpatient hospital procedures, each with its Official Guidelines for Coding and Reporting, plus CPT-4 with HCPCS for physician and other services, HCPCS for other items and supplies, NDC for retail pharmacy drugs and CDT for dental services.
- CPT and HCPCS Level II: CPT, also called HCPCS Level I, is maintained by the CPT Editorial Panel and copyrighted by the American Medical Association, while CMS maintains HCPCS Level II and releases HCPCS updates each quarter.
- NCCI edits: CMS publishes National Correct Coding Initiative procedure-to-procedure, medically unlikely and add-on code edits at least quarterly, so a coding tool needs a routine to load each new release.
Plan the annual change as a release. Load the new tables into a test environment, rerun a sample of recent encounters through the edits, and confirm that search, favorites lists and order sets point to codes that are still valid on the effective date.
ICD-10-CM itself is published by CDC's National Center for Health Statistics as downloadable files with tabular lists, indexes and addenda. Load the addenda as a diff, so reviewers see exactly which codes were added, revised or deleted, and flag every favorites list, order set and rule that uses a changed code.
Keep the previous release live alongside the new one. Late charges and corrected claims for older dates of service must still be coded with the codes valid on those dates, so the EMR picks the release by date of service, not by today's date.
Licensing belongs in the plan. Software that stores or displays CPT codes and descriptors needs an AMA license, so budget for it and decide how the codes will be loaded and refreshed.
Clinical terminologies sit beside the billing sets. Problem lists often hold SNOMED CT concepts mapped to ICD-10-CM, and lab orders carry LOINC codes, but claims use only the HIPAA sets.
How does documentation become a code?
Documentation becomes a code through seven steps, from the note to the denial review. Each step needs its own screen, rules and audit record.
- 1. Document: The clinician writes the note, problem list, orders and procedure details. Structured fields such as laterality, encounter type and time spent feed coding directly.
- 2. Capture charges: Orders, procedures and nursing documentation create charges through the charge description master, each linked to a CPT or HCPCS code and a revenue code.
- 3. Propose codes: The clinician selects diagnoses from a problem list or a search mapped to ICD-10-CM, or computer-assisted coding proposes codes from the note text.
- 4. Query when unclear: If documentation is incomplete or conflicting, clinical documentation improvement staff send the clinician a query before the code is final.
- 5. Validate: Edits check that each code is valid for the date of service, test NCCI pairs and unit limits, and catch age or sex conflicts and payer-specific rules.
- 6. Finalize and bill: A coder or the clinician signs off, the codes go on the claim, and the claim leaves as an X12 837 transaction.
- 7. Learn from denials: Remittance and denial codes come back, and the coding team traces each coding denial to the documentation or rule that caused it.
Step 7 is easy to leave out of the design, yet it is the only step that shows whether the other six are working.
Point-of-care coding needs a different design from back-office coding. Clinicians need short, specific pick lists and prompts for missing detail inside the note; coders need a full account view, edit results and the history of every change.
What does clinical documentation improvement add?
Clinical documentation improvement, or CDI, checks that the record supports the codes before billing. It catches missing specificity, such as an unstated laterality or acuity, while the clinician can still clarify.
In software terms, CDI is a work queue with rules. Records are flagged by rules or models, a specialist reviews them, and a query goes to the clinician through the EMR inbox with a response tracked to closure.
Queries must not lead the clinician toward a higher-paying answer. Build templates that offer clinically reasonable options, including other and clinically undetermined, and keep every query and response with the record.
Track query volume, response time and agreement by service line. These figures show where documentation templates need changing, which fixes the problem upstream instead of querying the same gap every week.
Where computer-assisted coding helps
Computer-assisted coding reads documentation and proposes codes for a coder to accept, change or reject. It helps most where notes are long and the code space is large, such as inpatient stays and visits that cover several conditions.
Older engines map terms to codes with rules; newer tools use trained or large language models. Either way, each suggestion should point to the sentence that supports it, so the coder confirms it in place.
Measure a tool against your own coders on your own records before trusting it. Track agreement, edits and denials by code family rather than a single headline accuracy figure, and keep a human sign-off on every claim.
Choosing a computer-assisted coding approach
- Rules and dictionaries: Predictable and easy to explain, but every new phrase or note template needs a new rule.
- Trained classifiers: Learn from past coded encounters, so they inherit past coding errors and need retraining when code sets change.
- Large language models: Handle varied wording and can explain a suggestion in plain text, but need grounding in the note, validation against the current code tables and close review of every code they propose.
The extraction methods underneath, such as entity recognition, negation detection and terminology mapping, are covered in the separate guide to NLP in healthcare.
How should coding data be modeled?
Model codes as versioned facts with evidence, not as strings on a bill. The rules below keep the data usable for claims, audits and analytics.
- System and version: Store each code with its code system and the release in force on the date of service, because codes are added, revised and deleted every year.
- Evidence link: Keep a pointer from each code to the note, order or result that supports it.
- Proposed versus final: Store what software or a clinician proposed, what the coder finalized and who made each change.
- Diagnosis pointers: Keep the ordered link between each service line and its supporting diagnoses, because the claim needs it.
- FHIR exposure: If other systems read coding data over HL7 FHIR, expose diagnoses as Condition resources and Encounter.diagnosis, and billed services as Claim or ChargeItem.
Analytics teams benefit from the same model. With versions and evidence stored, a question such as which diagnoses were added after a CDI query can be answered from data instead of chart review.
Coding gaps that turn into denials
- Stale code tables: The annual ICD-10-CM release and the HCPCS and NCCI updates during the year load late, so valid codes reject and deleted codes still appear in search.
- Unspecified defaults: Diagnosis search that lists unspecified codes first leads clinicians to choose them, and payers question the claim.
- Copy-forward notes: Copied text carries old diagnoses into new visits, so a code is supported by text that no longer describes the patient.
- Suggestions without evidence: Computer-assisted coding that shows a code but not its supporting sentence forces coders to reread the whole note.
- No denial loop: Denials are worked in billing but never fed back to coding rules or CDI queries, so the same error repeats.
- Broad access: Coders, auditors and outside vendors share wide access to records, which weakens individual accountability and makes access reviews close to impossible.
Each of these has a software fix: scheduled table loads, search ranking by specificity, copy-forward flags, evidence links, a denial feedback queue and role-based access with audit logging.
How Agnotic can help
Coding software sits between clinical documentation and the claim, so it has to respect both. Agnotic builds coding features for clients: diagnosis search tuned for specificity, computer-assisted coding with evidence links, CDI query queues, edit engines that load CMS updates on schedule and the denial feedback that closes the loop.
Each feature is designed with coder review and audit logging in place, and built to fit the EMR the client already runs. For teams starting from scratch, Agnotic also helps decide which parts to build and which to license, such as code content, edit libraries and the encoder.
Improve coding in your EMR
Talk to Agnotic about coding features that cut rework for coders, or browse more articles in the Revenue Cycle hub.
Related reading on Agnotic
Continue with EHR integrations, EHR data analytics, revenue cycle management and clinical NLP.


