gematik / app-referencevalidator

The reference validator is a tool to perform advanced validation of FHIR resources for TI applications and interoperability standards
https://fachportal.gematik.de/hersteller-anbieter/primaersysteme/referenzvalidator
Other
22 stars 4 forks source link

Error while validating ErxMedicationDispense #4

Closed TillTedRed closed 1 year ago

TillTedRed commented 1 year ago

Hello there, i got a little issue with a validation of an ErxMedicationDispense. It returns an UnsupportedProfileException when i try to validate the resource as a String with the new 0.4.1 update.

de.gematik.refv.commons.exceptions.UnsupportedProfileException: Profile https://gematik.de/fhir/StructureDefinition/ErxMedicationDispense unsupported
    at de.gematik.refv.commons.validation.GenericValidator.getPackageDefinitionForProfile(GenericValidator.java:103)
    at de.gematik.refv.commons.validation.GenericValidator.validate(GenericValidator.java:61)
    at de.gematik.refv.valmodule.base.ConfigurationBasedValidationModule.validateString(ConfigurationBasedValidationModule.java:71)
alexey-tschudnowsky commented 1 year ago

Hi @TillTedRed , thank you for the issue report. We assume, you are validating an instance with meta.profile "https://gematik.de/fhir/StructureDefinition/ErxMedicationDispense" (without version after a pipe!). Please provide your example otherwise.

Indeed, it's an issue in the validator and it doesn't process ErxMedicationDispense-instances without profile version info, although it is allowed by the ErxMedicationDispense-profile. We will provide a fix in one of the next validator releases.

Be careful, however, that instances without meta.profile or without a version after a pipe in the meta.profile are not accepted by E-Prescription server (Fachdienst) as well (refer to a valid example at erp-apicdoc, which contains "https://gematik.de/fhir/StructureDefinition/ErxMedicationDispense|1.1.1" in the meta.profile). It's unlikely that the behaviour in the Fachdienst will be changed to support missing profile versions due to the upcoming switch to 1.2.0-profile, where the meta.profile value is mandatory and is fixed to _https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_MedicationDispense|1.2_.

TillTedRed commented 1 year ago

Hello @alexey-tschudnowsky , i indeed used an instance without the version after a pipe. I added the version and it worked like a charm. Thank you very much for the answer.