Class EMediplanPdfMedicationCardGenerator
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.narrative.pdf.PdfMedicationCardGenerator
org.projecthusky.fhir.emed.ch.epr.narrative.pdf.EMediplanPdfMedicationCardGenerator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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.PdfMedicationCardGenerator
FONT_FAMILY, htmlNarrativeGenerator, pdfConverter, pdfValidator, softwareProviderMetadata, template
-
Constructor Summary
ConstructorsConstructorDescriptionEMediplanPdfMedicationCardGenerator
(String template, SoftwareProviderMetadataProvider softwareProviderMetadataProvider) EMediplanPdfMedicationCardGenerator
(SoftwareProviderMetadataProvider softwareProviderMetadataProvider) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
generate
(ChEmedEprDocumentPmlc pmlcDocument, NarrativeLanguage lang) protected String
generateQrCode
(ChEmedEprDocumentPmlc pmlcDocument) Gets the eMediplan QR code for the PMLC document content.Methods inherited from class org.projecthusky.fhir.emed.ch.epr.narrative.pdf.PdfMedicationCardGenerator
formatHumanName, getDefaultChEmedEprPdfTemplate, getDefaultEmediplanPdfTemplate, 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.
-
-
Constructor Details
-
EMediplanPdfMedicationCardGenerator
public EMediplanPdfMedicationCardGenerator(String template, SoftwareProviderMetadataProvider softwareProviderMetadataProvider) throws IOException, ParserConfigurationException -
EMediplanPdfMedicationCardGenerator
public EMediplanPdfMedicationCardGenerator(SoftwareProviderMetadataProvider softwareProviderMetadataProvider) throws IOException, ParserConfigurationException
-
-
Method Details
-
generate
- Specified by:
generate
in classPdfMedicationCardGenerator
-
generateQrCode
protected String generateQrCode(ChEmedEprDocumentPmlc pmlcDocument) throws EMediplanPdfMedicationCardGenerator.QrCodeGenerationException Gets the eMediplan QR code for the PMLC document content.- Parameters:
pmlcDocument
- The PMLC document for which to generate the eMediplan QR code.- Returns:
- The Base64-encoded PNG image render of the QR code, as a string.
- Throws:
EMediplanPdfMedicationCardGenerator.QrCodeGenerationException
- In case of error either transforming the PMLC to a eMediplan format or while generating the QR code itself.
-