findByHCPartyAndPatientForeignKeys method

Future<List<DecryptedDocumentDto>> findByHCPartyAndPatientForeignKeys(
  1. UserDto user,
  2. String hcpId,
  3. String patientSecretForeignKeys,
  4. CryptoConfig<DecryptedDocumentDto, DocumentDto> config,
)

Implementation

Future<List<DecryptedDocumentDto>> findByHCPartyAndPatientForeignKeys(UserDto user, String hcpId, String patientSecretForeignKeys, CryptoConfig<DecryptedDocumentDto, DocumentDto> config) async {
  return Future.wait(
      (await this.rawListDocumentsByHCPartyAndPatientForeignKeys(hcpId, patientSecretForeignKeys))!
          .map((it) => config.decryptDocument(user.dataOwnerId()!, it))
  );
}