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 PatientResourceReads 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, InterruptedExceptionReads the latest observations per code (GET /fhir/Observation/$lastn).
Parameters:
parameters:$lastnquery parameters
Returns: the search bundle
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode latestObservations() throws IOException, InterruptedExceptionReads 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 readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode latestObservations(RequestOptions options) throws IOException, InterruptedExceptionReads 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 readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode latestObservations(
Map<String, ?> parameters,
RequestOptions options) throws IOException, InterruptedExceptionReads the latest observations per code (GET /fhir/Observation/$lastn).
Parameters:
parameters:$lastnquery parametersoptions: per-request options, such as the timeout
Returns: the search bundle
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
dashboard
public JsonNode dashboard(Map<String, ?> parameters) throws IOException, InterruptedExceptionLoads the patient dashboard: profile, latest observations, measurement history and care plans.
Parameters:
parameters: optional query maps underlatestObservations,measurementHistoryandcarePlans
Returns: an object with profile, latestObservations, measurementHistory and carePlans
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode dashboard() throws IOException, InterruptedExceptionLoads 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 readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode dashboard(RequestOptions options) throws IOException, InterruptedExceptionLoads 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 readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode dashboard(
Map<String, ?> parameters,
RequestOptions options) throws IOException, InterruptedExceptionLoads the patient dashboard: profile, latest observations, measurement history and care plans.
Parameters:
parameters: optional query maps underlatestObservations,measurementHistoryandcarePlansoptions: 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 readInterruptedException: if the thread is interrupted while waiting for the response
PatientResource.FhirListResource
public static class FhirListResourceSearches one FHIR resource type.
FhirListResource.list
public List<JsonNode> list(Map<String, ?> parameters) throws IOException, InterruptedExceptionSearches 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 readInterruptedException: if the thread is interrupted while waiting for the response
public List<JsonNode> list() throws IOException, InterruptedExceptionLists 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 readInterruptedException: if the thread is interrupted while waiting for the response
public List<JsonNode> list(RequestOptions options) throws IOException, InterruptedExceptionLists 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 readInterruptedException: if the thread is interrupted while waiting for the response
public List<JsonNode> list(
Map<String, ?> parameters,
RequestOptions options) throws IOException, InterruptedExceptionSearches resources of this type and returns the first page.
Parameters:
parameters: FHIR search parametersoptions: per-request options, such as the timeout
Returns: the matching resources
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
PatientResource.FhirRecordsResource
public static class FhirRecordsResource extends PatientResource.FhirListResourceExtends PatientResource.FhirListResource, and inherits its methods.
Searches and reads one FHIR resource type.
FhirRecordsResource.retrieve
public JsonNode retrieve(String id) throws IOException, InterruptedExceptionReads 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 readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode retrieve(String id, RequestOptions options) throws IOException, InterruptedExceptionReads one resource by ID.
Parameters:
id: the resource IDoptions: per-request options, such as the timeout
Returns: the resource
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
PatientResource.AppointmentsResource
public static final class AppointmentsResource extends PatientResource.FhirRecordsResourceExtends PatientResource.FhirRecordsResource, and inherits its methods.
The patient's FHIR Appointment resources.
AppointmentsResource.create
public JsonNode create(JsonNode appointment) throws IOException, InterruptedExceptionCreates an appointment.
Parameters:
appointment: theAppointmentresource
Returns: the created resource
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode create(
JsonNode appointment,
RequestOptions options) throws IOException, InterruptedExceptionCreates an appointment.
Parameters:
appointment: theAppointmentresourceoptions: per-request options, such as the timeout
Returns: the created resource
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
AppointmentsResource.update
public JsonNode update(
String id,
Map<String, ?> appointment) throws IOException, InterruptedExceptionReplaces an appointment.
Parameters:
id: the appointment IDappointment: the appointment fields
Returns: the updated resource
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode update(String id, JsonNode appointment) throws IOException, InterruptedExceptionReplaces an appointment.
Parameters:
id: the appointment IDappointment: theAppointmentresource
Returns: the updated resource
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode update(
String id,
Map<String, ?> appointment,
RequestOptions options) throws IOException, InterruptedExceptionReplaces an appointment.
Parameters:
id: the appointment IDappointment: the appointment fieldsoptions: per-request options, such as the timeout
Returns: the updated resource
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public JsonNode update(
String id,
JsonNode appointment,
RequestOptions options) throws IOException, InterruptedExceptionReplaces an appointment.
Parameters:
id: the appointment IDappointment: theAppointmentresourceoptions: per-request options, such as the timeout
Returns: the updated resource
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