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_number runs 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.update takes if_version, the version you read. A coverage changed since then is refused with OvokConflictError.
  • coverages.remove removes 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.retrieve reads the patient's plan. Setting plan to None ends it and answers None.

Read accounts and invoices

for invoice in ovok.patient_billing.invoices.list("123").auto_paging_iter():
    print(invoice["identifier"], invoice["status"])
  • accounts.list and accounts.retrieve read the patient's billing accounts.
  • invoices.record records an invoice issued elsewhere. Sending the same identifier again answers the same invoice, so the SDK retries it safely.

See also

Last updated on

On this page