listPatients method
Future<DecryptedPaginatedListPatientDto?>
listPatients(
- UserDto user,
- String? hcPartyId,
- String? sortField,
- String? startKey,
- String? startDocumentId,
- int? limit,
- String? sortDirection,
- CryptoConfig<
DecryptedPatientDto, PatientDto> config,
Implementation
Future<DecryptedPaginatedListPatientDto?> listPatients(UserDto user, String? hcPartyId, String? sortField, String? startKey, String? startDocumentId, int? limit, String? sortDirection,
CryptoConfig<DecryptedPatientDto, PatientDto> config) async {
return await (await this.rawFindPatientsByHealthcareParty(hcPartyId: hcPartyId, sortField: sortField, startKey: startKey, startDocumentId: startDocumentId, limit: limit, sortDirection: sortDirection))?.let((it) async =>
DecryptedPaginatedListPatientDto(
rows: await Future.wait(it.rows.map((it) => config.decryptPatient(user.dataOwnerId()!, it))),
pageSize: it.pageSize,
totalSize: it.totalSize,
nextKeyPair: it.nextKeyPair)
);
}