PatientResource

Reads and writes the signed-in patient's FHIR records.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.24+fa54770
public final class PatientResource

Reads and writes the signed-in patient's FHIR records. Get it from Ovok.patient().

Methods

appointments

public PatientResource.AppointmentsResource appointments()

Returns the patient's appointments.

Returns: the appointments resource

schedules

public PatientResource.FhirListResource schedules()

Returns the Schedule resources.

Returns: the schedules resource

slots

public PatientResource.FhirListResource slots()

Returns the Slot resources.

Returns: the slots resource

measurements

public PatientResource.FhirRecordsResource measurements()

Returns the patient's Observation resources.

Returns: the measurements resource

carePlans

public PatientResource.FhirRecordsResource carePlans()

Returns the patient's CarePlan resources.

Returns: the care plans resource

questionnaires

public PatientResource.FhirRecordsResource questionnaires()

Returns the Questionnaire resources.

Returns: the questionnaires resource

questionnaireResponses

public PatientResource.FhirRecordsResource questionnaireResponses()

Returns the patient's QuestionnaireResponse resources.

Returns: the questionnaire responses resource

devices

public PatientResource.FhirRecordsResource devices()

Returns the patient's Device resources.

Returns: the devices resource

notifications

public PatientResource.FhirRecordsResource notifications()

Returns the patient's CommunicationRequest resources.

Returns: the notifications resource

latestObservations

public JsonNode latestObservations(
        Map<String, ?> parameters) throws IOException, InterruptedException

Reads the latest observations per code (GET /fhir/Observation/$lastn).

Parameters:

  • parameters: $lastn query parameters

Returns: the search bundle

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode latestObservations() throws IOException, InterruptedException

Reads the latest observations per code (GET /fhir/Observation/$lastn).

Returns: the search bundle

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode latestObservations(RequestOptions options) throws IOException, InterruptedException

Reads the latest observations per code (GET /fhir/Observation/$lastn).

Parameters:

  • options: per-request options, such as the timeout

Returns: the search bundle

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode latestObservations(
        Map<String, ?> parameters,
        RequestOptions options) throws IOException, InterruptedException

Reads the latest observations per code (GET /fhir/Observation/$lastn).

Parameters:

  • parameters: $lastn query parameters
  • options: per-request options, such as the timeout

Returns: the search bundle

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

dashboard

public JsonNode dashboard(Map<String, ?> parameters) throws IOException, InterruptedException

Loads the patient dashboard: profile, latest observations, measurement history and care plans.

Parameters:

  • parameters: optional query maps under latestObservations, measurementHistory and carePlans

Returns: an object with profile, latestObservations, measurementHistory and carePlans

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode dashboard() throws IOException, InterruptedException

Loads the patient dashboard: profile, latest observations, measurement history and care plans.

Returns: an object with profile, latestObservations, measurementHistory and carePlans

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode dashboard(RequestOptions options) throws IOException, InterruptedException

Loads the patient dashboard: profile, latest observations, measurement history and care plans.

Parameters:

  • options: per-request options, such as the timeout

Returns: an object with profile, latestObservations, measurementHistory and carePlans

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode dashboard(
        Map<String, ?> parameters,
        RequestOptions options) throws IOException, InterruptedException

Loads the patient dashboard: profile, latest observations, measurement history and care plans.

Parameters:

  • parameters: optional query maps under latestObservations, measurementHistory and carePlans
  • options: per-request options, such as the timeout

Returns: an object with profile, latestObservations, measurementHistory and carePlans

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

PatientResource.FhirListResource

public static class FhirListResource

Searches one FHIR resource type.

FhirListResource.list

public List<JsonNode> list(Map<String, ?> parameters) throws IOException, InterruptedException

Searches resources of this type and returns the first page.

Parameters:

  • parameters: FHIR search parameters

Returns: the matching resources

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public List<JsonNode> list() throws IOException, InterruptedException

Lists resources of this type and returns the first page.

Returns: the matching resources

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public List<JsonNode> list(RequestOptions options) throws IOException, InterruptedException

Lists resources of this type and returns the first page.

Parameters:

  • options: per-request options, such as the timeout

Returns: the matching resources

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public List<JsonNode> list(
        Map<String, ?> parameters,
        RequestOptions options) throws IOException, InterruptedException

Searches resources of this type and returns the first page.

Parameters:

  • parameters: FHIR search parameters
  • options: per-request options, such as the timeout

Returns: the matching resources

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

PatientResource.FhirRecordsResource

public static class FhirRecordsResource extends PatientResource.FhirListResource

Extends PatientResource.FhirListResource, and inherits its methods.

Searches and reads one FHIR resource type.

FhirRecordsResource.retrieve

public JsonNode retrieve(String id) throws IOException, InterruptedException

Reads one resource by ID.

Parameters:

  • id: the resource ID

Returns: the resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode retrieve(String id, RequestOptions options) throws IOException, InterruptedException

Reads one resource by ID.

Parameters:

  • id: the resource ID
  • options: per-request options, such as the timeout

Returns: the resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

PatientResource.AppointmentsResource

public static final class AppointmentsResource extends PatientResource.FhirRecordsResource

Extends PatientResource.FhirRecordsResource, and inherits its methods.

The patient's FHIR Appointment resources.

AppointmentsResource.create

public JsonNode create(JsonNode appointment) throws IOException, InterruptedException

Creates an appointment.

Parameters:

  • appointment: the Appointment resource

Returns: the created resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode create(
        JsonNode appointment,
        RequestOptions options) throws IOException, InterruptedException

Creates an appointment.

Parameters:

  • appointment: the Appointment resource
  • options: per-request options, such as the timeout

Returns: the created resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

AppointmentsResource.update

public JsonNode update(
        String id,
        Map<String, ?> appointment) throws IOException, InterruptedException

Replaces an appointment.

Parameters:

  • id: the appointment ID
  • appointment: the appointment fields

Returns: the updated resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode update(String id, JsonNode appointment) throws IOException, InterruptedException

Replaces an appointment.

Parameters:

  • id: the appointment ID
  • appointment: the Appointment resource

Returns: the updated resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode update(
        String id,
        Map<String, ?> appointment,
        RequestOptions options) throws IOException, InterruptedException

Replaces an appointment.

Parameters:

  • id: the appointment ID
  • appointment: the appointment fields
  • options: per-request options, such as the timeout

Returns: the updated resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode update(
        String id,
        JsonNode appointment,
        RequestOptions options) throws IOException, InterruptedException

Replaces an appointment.

Parameters:

  • id: the appointment ID
  • appointment: the Appointment resource
  • options: per-request options, such as the timeout

Returns: the updated resource

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Last updated on

On this page