Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error element [path] launches straight into slicing without the slicing being set up properly first #1629

Open
LilianMinne opened this issue May 21, 2024 · 0 comments

Comments

@LilianMinne
Copy link

LilianMinne commented May 21, 2024

When validating our (STU3) profiles, we get a lot of errors with the message: "element [path] launches straight into slicing without the slicing being set up properly first".

For example, the following code in https://simplifier.net/geboortezorg-stu3/bc-breastfindings produced this error:

    <element id="Observation.component:nipples.value[x]:valueString">
      <path value="Observation.component.valueString" />
      <sliceName value="valueString" />

It seems that the validator expects the value[x] element to be defined before jumping into the valueString slice. Validation is successful when changing the code to:

 <element id="Observation.component:nipples.value[x]">
      <path value="Observation.component.value[x]" />

We have another example (https://simplifier.net/geboortezorg-stu3/bc-treatmentdirective), however, where the same trick did not result in successful validation:
We changed the code from:

<element id="Consent.extension:additionalAdvanceDirective.value[x]:valueReference">
            <path value="Consent.extension.value[x]" />
            <sliceName value="valueReference" />
            <condition value="zib-TreatmentDirective2-1" />
        </element>

To:

    <element id="Consent.extension:additionalAdvanceDirective.value[x]">
      <path value="Consent.extension.value[x]" />
      <type>
        <code value="Reference"/>
      </type>
      <condition value="zib-TreatmentDirective2-1" />
    </element>

But the validator still complains about the element launching straight into slicing:
Error @ StructureDefinition.snapshot.element[18]: The element Consent.extension:additionalAdvanceDirective.value[x]:valueReference launches straight into slicing without the slicing being set up properly first

It seems that the snapshot generator is creating this path from the differential, since this path is no longer present in the differential. Is the snapshot generator doing something here that is not allowed or is the first syntax already correct and should the validator not complain about this? Or are we missing something and did we do something wrong in our own code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant