Skip to content
Menu
ERPNext in practice 5 min read ·

A hospital on ERPNext: a thousand invoices a day, reconciled without a spreadsheet

Bizmap engineering team
The stance
A doctor passcode on lab reports did more for quality than any dashboard.
A question about this?Ask the team that wrote this. An engineer, not a ticket system, replies.Talk to an engineer →

Sonotech Medical Center runs six facilities across Ghana, with 500 to 600 doctors, consultants and staff and about 1,000 OPD consultations a day. Consultations, lab tests, prescriptions and patient history all ran on paper registers, a standalone billing tool and people.

We implemented ERPNext across all six facilities over about two years, in three phases. Today about 1,000 invoices a day are reconciled automatically against gateway payments. This piece is about how that reconciliation works, and about a smaller change that we think mattered more: a doctor's passcode on every lab report.

A thousand invoices is not the hard part

Creating a thousand invoices a day is easy for any billing system. The hard part is the money.

Before the project, payments were not linked to invoices. Patients paid in full, paid in part, or paid later. Someone matched gateway settlements to invoices by hand and knocked off payments manually. Partial payments were the worst: one invoice, several payments, each needing to be found and applied correctly. At a thousand invoices a day, a person doing this is always behind, and the receivables report is only as current as that person's backlog.

The fix was not a faster person. It was making every payment carry its invoice with it.

Invoice, payment request, gateway, payment entry

The chain we built runs like this:

  1. A service is selected and an invoice is created automatically.
  2. A payment request is raised against that invoice.
  3. The patient pays through Hubtel, the payment gateway the group uses.
  4. A payment entry is created automatically when the payment arrives.
  5. The payment is reconciled against the invoice it was requested for.

The key detail is unique payment identification. Every payment request carries an identifier that ties the gateway's settlement back to one invoice, so partial and full payments both land in the right place without anyone matching them. When a patient pays part now and part later, each payment finds its invoice on its own.

ERPNext provides most of the parts as standard: invoices, payment requests and payment entries are ordinary documents. What we built was the Hubtel integration and the identification logic that lets a gateway settlement find its invoice.

Payables go out through Hubtel too, and the bank account is verified before any payment is made. A payment run that pays the wrong account is far more expensive than a slow one.

One registration, many services

The second problem was at the front desk. Each service had its own form: consultation, lab, imaging. A patient who needed three services was registered three times, and nobody had one view of what that patient had been through.

Patient registration is now a single entry. The patient's services are selected on one form, and appointments are scheduled automatically. A smart-queue display on TV screens shows the appointment schedule and guides patients through their visit.

The passcode on the lab report

This is the change we would point to first.

Before the project, lab reports could be released before a doctor had approved them. There was no primary-doctor verification step, and false reports went out. Measured the way the group measured it, false-report errors stood at 70%.

The workflow is now simple and strict. Results are entered by a technician, or come from the lab machine through middleware. A doctor approves the report with a passcode. A report cannot be released without that approval. Once approved, it goes to the patient by SMS and can be downloaded on a phone, with no paper report to collect.

False-report errors fell from 70% to 10%.

Why do we say this did more for quality than any dashboard? Because a dashboard tells you after the fact how many reports went out wrong. A passcode stops the wrong report at the one point where it can still be stopped: before release, by the person who is accountable for it. Controls at the point of action change behaviour. Reports about past actions, at best, start a meeting.

The passcode also gives the hospital something it did not have before: a record of which doctor approved which report, and when.

Credit control for the people closest to the hospital

Hospitals extend credit and concessions, and the people closest to the hospital are the hardest to say no to. Employees and their relatives were receiving concessions with no control, and services were being provided without a check that a doctor had prescribed them.

The system now controls employee service credit, tracks concessions, and validates services against a doctor's prescription. None of this is about distrust. It is about making a concession a decision someone takes and records, rather than a favour nobody sees.

Pharmacy, payroll and the rest

The other modules matter less to this story but were just as necessary:

  • Pharmacy counter sales run on a point-of-sale linked to ERPNext, with batch-based inventory and expiry management.
  • HR and payroll handle contract staff with day and night rates and overtime, which had been calculated by hand. Biometric attendance feeds the system, timesheets are generated automatically, and shift rules decide who needs one.
  • Purchase and inventory sit in the same system, so stock used in a lab or a pharmacy is the same stock that was bought.

Phasing over two years

A hospital cannot stop to change systems. The OPD runs every day. So the rollout was phased:

Phase Scope
Core healthcare Patient registration, appointments, consultations and history, lab workflow, pharmacy POS with batch and expiry, billing
Automation and integration Doctor passcode approval and SMS delivery for lab reports, biometric attendance, payment-gateway auto-reconciliation
Enhancements and scale Smart-queue display, credit and concession control, HR and payroll with shifts and overtime, purchase and inventory

The order is deliberate. The clinical flow went first, because without one registration and one billing record nothing downstream can be automated. Reconciliation and the lab passcode came next, once there were reliable invoices and reports to attach them to. Payroll and purchase came when the core was stable.

What changed

Measure Before After
Efficiency, as rated by the group's management 40% 90%
Manual work 90% of tasks 20% of tasks
False-report errors 70% 10%
Invoices auto-reconciled Matched by hand About 1,000 a day, payment tracking fully automated

A note on these numbers. The efficiency figures are management's own rating of how the group runs, before and after; they are not a time study. We report them as the group reported them. The reconciliation figure is the simplest to verify: payments now find their invoices without a person in between.

What we would tell a hospital starting this

  • Fix reconciliation at the source. Make every payment carry its invoice. Matching afterwards never scales.
  • Put the control where the risk is. A passcode at release beats a report after release.
  • Register once. One patient record, many services, is the base everything else needs.
  • Treat concessions as decisions. Record who approved them, for whom, and why.
  • Phase around the OPD. Clinical flow first, automation second, back office third.

If this is your situation

If your billing team still matches gateway payments to invoices by hand, or your lab can release a report nobody has signed, read the Sonotech case study and our healthcare page, or see how we build APIs and connectors for payment gateways. Then tell us how many facilities and invoices a day you run.

Start a conversation

Want this for your operation?

Tell us which case looked closest to yours.