Class EPrescriptionPdfGenerator
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.narrative.pdf.ChEmedEprPdfGenerator
org.projecthusky.fhir.emed.ch.epr.narrative.pdf.PdfPrescriptionGenerator
org.projecthusky.fhir.emed.ch.epr.narrative.pdf.EPrescriptionPdfGenerator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.projecthusky.fhir.emed.ch.epr.narrative.pdf.ChEmedEprPdfGenerator
ChEmedEprPdfGenerator.FontFamily -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EMediplanQrCodeGeneratorThe ePrescription QR code generator.static final Consumer<@NonNull ValidationIssue> protected Consumer<@NonNull ValidationIssue> The consumer for any encountered validation issues.Fields inherited from class org.projecthusky.fhir.emed.ch.epr.narrative.pdf.ChEmedEprPdfGenerator
htmlNarrativeGenerator, pdfConverter, pdfValidator, softwareProviderMetadata, template -
Constructor Summary
ConstructorsConstructorDescriptionEPrescriptionPdfGenerator(String template, SoftwareProviderMetadataProvider softwareProviderMetadataProvider) EPrescriptionPdfGenerator(SoftwareProviderMetadataProvider softwareProviderMetadataProvider) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generate(ChEmedEprDocumentPre preDocument, NarrativeLanguage lang) byte[]generate(ChEmedEprDocumentPre preDocument, NarrativeLanguage lang, String qrCode) Generates an ePrescription PDF document, following the ePrescription service guidelines.Methods inherited from class org.projecthusky.fhir.emed.ch.epr.narrative.pdf.ChEmedEprPdfGenerator
addFontFamily, formatHumanName, getPdfAuthor, validatePDF
-
Field Details
-
SLF4J_VALIDATION_RESULT_CONSUMER
-
validationIssueConsumer
The consumer for any encountered validation issues. By default, an Slf4 logger will log all encountered issues. -
qrCodeGenerator
The ePrescription QR code generator.
-
-
Constructor Details
-
EPrescriptionPdfGenerator
public EPrescriptionPdfGenerator(String template, SoftwareProviderMetadataProvider softwareProviderMetadataProvider) throws IOException, ParserConfigurationException -
EPrescriptionPdfGenerator
public EPrescriptionPdfGenerator(SoftwareProviderMetadataProvider softwareProviderMetadataProvider) throws IOException, ParserConfigurationException
-
-
Method Details
-
generate
- Specified by:
generatein classPdfPrescriptionGenerator
-
generate
Generates an ePrescription PDF document, following the ePrescription service guidelines.Note that the CH EMED EPR document is assumed to have the same identifier as the submitted ePrescription.
- Parameters:
preDocument- The CH EMED EPR document from which to generate the ePrescription PDF.lang- In which language the document must be generated.qrCode- The QR code to be used, as returned by HIN's ePrescription service.- Returns:
- The generated PDF as a byte array.
-