Patient resource
Generated reference for ovok_sdk: patient resource.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.23+d339d81
AppointmentsResource
class AppointmentsResource extends FhirRecordsResourceAppointment resources. Reached through ovok.patient.appointments.
Constructors
AppointmentsResource.new
AppointmentsResource(FhirResource fhir)Built by PatientResource; use ovok.patient.appointments instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
fhir | FhirResource | positional |
Methods
AppointmentsResource.create
Future<JsonMap> create(JsonMap appointment)Creates appointment. Calls POST {fhirPath}/Appointment.
| Parameter | Type | Kind | Default |
|---|---|---|---|
appointment | JsonMap | positional |
Returns Future<Map<String, dynamic>>.
AppointmentsResource.update
Future<JsonMap> update(String id, JsonMap appointment)Replaces the appointment id with appointment.
Calls PUT {fhirPath}/Appointment/{id}.
| Parameter | Type | Kind | Default |
|---|---|---|---|
id | String | positional | |
appointment | JsonMap | positional |
Returns Future<Map<String, dynamic>>.
FhirListResource
class FhirListResourceA listable FHIR resource type. Reached through ovok.patient, e.g. ovok.patient.slots.
Constructors
FhirListResource.new
FhirListResource(FhirResource _fhir, String _type)Built by PatientResource; use its fields instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
_fhir | FhirResource | positional | |
_type | String | positional |
Methods
FhirListResource.list
Future<List<JsonMap>> list([QueryParams params = const {}])Searches the type with params and returns the first page's resources.
| Parameter | Type | Kind | Default |
|---|---|---|---|
params | QueryParams | optional positional | const {} |
Returns Future<List<Map<String, dynamic>>>.
FhirRecordsResource
class FhirRecordsResource extends FhirListResourceA FHIR resource type that can also be read by id. Reached through ovok.patient.
Constructors
FhirRecordsResource.new
FhirRecordsResource(FhirResource _fhir, String _type)Built by PatientResource; use its fields instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
_fhir | FhirResource | positional | |
_type | String | positional |
Methods
FhirRecordsResource.retrieve
Future<JsonMap> retrieve(String id)Reads one resource by id.
| Parameter | Type | Kind | Default |
|---|---|---|---|
id | String | positional |
Returns Future<Map<String, dynamic>>.
PatientResource
class PatientResourceFHIR reads for patient apps, plus a one-call dashboard.
Reached through ovok.patient. Every request throws an OvokException
subclass when it fails.
Constructors
PatientResource.new
PatientResource(HttpClient http, FhirResource fhir)Built by Ovok; use ovok.patient instead.
| Parameter | Type | Kind | Default |
|---|---|---|---|
http | HttpClient | positional | |
fhir | FhirResource | positional |
Properties
PatientResource.appointments
final AppointmentsResource appointmentsAppointment resources.
PatientResource.schedules
final FhirListResource schedulesSchedule resources.
PatientResource.slots
final FhirListResource slotsSlot resources.
PatientResource.measurements
final FhirRecordsResource measurementsObservation resources.
PatientResource.carePlans
final FhirRecordsResource carePlansCarePlan resources.
PatientResource.questionnaires
final FhirRecordsResource questionnairesQuestionnaire resources.
PatientResource.questionnaireResponses
final FhirRecordsResource questionnaireResponsesQuestionnaireResponse resources.
PatientResource.devices
final FhirRecordsResource devicesDevice resources.
PatientResource.notifications
final FhirRecordsResource notificationsCommunicationRequest resources.
Methods
PatientResource.latestObservations
Future<JsonMap> latestObservations([QueryParams params = const {}])Fetches the latest observations per code. Calls GET fhir/Observation/$lastn.
Only the patient, max and code entries of params are sent.
| Parameter | Type | Kind | Default |
|---|---|---|---|
params | QueryParams | optional positional | const {} |
Returns Future<Map<String, dynamic>>.
PatientResource.dashboard
Future<JsonMap> dashboard([JsonMap params = const {}])Fetches the signed-in user's profile, latest observations, measurement history and care plans in one call.
Calls GET auth/me, then the three searches in parallel. params may
hold latestObservations, measurementHistory and carePlans maps;
each defaults its patient to the signed-in user's.
| Parameter | Type | Kind | Default |
|---|---|---|---|
params | JsonMap | optional positional | const {} |
Returns Future<Map<String, dynamic>>.
Last updated on