PatientBillingResource
Patients' health insurance, plans, billing accounts and invoices, as FHIR Coverage, Account and Invoice, under /v1/patient-billing; the project's PATIENT_BILLING_ENABLED setting must be on.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.33+8af64df
public final class PatientBillingResourcePatients' health insurance, plans, billing accounts and invoices, as FHIR Coverage, Account and Invoice, under /v1/patient-billing; the project's PATIENT_BILLING_ENABLED setting must be on. Get it from Ovok.patientBilling().
Methods
insurers
public PatientBillingResource.Insurers insurers()Returns the health insurer directory.
Returns: the insurer routes
coverages
public PatientBillingResource.Coverages coverages()Returns patients' health insurances.
Returns: the coverage routes
plans
public PatientBillingResource.Plans plans()Returns the plan each patient pays for.
Returns: the plan routes
accounts
public PatientBillingResource.Accounts accounts()Returns patients' billing accounts.
Returns: the account routes
invoices
public PatientBillingResource.Invoices invoices()Returns patients' invoices.
Returns: the invoice routes
PatientBillingResource.Insurers
public static final class InsurersOvok's directory of health insurers.
Insurers.list
public List<JsonNode> list(
Map<String, ?> params,
RequestOptions options) throws IOException, InterruptedExceptionLists the insurers that match, by kind and name (GET /v1/patient-billing/insurers).
Parameters:
params: optionalcountry,kind(statutoryorprivate) andqueryoptions: per-request options, such as the timeout
Returns: the insurers
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
PatientBillingResource.Coverages
public static final class CoveragesPatients' health insurances.
Coverages.list
public List<JsonNode> list(
String patientId,
RequestOptions options) throws IOException, InterruptedExceptionLists a patient's active coverages, in the order they apply (GET /v1/patient-billing/patients/{patientId}/coverages).
Parameters:
patientId: the patient idoptions: per-request options, such as the timeout
Returns: the coverages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Coverages.create
public JsonNode create(
String patientId,
Object coverage,
RequestOptions options) throws IOException, InterruptedExceptionAdds a coverage; the insurer must be in the directory and the member number must be valid (POST /v1/patient-billing/patients/{patientId}/coverages).
Parameters:
patientId: the patient idcoverage: the coverage to addoptions: per-request options, such as the timeout
Returns: the coverage
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the responseOvokConflictException: if another statutory coverage runs in that periodOvokValidationException: if the member number, insurer, period or country is invalid
Coverages.update
public JsonNode update(
String coverageId,
Object changes,
RequestOptions options) throws IOException, InterruptedExceptionChanges a coverage (PATCH /v1/patient-billing/coverages/{coverageId}).
Parameters:
coverageId: the coverage idchanges: the fields to changeoptions: per-request options, such as the timeout
Returns: the coverage
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the responseOvokConflictException: if another statutory coverage runs in that period
public JsonNode update(
String coverageId,
Object changes,
String ifVersion,
RequestOptions options) throws IOException, InterruptedExceptionChanges a coverage only if it is still at the version you read (PATCH /v1/patient-billing/coverages/{coverageId} with If-Match).
Parameters:
coverageId: the coverage idchanges: the fields to changeifVersion: the version you readoptions: per-request options, such as the timeout
Returns: the coverage
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the responseOvokConflictException: if the coverage changed sinceifVersion, or another statutory coverage runs in that period
Coverages.remove
public void remove(
String coverageId,
RequestOptions options) throws IOException, InterruptedExceptionRemoves a coverage: deletes it, or cancels it when a billing account names it (DELETE /v1/patient-billing/coverages/{coverageId}).
Parameters:
coverageId: the coverage idoptions: per-request options, such as the timeout
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
PatientBillingResource.Plans
public static final class PlansThe plan each patient pays for; setting it is for project admins and admin client applications.
Plans.retrieve
public JsonNode retrieve(
String patientId,
RequestOptions options) throws IOException, InterruptedExceptionReads a patient's plan, running or ended (GET /v1/patient-billing/patients/{patientId}/plan).
Parameters:
patientId: the patient idoptions: per-request options, such as the timeout
Returns: the plan
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the responseOvokNotFoundException: if the patient has no plan
Plans.set
public JsonNode set(
String patientId,
Object plan,
RequestOptions options) throws IOException, InterruptedExceptionSets a patient's plan, or ends it with {"plan": null} (PUT /v1/patient-billing/patients/{patientId}/plan).
Parameters:
patientId: the patient idplan: the plan to set, or{"plan": null}to end itoptions: per-request options, such as the timeout
Returns: the plan as set or ended, or null when there was no plan to end
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
PatientBillingResource.Accounts
public static final class AccountsPatients' billing accounts.
Accounts.list
public List<JsonNode> list(
String patientId,
RequestOptions options) throws IOException, InterruptedExceptionLists a patient's billing accounts (GET /v1/patient-billing/patients/{patientId}/accounts).
Parameters:
patientId: the patient idoptions: per-request options, such as the timeout
Returns: the accounts
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Accounts.retrieve
public JsonNode retrieve(
String accountId,
RequestOptions options) throws IOException, InterruptedExceptionReads one billing account (GET /v1/patient-billing/accounts/{accountId}).
Parameters:
accountId: the account idoptions: per-request options, such as the timeout
Returns: the account
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
PatientBillingResource.Invoices
public static final class InvoicesPatients' invoices; recording them is for project admins and admin client applications.
Invoices.list
public Page<JsonNode> list(
String patientId,
Map<String, ?> params,
RequestOptions options) throws IOException, InterruptedExceptionLists a patient's invoices, latest first (GET /v1/patient-billing/patients/{patientId}/invoices).
Parameters:
patientId: the patient idparams: optional filters andlimitoptions: per-request options, such as the timeout
Returns: the first page; iterating it loads the next pages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Invoices.retrieve
public JsonNode retrieve(
String invoiceId,
RequestOptions options) throws IOException, InterruptedExceptionReads one invoice (GET /v1/patient-billing/invoices/{invoiceId}).
Parameters:
invoiceId: the invoice idoptions: per-request options, such as the timeout
Returns: the invoice
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Invoices.record
public JsonNode record(
String patientId,
Object invoice,
RequestOptions options) throws IOException, InterruptedExceptionRecords an invoice, or updates the one recorded with the same identifier, so a retry is safe (POST /v1/patient-billing/patients/{patientId}/invoices).
Parameters:
patientId: the patient idinvoice: the invoice to recordoptions: per-request options, such as the timeout
Returns: the invoice
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on