Billing
BillingInvoice
represents a customer's or patient's payables.
Invoice, Items, and Payments
Each BillingInvoice
can contain multiple BillingItem
s to represent each line item that must be paid by a customer or patient. Each BillingItem
can also have one or more BillingPayment
to represent each payment type and amount a customer or patient made for a specific BillingItem
. Each BillingItem
must be added to the BillingInvoice
before finalizing it while BillingPayment
s can be made event after finalizing the BillingInvoice
.
Creating Invoice
A billing invoice can be created either by using the billing-invoices
API's create
method or by creating a MedicalEncounter
with invoice: true
on its payload.
Notes
Created BillingInvoice
s are drafts
until finalized.
Finalizing Invoice
BillingInvoice
s should be marked as finalized at the end of the actual patient visit as it would cascade to finalizing the associated BillingItem
s created during the visit (they would be considered drafts otherwise). To finalize an BillingInvoice
, a special patch
operator finalize: true
can be use in the medical-encounters
API's patch
method.
Removing Invoice
Deleting an invoice will also delete all associated BillingItem
s (w/c would also delete all associated BillingPayment
s)
Creating Invoice Items
Created BillingItem
s are drafts
until finalized either via directly finalizing the BillingItem
or via the cascading effect of finalizing an BillingInvoice
.
Creating Payments
BillingPayment
s can be created even after finalizing a BillingInvoice
. Multiple BillingPayment
s can be created for a specific BillingItem
to represent patient payments or multiple payment methods but the total amount cannot exceed the total payable amount of a BillingItem
.