Namespaces
Patient billing
Learn how to record patients' health insurance, set the plan they pay for and read their billing accounts and invoices.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.34+53a6a64
ovok.patient_billing keeps what a patient pays for and who pays it: their insurance coverages, their plan, their billing accounts and their invoices.
Record insurance
from ovok_sdk import check_member_number
insurer = ovok.patient_billing.insurers.list({"country": "DE", "kind": "statutory", "query": "AOK"})[0]
if check_member_number(country="DE", kind="statutory", value="A123456780"):
coverage = ovok.patient_billing.coverages.create(
"123", {"kind": "statutory", "insurerIk": insurer["ik"], "memberNumber": "A123456780"}
)check_member_numberruns the same rule as the server. A statutory number is a KVNR whose check digit matches. A private policy number has 1 to 30 characters. Only Germany (DE) is supported.coverages.updatetakesif_version, theversionyou read. A coverage changed since then is refused withOvokConflictError.coverages.removeremoves a coverage.
Set the plan
ovok.patient_billing.plans.set("123", {"plan": {"code": "premium"}, "period": {"start": "2026-12-01"}})
ovok.patient_billing.plans.set("123", {"plan": None})plans.retrievereads the patient's plan. SettingplantoNoneends it and answersNone.
Read accounts and invoices
for invoice in ovok.patient_billing.invoices.list("123").auto_paging_iter():
print(invoice["identifier"], invoice["status"])accounts.listandaccounts.retrieveread the patient's billing accounts.invoices.recordrecords an invoice issued elsewhere. Sending the sameidentifieragain answers the same invoice, so the SDK retries it safely.
See also
Last updated on