Purpose and context
This article and video aim to support users of the PLM Portal - ePI to validate FHIR xml files against the EU ePI Common Standard on their local machine, outside of the portal.
Validating ePI against the EU ePI Common Standard
Follow these steps to validate your ePI locally:
1) Download the jar to use the HL7 Validator on your local machine (under 2, Downloading the Validator):
https://confluence.hl7.org/spaces/FHIR/pages/35718580/Using+the+FHIR+Validator
2) Download the latest structure definitions from the EMRN ePI Implementation Guide (under 1.5, Structure Definitions) and unpack:
https://epi.ema.europa.eu/fhirig/index.html
The folder includes all relevant base profiles, code systems and value sets.
3) Open the FHIR xml you want to validate and add the url of the profiles you want to validate against in the respective meta element. See also below to identify the correct profiles to validate your files against.
E.g. under the composition element of a bundle of type document for an SmPC for a CAP in English language, add the following profiles:
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionCAP" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionSmPC" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUQRD-CAP-template-new-SmPC-en" />
</meta>
...
</Composition>
4) Open the Command Prompt on your computer and navigate to the folder where you stored the jar file.
5) Put the following command in the command line:
java -jar validator_cli.jar -ig [package|file|folder|url] [source]
6) You can output the validation report to HTML or JSON by adding the following command:
-output [file]
Example Command:
C:\Users>java -jar validator_cli.jar -ig C:\Users\epiprofiles C:\Users\DocumentFolder\DocumentName.xml -output C:\Users\DocumentFolder\ValidationReport.html
You can find a list with possible validation errors in the User Guide for Applicants.
Video guide to validating ePI locally
Ten-minute walk-through of validating ePI locally
Identifying the correct profiles to validate your ePI file
To ensure compliance with the EU ePI Common Standard specification, it is essential to validate your ePI file using the appropriate FHIR profiles. This guide provides a simple, step-by-step checklist to help applicants correctly apply the necessary profiles during validation. Follow these steps for each individual ePI document (SmPC, Annex II, Labelling, PL) you want to validate.
1) Validate the Bundle Structure
Validating against the EUEpiBundle profile ensures that the overall structure of your ePI bundle of type document conforms to the expected EU standard. Add the Bundle profile in your Bundle resource:
<Bundle>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiBundle" />
</meta>
...
</Bundle>
2) Validate the Composition Structure
Validating against the EUEpiComposition profile ensures that the core content of your ePI document—such as the document structure and narrative—is aligned with EU requirements. Add the Composition profile in your Composition resource:
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiComposition" />
...
</meta>
...
</Composition>
3) Validate the Authorisation Type (CAP or NAP)
Validating against the Composition profiles for CAP or NAP ensures that the core content of your ePI document is aligned with requirements specific to the authorisation type. Depending on whether your product is Centrally Authorised (CAP) or Nationally Authorised (NAP), include the appropriate Composition profile in your Composition resource:
For Centrally Authorised Products (CAP), add the EUEpiCompositionCAP profile:
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiComposition" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionCAP" />
...
</meta>
...
</Composition>
For Nationally Authorised Products (NAP), add the EUEpiCompositionNAPMRPDCP profile:
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiComposition" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionNAPMRPDCP" />
...
</meta>
...
</Composition>
4) Validate the Document Type (SmPC, Annex II, Labelling or Package Leaflet)
Validating against the Composition profiles for SmPC, Annex II, Labelling or PL ensures that the core content of your ePI document is aligned with requirements specific to the document type. Only one of the following Composition profiles should be added to the Composition resource:
Summary of profile URLs by document type
Example (for SmPC)
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiComposition" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionCAP" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionSmPC" />
...
</meta>
...
</Composition>
5) Apply the correct QRD Template profile based on authorisation type, document type and language
Validating against the QRD Template profile ensures that the core content of your ePI document is aligned with specific requirements of the product-information (QRD) template for human medicines.
This profile is determined by a combination of:
- Type of medicine authorisation (CAP or NAP)
- Type of document (SmPC, Annex II, Labelling or Package Leaflet)
- Language of the document
Only one of the available QRD Template profiles should be added to each Composition resource.
Where to find the QRD template profiles
All QRD template profiles are included in the official EU ePI profiles package, available in the EMRN ePI Implementation Guide:
How to select the right profile
After extracting the ZIP file, navigate to the folder containing the QRD profiles.
- Identify the language of your document (e.g., da for Danish).
- Search the extracted folder for profiles that include this language code.
- Select the profile that matches your:
- Authorisation type (CAP or NAP)
- Document type (SmPC, Annex II, Labelling or Package Leaflet)
Example 1 (for an SmPC for a CAP, English)
Add the following profile to the Composition resource:
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiComposition" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionCAP" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionSmPC" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUQRD-CAP-template-new-SmPC-en" />
</meta>
...
</Composition>
Example 2 (for a Package Leaflet for a NAP, Danish)
Add the following profile to the Composition resource:
<Composition>
<meta>
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiComposition" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionNAPMRPDCP" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUEpiCompositionPackageLeaflet" />
<profile value="http://ema.europa.eu/fhir/StructureDefinition/EUQRD-NAP-template-new-ORG-100003918-Package-Leaflet-da" />
</meta>
...
</Composition>
Note: The ORG-100003918 segment in the NAP profile name refers to the organisation identifier and may vary depending on the specific national authority.
Full example (for an SmPC for a CAP, English)