DAV-ABDA / eRezept-Referenzvalidator

eRezept-Referenzvalidator auf Basis des HAPI-FHIR-Validators
Apache License 2.0
20 stars 8 forks source link

Profile reference 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1' has not been checked because it is unknown #38

Closed aWuttig closed 1 year ago

aWuttig commented 1 year ago

When we run the validator v1.0.0 against an valid erxReceipt we get the following error:

Bundle.entry[2].resource.ofType(Binary).meta.profile[0] Profile reference 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1' has not been checked because it is unknown

How can we fix this. I see you set the flag instanceValidator.setErrorForUnknownProfiles(true); so this ERROR is triggered by this.

Complete Output:

0    [main] INFO  ca.uhn.fhir.util.VersionUtil  - HAPI FHIR version 5.7.9 - Rev 1fa074f0c3
10   [main] INFO  ca.uhn.fhir.context.FhirContext  - Creating new FHIR context for FHIR version [R4]
461  [main] DEBUG de.abda.fhir.validator.core.Validator  - Start validating File: PZN_Nr1_ErxReceipt.xml
898  [main] INFO  de.abda.fhir.validator.core.Validator  - Validator Version 1.0.0
899  [main] INFO  de.abda.fhir.validator.core.Validator  - noInstanceValidityCheck: false
960  [main] INFO  de.abda.fhir.validator.core.Validator  - Instance valid: 2023-02-13 between 2022-01-01 and 2023-06-30
3204 [main] INFO  ca.uhn.fhir.util.XmlUtil  - FHIR XML procesing will use StAX implementation 'null' version 'null'
3913 [main] INFO  ca.uhn.fhir.validation.FhirValidator  - Ph-schematron library not found on classpath, will not attempt to perform schematron validation
3915 [main] DEBUG de.abda.fhir.validator.core.ValidatorFactory  - Validator initialization succeeded for profile "https://gematik.de/fhir/StructureDefinition/ErxReceipt" version "1.1.1"
3928 [main] INFO  ca.uhn.fhir.context.FhirContext  - Creating new FHIR context for FHIR version [R5]
4071 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading structure definitions from classpath: /org/hl7/fhir/r4/model/profile/profiles-resources.xml
7571 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading structure definitions from classpath: /org/hl7/fhir/r4/model/profile/profiles-types.xml
7670 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading structure definitions from classpath: /org/hl7/fhir/r4/model/profile/profiles-others.xml
7881 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading structure definitions from classpath: /org/hl7/fhir/r4/model/extension/extension-definitions.xml
12704 [main] INFO  org.hl7.fhir.common.hapi.validation.validator.VersionSpecificWorkerContextWrapper  - Generating snapshot for StructureDefinition: https://gematik.de/fhir/StructureDefinition/ErxReceipt
15814 [main] INFO  org.hl7.fhir.common.hapi.validation.validator.VersionSpecificWorkerContextWrapper  - Generating snapshot for StructureDefinition: https://gematik.de/fhir/StructureDefinition/ErxSignature
16435 [main] INFO  org.hl7.fhir.common.hapi.validation.validator.VersionSpecificWorkerContextWrapper  - Generating snapshot for StructureDefinition: https://gematik.de/fhir/StructureDefinition/ErxDevice
17126 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading CodeSystem/ValueSet from classpath: /org/hl7/fhir/r4/model/valueset/valuesets.xml
17422 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading CodeSystem/ValueSet from classpath: /org/hl7/fhir/r4/model/valueset/v2-tables.xml
17592 [main] INFO  ca.uhn.fhir.context.support.DefaultProfileValidationSupport  - Loading CodeSystem/ValueSet from classpath: /org/hl7/fhir/r4/model/valueset/v3-codesystems.xml
17763 [main] INFO  org.hl7.fhir.common.hapi.validation.validator.VersionSpecificWorkerContextWrapper  - Generating snapshot for StructureDefinition: https://gematik.de/fhir/StructureDefinition/ErxComposition
18049 [main] INFO  de.abda.fhir.validator.core.Validator  - Validator message: ERROR Bundle.entry[2].resource.ofType(Binary).meta.profile[0] Profile reference 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1' has not been checked because it is unknown
magrimuc commented 1 year ago

Can't that profile 'http://hl7.org/fhir/StructureDefinition/Binary|4.0.1' become known to the validator? The increasing risk of blind spots likes to be mentioned.

scanacs-agruhn commented 1 year ago

We could solve this issue by adding the following start parameters to jvm.

-Duser.language=de
-Duser.country=DE
-Duser.timezone=Europe/Berlin
ABDA-FHIR commented 1 year ago

Fixed with release 1.0.1. The error-message showed the language-dependent evaluation, which requires an english locale in the environment.