Skip to content
Build guide

How to build a medical billing system

How a medical billing system turns care into paid claims, the payer rules it must follow, and an order to build it in.

Overview

What a medical billing system does

A medical billing system captures the charges for care, codes them, checks them against payer rules, sends claims, posts payments and works the denials. In many countries it also bills patients for their share.

Every market has its own codes, claim formats and payer schemes, so the core idea is the same but the rules are local: X12 claims in the US, case rates in the Philippines, national schemes elsewhere.

Modules

The modules you need

Most teams need all of these in the end. The phased plan below sets the order.

Charge capture

Charges from the clinical record, with nothing done but not billed.

Coding

Diagnosis and procedure codes suggested from the chart and confirmed by a coder.

Eligibility and authorisation

Checks that the patient is covered and the service is approved before it happens.

Claim scrubbing

Payer rules checked before submission, so errors are fixed before a denial.

Claims submission

Claims sent in each payer's format, with status tracked.

Remittance and posting

Payments and adjustments posted against each claim line.

Denials and appeals

Denials sorted by reason, worked in queues and appealed with evidence.

Patient billing

Statements, payment plans and online payment for the patient's share.

Architecture

How the parts fit together

  • 01

    Claim lines as the core record

    Each charge line carries its codes, payer, status and history from capture to payment.

  • 02

    Payer rules as configuration

    Edits, fee schedules and scheme rules kept as versioned data per payer.

  • 03

    Clearinghouse adapters

    One adapter per clearinghouse or payer gateway.

  • 04

    Work queues

    Coding, scrubbing failures and denials routed to the right team.

  • 05

    Finance reporting

    Ageing, collections and denial rates from a reporting copy.

Data model sketch

  • 01

    Encounter and charge line

    What was done, by whom, when, and the codes for it.

  • 02

    Coverage

    The patient's payers, plans, eligibility and authorisations.

  • 03

    Claim

    Lines grouped into a claim for one payer, with submission history.

  • 04

    Remittance and adjustment

    What the payer paid, adjusted or denied, line by line, with reason codes.

  • 05

    Patient account

    The patient's balance, statements and payments.

Integrations

Systems it has to talk to

  • 01

    EHR or practice system

    Encounters, charges and documentation for coding.

  • 02

    Clearinghouses and payer portals

    Eligibility, claims, status and remittance, such as X12 transactions in the US.

  • 03

    National schemes

    Government insurance schemes with their own claim systems.

  • 04

    Payments

    Card and bank payments for patient balances.

Compliance

Rules to design for

Which rules apply depends on your market and product.

  • 01

    Standard transactions

    In the US, HIPAA sets standard electronic transactions for claims and eligibility. Other countries have their own.

  • 02

    Coding rules

    Code sets such as ICD-10 and local procedure codes, and the rules for using them.

  • 03

    Health data protection

    Billing data is health data under HIPAA, the GDPR and national laws.

  • 04

    Patient billing rules

    Rules on what patients may be charged, discounts that must be applied and how disputes are handled.

Plan

From prototype to production

Build in this order so something real is in users' hands early.

  1. 01

    Clickable prototype

    Charge review, coding and the denial queue, tried by billing staff.

  2. 02

    First payer live

    Charge capture, coding, claims and posting for the largest payer.

  3. 03

    Scrubbing and denials

    Payer rules before submission and denial management after.

  4. 04

    More payers and patient billing

    Remaining payers, patient statements and payments, and finance reporting.

Cost

What drives the cost

These decide most of the budget. For a number based on your own scope, use the cost tool. OceanLab bills $30-50/hr or per milestone.

  • 01

    Number of payers

    Each payer or scheme has its own rules and formats.

  • 02

    Coding support

    Assisted coding from the chart, and the review step around it.

  • 03

    Clearinghouse setup

    Enrolment and testing with each clearinghouse or gateway.

  • 04

    Migration of open claims

    Moving claims in flight without losing history.

  • 05

    Patient billing

    Statements, payment plans and the support behind them.

Proof

Product builds that match this guide

Work with us

Two ways to work with OceanLab

Project build

We design and build the system as one project. It starts with a clickable prototype your team tries before any production code is written. Pay per milestone (outcome-based) or hourly at $30-50/hr, depending on role and seniority.

Embedded engineers

Our engineers join your team on a flexible monthly retainer. Part-time is fine and it runs month to month, with hours that overlap the US, UK and Europe, the Middle East, and Australia and Asia. Outcome-based or $30-50/hr.

FAQ

Questions

Can AI do medical coding?

It can suggest codes from the chart and explain why. A certified coder confirms, especially for complex cases, and the system keeps who confirmed what.

How do you reduce denials?

By checking eligibility and payer rules before a claim goes out, and by sorting denials by reason so the root cause gets fixed, not just the claim.

Does the billing system replace our EHR?

No. It takes encounters and charges from the EHR or practice system and handles everything from coding to payment.

Related

Related guides

START YOUR CONVERSATION

Your Next Mission-Critical
System Starts Here

Speak with a senior engineer about your requirements. No sales process, just a direct technical conversation about what you need to build.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab