A price list of what you charge for, invoices raised against it, and payments recorded as they come in.

Consultations, procedures, bed charges and diagnostics, with a price against each.
The price is copied onto the invoice
When a charge is raised, the price in force that day is written onto the invoice line. Put the price up next month and last month’s invoice is untouched. An invoice is a record of what somebody was charged, and a price list that rewrites history is worse than no price list.
There is a test for this. It raises an invoice, changes the price, and checks the original line still reads the old figure.
Part payment is a row, not a number

Outstanding invoices by default, settled ones on request.
A deposit today and the balance next week is the normal case, so each payment is its own row with its amount, method, reference and date. The old schema had a single “amount received” column, which cannot express two payments and loses the method of the first one.
Whether an invoice is unpaid, part paid or settled is worked out from those rows every time it is shown. Nobody types it, so it cannot be stale. Anywhere the old system had a status column somebody set by hand, it had drifted.
An invoice cannot be overpaid
The balance check and the payment are one atomic step, so two payments taken at the same moment cannot both be accepted against the same outstanding figure. A refused payment is not recorded at all rather than being written and reversed.
Who owes what, and for how long

Aged into the usual buckets, from the oldest unsettled invoice.
The age comes from the patient’s oldest unsettled invoice rather than their most recent one, so a balance that has been sitting for four months does not look fresh because something new was added to it last week.
Accounting alongside it
Income and expenses by sector, printable period reports, and a balance you can hand to an accountant.
Two things to be straight about. There is no payroll module. And while gateway credentials can be stored, nothing in this release charges a card; invoices are recorded as paid by whatever method you enter. The doctor and hospital commission percentages on the price list are recorded and are not applied to anything yet.
See it rather than read about it. Billing is covered in the user guide.
The user guide walks the whole system in the order you would meet it, and the screenshots page has every screen. The source is on GitHub under the GPL v3.