fuzzySearch method

Future<List<DecryptedPatientDto>> fuzzySearch(
  1. UserDto user,
  2. String? firstName,
  3. String? lastName,
  4. int? dateOfBirth,
  5. CryptoConfig<DecryptedPatientDto, PatientDto> config,
)

Implementation

Future<List<DecryptedPatientDto>> fuzzySearch(UserDto user, String? firstName, String? lastName, int? dateOfBirth, CryptoConfig<DecryptedPatientDto, PatientDto> config) async {
  return Future.wait(
      (await this.rawFuzzySearch(firstName: firstName, lastName: lastName, dateOfBirth: dateOfBirth))!.map((it) => config.decryptPatient(user.dataOwnerId()!, it)));
}