Remove a coverage
- Sandbox: available
- On your own host? Choose https://{host} in the playground.
Removes a coverage from the patient's insurance. The others are renumbered in the same transaction.
Scope: the caller's project, with PATIENT_BILLING_ENABLED on.
Behaviour
- Your access policy must grant
patient_billing_coveragesdeleteand let you update the coverage's patient, else 403PATIENT_BILLING_NOT_ALLOWED. - A coverage no billing account names is deleted. One an account names is cancelled instead, its period ending today, so billing history stays whole.
- Changes to one patient's coverages run one at a time: another still running answers 409; send yours again.
- Answers 204 either way; the coverage no longer appears in the patient's list.
Example
curl -X DELETE 'https://api.sandbox.ovok.com/v1/patient-billing/coverages/<coverageId>' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>coverageId*stringThe coverage id.
^[A-Za-z0-9\-.]{1,64}$Removed: deleted, or cancelled when a billing account names it.
curl -X DELETE 'https://api.sandbox.ovok.com/v1/patient-billing/coverages/string'Change a coverage PATCH
Changes a coverage's insurer, member number, period or order. Fields left out stay as they are; its kind never changes, so remove it and add another instead. **Scope:** the caller's project, with `PATIENT_BILLING_ENABLED` on. ## Behaviour - Your access policy must grant `patient_billing_coverages` `update` and let you update the coverage's patient, else **403** `PATIENT_BILLING_NOT_ALLOWED`. A coverage you cannot see answers **404** `COVERAGE_NOT_FOUND`. - The coverage is checked again as a whole, with the same rules and errors as adding one. - `period: null` makes the coverage open-ended. `order` moves it; the others are renumbered in the same transaction. - Changes to one patient's coverages run one at a time: another still running answers **409**; send yours again. - `If-Match: W/"<version>"` is optional. With it, the change lands only on that version, else **412** `COVERAGE_VERSION_MISMATCH`. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/v1/patient-billing/coverages/<coverageId>' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'If-Match: W/"2"' \ -H 'Content-Type: application/json' \ -d '{ "order": 1 }' ```
Get a patient's plan GET
Gets the app plan the patient pays for, as your server last set it: a self-pay FHIR `Coverage` with the plan as its `plan` class. **Scope:** the caller's project, with `PATIENT_BILLING_ENABLED` on. ## Behaviour - Your access policy must grant `patient_billing_invoices` `read` and let you read the patient, else **403** `PATIENT_BILLING_NOT_ALLOWED` or **404** `PATIENT_BILLING_PATIENT_NOT_FOUND`. - `status` is `active` while the plan runs and `cancelled` once it ended. - A patient who never had a plan answers **404** `PLAN_NOT_FOUND`. ## Example ```bash curl 'https://api.sandbox.ovok.com/v1/patient-billing/patients/<patientId>/plan' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```