newPatientDelegations method

Future<DecryptedPatientDto?> newPatientDelegations(
  1. UserDto user,
  2. String patientId,
  3. List<DelegationDto> delegationDto,
  4. CryptoConfig<DecryptedPatientDto, PatientDto> config,
)

Implementation

Future<DecryptedPatientDto?> newPatientDelegations(UserDto user, String patientId, List<DelegationDto> delegationDto, CryptoConfig<DecryptedPatientDto, PatientDto> config) async {
  var patient = await this.rawNewPatientDelegations(patientId, delegationDto);
  return patient != null ? await config.decryptPatient(user.dataOwnerId()!, patient) : null;
}