findByExternalId method

Future<DecryptedPatientDto?> findByExternalId(
  1. UserDto user,
  2. String externalId,
  3. CryptoConfig<DecryptedPatientDto, PatientDto> config
)

Implementation

Future<DecryptedPatientDto?> findByExternalId(UserDto user, String externalId, CryptoConfig<DecryptedPatientDto, PatientDto> config) async {
  var patient = await this.rawGetPatientByExternalId(externalId);
  return patient != null ? await config.decryptPatient(user.dataOwnerId()!, patient) : null;
}