Clinicians think the visit ends when they sign the note. Billing thinks the visit ends when a payer adjudicates a claim. Between those two moments the EHR and the billing system have to agree on what was done, who it was done for, and which identifiers will still match when the money comes back.
This guide maps EHR medical billing at that boundary: charge capture, coding, and the creation of a claim, and what should stay in a billing system instead. It is for product teams connecting an EHR to billing, and for revenue-cycle leads who are tired of charges that never become claims. The life of a claim after it leaves, including clearinghouse edits and denial work, is a different article. Here the subject is the handoff.
How does EHR medical billing work?
Connecting charges in the chart to a claim?
Agnotic builds the charge, coding, and X12 handoff between the EHR and billing software.
Medical billing inside an EHR starts when a signed order or completed visit becomes a charge, then a coded claim that a billing system sends to a payer. The record holds the clinical event. The billing system holds the claim, the remittance, and the patient balance.
Keep that split even when one vendor sells both products. The clinical event is signed by a clinician and versioned like the rest of the chart. The claim is a financial transaction that can be edited, split, or voided under billing rules without rewriting the note. If the same row is both the note and the claim, a coder's correction looks like a change to the medical record, and a clinician's addendum silently changes what you billed.
Where does charge capture happen?
Charge capture happens at the clinical event that proves the work: a signed note, a completed procedure, a medication administration, or a result that your fee schedule treats as billable. It should not depend on someone retyping the visit into a second system at the end of the day.
- Trigger: Define which signed events create a charge candidate, and which are clinical only.
- Performer: Store the rendering clinician and the supervising clinician separately when both matter for the claim.
- Place and time: Facility, department, and the date of service come from the encounter, not from the day the charge was reviewed.
- Quantity: Units come from the order or the administration record, not from a free-text line in the note.
- Hold: A charge with a missing diagnosis, a missing signer, or an unsigned note waits in a work queue instead of becoming a claim.
Show the clinician the charge candidates only when their signature is the missing piece. Do not make them the coder. A prompt that says the note is unsigned is useful. A prompt that asks them to pick a revenue code in the middle of clinic is how charges get skipped. The billing team works the queue of held charges. The clinician finishes the documentation that releases them.
How do coding and the claim get created?
Coding turns the clinical event into diagnosis and procedure codes that a claim can carry. The claim is the billing object's view of those codes plus the patient, the coverage, and the charge amounts. The EHR can suggest codes. A billing workflow accepts them.
- Suggest: Map a completed order or a documented procedure to a candidate CPT or HCPCS code, and a problem to an ICD-10-CM code, and show the source.
- Accept: A coder or a configured rule accepts, edits, or rejects the suggestion. The accepted code is what the claim uses.
- Diagnosis pointer: Each procedure line points at the diagnosis codes that support it, stored on the claim, not inferred later.
- Modifiers and units: Captured as structured fields. A modifier buried in a note will not survive the trip to the payer.
- Version: If the coder changes a code, the original suggestion remains visible. You will need it when a denial asks why you billed what you billed.
Automation that files a code without a human or a tested rule is how an unsigned impression becomes a diagnosis on a claim. Keep a confidence threshold, and route everything below it to the same queue as a missing signer. The goal is fewer retyped charges, not an unreviewed claim.
Which X12 transactions leave the EHR?
The claim leaves as an ASC X12 837. Eligibility is a 270 question and a 271 answer, usually earlier, at scheduling. Payment advice returns as an 835 and should land in the billing system, not in the clinical note. Pharmacy drug claims are a different standard and should not be forced into an 837.
HIPAA names these as adopted standards. 45 CFR 162.1102 adopts ASC X12 837 implementation guides for professional, institutional, and dental health care claims for the current period, alongside NCPDP for retail pharmacy drug claims. 45 CFR 162.1202 adopts the ASC X12 270/271 eligibility inquiry and response for dental, professional, and institutional care, again with NCPDP for pharmacy. 45 CFR 162.1602 adopts the ASC X12 835 Health Care Claim Payment/Advice for the remittance side. Build to the version your clearinghouse requires under those sections, and do not invent a private claim file if you expect a health plan to accept it.
- 270/271: Run before the visit when you can. Store the response against the coverage, including the trace, so a later denial can be compared with what eligibility said.
- 837: Professional, institutional, or dental, produced by the billing system from accepted charges. The EHR supplies the clinical facts. It does not have to be the system that speaks X12.
- 835: Posted in the billing system to the claim and the line. Write a summary back to the encounter only if operations need it. Do not paste the remittance into the note.
- Pharmacy: Retail drug claims follow NCPDP under the same HIPAA transaction rules. A medical 837 will not replace them.
What should stay in the billing system?
Keep payer contracts, fee schedules, claim edits, remittance posting, patient statements, and denial work in the billing system. Those change on a payer's calendar. The clinical record should not be redeployed every time a fee changes.
- Fee schedule and expected reimbursement: Financial data, versioned by payer and date of service.
- Edits: Required fields, bundling, and timely filing warnings before the 837 is sent.
- Remittance posting: Line-level payment, adjustment, and patient responsibility from the 835.
- Denials and appeals: Reason codes, owners, and the packet of clinical documents pulled on request, not stored as the only copy.
- Patient balance: Statements and payment plans. The portal may display a balance. The ledger lives in billing.
The EHR still needs a read model for the questions clinicians actually ask: is this authorized, is there a balance the front desk must mention, did this order generate a charge. Serve those as a status from the billing system, refreshed on a known lag, and label the lag. A clinician making a care decision from a stale balance is a workflow bug you can prevent by showing the as-of time.
How should the two systems share identifiers?
Share a stable encounter id, a patient id, a charge id, and a coverage id, and never use the payer's claim number as your only key. The 835 will come back with references you must already have stored.
- Patient: Your internal id, plus the member id from coverage as a typed identifier, not as the primary key.
- Encounter: One id for the visit that both systems store, even if billing later splits the claim.
- Charge: One id per charge candidate so a corrected claim still points at the same clinical event.
- Claim control: The patient control number you place on the 837, stored before you send, so the 835 can find the claim.
- Provider: NPI and the taxonomy you billed, stored on the claim, because the EHR's current provider record may change later.
When a coder voids and replaces a claim, do not mint a new encounter. Link the replacement to the original charge. Finance needs the chain. Clinicians need the visit to stay one visit. Teams that collapse those identifiers spend the next year reconciling payments to the wrong date of service.
Where do EHR billing integrations fail?
The failures are mismatches of identity, timing, and ownership. These are the ones we look for first when charges do not match payments.
- Unsigned notes: Charges release before the documentation that supports them exists.
- Free-text procedures: The work is in the note and not in a code, so nothing triggers a charge.
- Coverage snapshot: Eligibility was checked for a different payer than the one on the claim.
- Lost control number: The 837 went out without storing the patient control number, so the 835 cannot post.
- Two writers: Both systems edit the diagnosis on the claim, and neither is source of truth.
- Silent drops: A held charge queue with no owner, so the work sits until timely filing is gone.
What should you build, and what should you buy?
Buy a billing system when you need payer edits, 835 posting, and statements that already exist. Build the charge capture, the coding suggestions tied to your orders, and the identifiers that connect your EHR to that billing system. That boundary is where a generic product will not know your encounter.
If you are a product company embedding billing for clinics, still keep the ledger separate from the clinical store, even inside one product suite. Expose the 837 and accept the 835 through a module you can test without clicking through a chart. Your clinical release cycle and your payer companion-guide updates will not be the same calendar, and they should not have to be.
How Agnotic can help
Agnotic Technologies builds the handoff from the clinical event to the claim: charge candidates from signed orders and notes, coding suggestions with a human or rule acceptance step, and the identifiers a billing system needs to send an 837 and post an 835. We keep the note and the claim as different records that point at each other.
When the two systems already disagree, we trace a sample of encounters from the signed note to the patient control number and show where the charge was held, dropped, or keyed to the wrong coverage. The fix is usually ownership and identifiers, not another retype.
Connect the chart to the claim
Plan EHR charge capture and billing integration with our engineers, or read more revenue-cycle articles.
Related reading on Agnotic
Read the claim's path after it leaves, how an EHR workflow is mapped, and how coding can be automated without skipping review.


