findByAccessLogUserAfterDate method

Future<DecryptedPaginatedListPatientDto?> findByAccessLogUserAfterDate(
  1. UserDto user,
  2. String userId,
  3. String? accessType,
  4. int? startDate,
  5. String? startDocumentId,
  6. int? limit,
  7. CryptoConfig<DecryptedPatientDto, PatientDto> config,
)

Implementation

Future<DecryptedPaginatedListPatientDto?> findByAccessLogUserAfterDate(UserDto user, String userId, String? accessType, int? startDate,
    String? startDocumentId, int? limit, CryptoConfig<DecryptedPatientDto, PatientDto> config) async {

  return await (await this.rawFindPatientsByAccessLogUserAfterDate(userId, accessType: accessType, startDocumentId: startDocumentId, startDate: startDate, 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)
  );
}