Skip to content

The validator should try to go on if it encounters an SchemaResolutionFailedException and throw an error/warning instead #579

@ArdonToonstra

Description

@ArdonToonstra

Currently, our validator is useless when trying to validate against https://simplifier.net/packages/fhir.r4.wales.psom/1.0.0-rc3 because of an error in that spec. The CarePlan profile sets an incorrect slicing discriminator: on CarePlan.activity a resolve() is used that should have a path to CarePlan.activity.reference instead CarePlan.activity.

Error:

exception : SchemaResolutionFailedException: Encountered an error while loading schema 'https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-CarePlan': resolve() should only be called on elements of type Reference at 'https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-CarePlan#CarePlan.activity (CarePlan.activity:completeQuestionnaire)'.

Example to reproduce: https://simplifier.net/packages/fhir.r4.wales.psom/1.0.0-rc3/files/2462252
Validate against package: https://simplifier.net/packages/fhir.r4.wales.psom/1.0.0-rc3

The spec should be updated. However, this is still annoying. Validation with the 'old' validator threw a BussinessRule warning, which is more desirable:

BusinessRule : resolve() should only be called on elements of type Reference at 'https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-CarePlan#CarePlan.activity (CarePlan.activity:completeQuestionnaire)'.

Also the Java validator gives a warning but continues. Relates to #563

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions