getDataSampleAttachmentDocument method
Get document metadata of a DataSample attachment
Data Samples may contain attachments such as prescriptions, reports, ... Use this method to get the document metadata information of an attachment
Parameters:
Implementation
@override
Future<Document?> getDataSampleAttachmentDocument(String dataSampleId, String documentId) async {
final localCrypto = api.crypto;
final currentUser = (await api.baseUserApi.getCurrentUser())
?? (throw StateError("There is no user currently logged in. You must call this method from an authenticated MedTechApi"));
return DocumentDtoMapper((await _getDataSampleAttachmentDocumentFromICure(localCrypto, currentUser, dataSampleId, documentId))).toDocument();
}