findByNameBirthSsinAuto method

Future<DecryptedPaginatedListPatientDto?> findByNameBirthSsinAuto(
  1. UserDto user,
  2. String? healthcarePartyId,
  3. String? filterValue,
  4. String? startKey,
  5. String? startDocumentId,
  6. int? limit,
  7. String? sortDirection,
  8. CryptoConfig<DecryptedPatientDto, PatientDto> config,
)

Implementation

Future<DecryptedPaginatedListPatientDto?> findByNameBirthSsinAuto(UserDto user, String? healthcarePartyId, String? filterValue, String? startKey,
    String? startDocumentId, int? limit, String? sortDirection, CryptoConfig<DecryptedPatientDto, PatientDto> config) async {

  return await (await this.rawFindPatientsByNameBirthSsinAuto(healthcarePartyId: healthcarePartyId, filterValue: filterValue,
      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)
  );
}