Skip to content

Commit

Permalink
Merge pull request #193 from pieter-edelman-nictiz/TypeSliceCardinality
Browse files Browse the repository at this point in the history
Add corner case check on type slice cardinality in derived profile
  • Loading branch information
grahamegrieve authored Nov 24, 2024
2 parents a7f36ed + f076d74 commit 50af66c
Show file tree
Hide file tree
Showing 4 changed files with 3,432 additions and 0 deletions.
1 change: 1 addition & 0 deletions rX/snapshot-generation/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<test gen="true" id="simple-quantity" version="4.0.1" debug="true" description="see https://jira.hl7.org/browse/FHIR-43932 and https://chat.fhir.org/#narrow/stream/179177-conformance/topic/constraints.20on.20Types.2C.20and.20profiles"/>
<test gen="true" id="simple-quantity-2" version="4.0.1" debug="true" description="variant"/>
<test gen="true" id="simple-quantity-3" version="4.0.1" debug="true" description="variant"/>
<test gen="true" id="slice-cardinality-derived" register="slice-cardinality-base" version="4.0.1" debug="true" description="The cardinality of a type slice in a derived profile should be unaffected by the cardinality of the polymorphic element in the base profile."/>
</snapshot-generation-tests>
18 changes: 18 additions & 0 deletions rX/snapshot-generation/slice-cardinality-base.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<url value="https://example.org/fhir/StructureDefinition/slice-cardinality-base" />
<name value="SliceCardinalityBase" />
<status value="draft" />
<fhirVersion value="4.0.1" />
<kind value="resource" />
<abstract value="false" />
<type value="Observation" />
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
<derivation value="constraint" />
<differential>
<element id="Observation.effective[x]">
<path value="Observation.effective[x]" />
<min value="1" />
</element>
</differential>
</StructureDefinition>
31 changes: 31 additions & 0 deletions rX/snapshot-generation/slice-cardinality-derived-input.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<url value="https://example.org/fhir/StructureDefinition/slice-cardinality-derived-input" />
<name value="SliceCardinalityDerivedInput" />
<status value="draft" />
<fhirVersion value="4.0.1" />
<kind value="resource" />
<abstract value="false" />
<type value="Observation" />
<baseDefinition value="https://example.org/fhir/StructureDefinition/slice-cardinality-base" />
<derivation value="constraint" />
<differential>
<element id="Observation.effective[x]">
<path value="Observation.effective[x]" />
<slicing>
<discriminator>
<type value="type" />
<path value="$this" />
</discriminator>
<rules value="open" />
</slicing>
</element>
<element id="Observation.effective[x]:effectiveDateTime">
<path value="Observation.effective[x]" />
<sliceName value="effectiveDateTime" />
<type>
<code value="dateTime" />
</type>
</element>
</differential>
</StructureDefinition>
Loading

0 comments on commit 50af66c

Please sign in to comment.