setHealthElementsDelegations method
Future<List<DecryptedHealthElementDto> >
setHealthElementsDelegations(
- UserDto user,
- List<
IcureStubDto> icureStubDtos, - CryptoConfig<
DecryptedHealthElementDto, HealthElementDto> config
Implementation
Future<List<DecryptedHealthElementDto>> setHealthElementsDelegations(UserDto user, List<IcureStubDto> icureStubDtos,
CryptoConfig<DecryptedHealthElementDto, HealthElementDto> config) async {
final List<HealthElementDto>? healthElements = await this.rawSetHealthElementsDelegations(icureStubDtos);
return healthElements != null
? await Future.wait(healthElements.map((healthElement) => config.decryptHealthElement(user.dataOwnerId()!, healthElement)))
: List<DecryptedHealthElementDto>.empty();
}