You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am attempting to create an Event Summary CDA Document using this java library. As per the ADHA Event Summary specification I could find ways to attach a pdf for Diagnostic Imaging or Pathology Report under Diagnostic Investigations.
My use case requires me to attach and link a PDF clinical report as part of the Event Summary. I am trying to add the link to PDF under the Event Details Section in the Narrative. I managed to add a link but I am unable to figure out how to attach the PDF so that it can be reference by the link tag.
Has anyone tried the above before? Any assistance or nudge in the right direction will be very much appreciated!
I tried the following but it did not work,
// Prepare Event Summary Content
EventSummaryContent eventSummaryContent = new EventSummaryContentImpl();
//Attach PDF as Structured FIle to Event Summary content
String base64Pdf = "base64 for the pdf goes here";
// File path to save the PDF
String filePath = "EventSummary.pdf";
// Decode the base64 string
byte[] decodedPdf = java.util.Base64.getDecoder().decode(base64Pdf);
// Create a new file
File file = new File(filePath);
// Write the decoded content to the file
try (FileOutputStream fos = new FileOutputStream(file)) {
fos.write(decodedPdf);
}
AttachedMedia attachedMedia = new AttachedMedia(file);
attachedMedia.setFileName("EventSummary.pdf");
attachedMedia.setMediaType("application/pdf"); // Set the content type of the attachment
// Add the attachment to the Event Summary
eventSummaryContent.setStructuredBodyFiles(attachedMedia);
The text was updated successfully, but these errors were encountered:
Hello,
I am attempting to create an Event Summary CDA Document using this java library. As per the ADHA Event Summary specification I could find ways to attach a pdf for Diagnostic Imaging or Pathology Report under Diagnostic Investigations.
My use case requires me to attach and link a PDF clinical report as part of the Event Summary. I am trying to add the link to PDF under the Event Details Section in the Narrative. I managed to add a link but I am unable to figure out how to attach the PDF so that it can be reference by the link tag.
Has anyone tried the above before? Any assistance or nudge in the right direction will be very much appreciated!
I tried the following but it did not work,
The text was updated successfully, but these errors were encountered: