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

[SnapshotGenerator] Change min cardinality of slice intro, depending an min card. of the slices. #1255

Open
mmsmits opened this issue Feb 10, 2020 · 2 comments

Comments

@mmsmits
Copy link
Member

mmsmits commented Feb 10, 2020

Should the snapshot generator change the cardinality of a slice intro?

Example:

<StructureDefinition xmlns="http:https://hl7.org/fhir">
  <id value="obs-1"/>
  <url value="urn:uuid:616632e3-a5b9-4a7d-820d-1119b80f6820"/>
  <name value="Obs1"/>
  <status value="draft"/>
  <description value="fixture for #1: closed slicing on polymorphic"/>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="Observation"/>
  <baseDefinition value="http:https://hl7.org/fhir/StructureDefinition/Observation"/>
  <derivation value="constraint"/>
  <differential>
    <element>
      <path value="Observation.value[x]"/>
      <slicing>
        <rules value="open"/>
      </slicing>
    </element>
    <element>
      <path value="Observation.value[x]"/>
      <sliceName value="valueCodeableConcept"/>
      <min value="1"/>
      <type>  
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <strength value="required"/>
        <valueSet value="http:https://somewhere/something"/>
      </binding>
    </element>
  </differential>
</StructureDefinition>

Should the slice intro have a min cardinality of 1 in the snapshot?

Test: snapshotmanifest -> obs-4

@abelenthoven
Copy link

Just my opinion: In general I would say a snapshot generator does not have the responsibility to repair what is essentially broken. Having said that, however, I think it would be practical if it could give warnings and do repairs at the same time. But only if a broken situation can be interpreted only in 1 way. In the case you describe, I think we can be completely sure this is what the user meant. So in this case I would go for the repair.

@mmsmits
Copy link
Member Author

mmsmits commented Jul 4, 2024

We could do this, we don't have to give a warning.
Just make the snapshot a bit more readable.

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

No branches or pull requests

3 participants