listAllDeleted method

Future<DecryptedPaginatedListPatientDto?> listAllDeleted(
  1. UserDto user,
  2. int? startDate,
  3. int? endDate,
  4. bool? desc,
  5. String? startDocumentId,
  6. int? limit,
  7. CryptoConfig<DecryptedPatientDto, PatientDto> config,
)

Implementation

Future<DecryptedPaginatedListPatientDto?> listAllDeleted(UserDto user, int? startDate, int? endDate, bool? desc, String? startDocumentId,
    int? limit , CryptoConfig<DecryptedPatientDto, PatientDto> config) async {

  return await (await this.rawFindDeletedPatients(startDate: startDate, endDate: endDate, desc: desc, startDocumentId: startDocumentId, limit: limit))?.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)
  );
}