PatientApi class abstract

Implementers

Constructors

PatientApi([ApiClient? apiClient])

Properties

apiClient ApiClient
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createOrModifyPatient(Patient patient) Future<Patient?>
Create or update a Patient
deletePatient(String patientId) Future<String?>
Delete a Patient
filterPatients(Filter<Patient> filter, {String? nextPatientId, int? limit, String? startKey}) Future<PaginatedListPatient?>
Load patients from the database by filtering them using the provided filter.
getPatient(String patientId) Future<Patient?>
Get a Patient
getPatientAndTryDecrypt(String patientId) Future<PotentiallyEncryptedPatient?>
Gets a patient and tries to decrypt its content. If it is not possible to decrypt the content only the unencrypted data will be available. This method is useful to allow new patient users to access some of their own data before their doctor actually gave them access to their own data: instead of giving an error if the data can't be decrypted (like what happens in getPatient) you will be able to get at least partial information.
giveAccessTo(Patient patient, String delegatedTo) Future<Patient>
Give access to another dataOwner to the patient
giveAccessToPotentiallyEncrypted(PotentiallyEncryptedPatient patient, String delegatedTo) Future<PotentiallyEncryptedPatient>
matchPatients(Filter filter) Future<List<String>?>
Load patient ids from the database by filtering them using the provided filter.
modifyPotentiallyEncryptedPatient(PotentiallyEncryptedPatient modifiedPatient) Future<PotentiallyEncryptedPatient?>
Modifies a potentially encrypted patient, ensuring that if the patient could not be decrypted there was no change to data which should be encrypted according to the current api configuration. Similarly to getPatientAndTryDecrypt this method is useful when a patient needs to update is own data before an hcp gave him access to his own encrypted data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited