-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test cases for missing profile discriminators
- Loading branch information
Grahame Grieve
committed
Nov 10, 2023
1 parent
e162e7f
commit a49401c
Showing
7 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Observation xmlns="http://hl7.org/fhir"> | ||
<id value="profile-slicing-missing-instance"/> | ||
<meta> | ||
<profile value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile1"/> | ||
</meta> | ||
<status value="final"/> | ||
|
||
<!-- slice 1 --> | ||
<category> | ||
<coding> | ||
<system value="http://example.org/profile2"/> | ||
<code value="code2"/> | ||
</coding> | ||
</category> | ||
|
||
<!-- slice 2 --> | ||
<category> | ||
<coding> | ||
<system value="http://example.org/profile3"/> | ||
<code value="code3"/> | ||
</coding> | ||
<text value="Some Text"/> | ||
</category> | ||
|
||
<!-- slice 3 --> | ||
<category> | ||
<text value="Some Text 2"/> | ||
</category> | ||
|
||
<!-- no slice --> | ||
<category> | ||
<text value="something else"/> | ||
</category> | ||
|
||
|
||
<code><text value="code"/></code> | ||
</Observation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<id value="profile-slicing-missing-profile1"/> | ||
<url value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile1"/> | ||
<version value="0.1.0"/> | ||
<name value="TestMissingProfile1"/> | ||
<title value="Test Missing Profile #1"/> | ||
<status value="draft"/> | ||
<date value="2023-11-11T06:30:54+00:00"/> | ||
<publisher value="HL7"/> | ||
<fhirVersion value="4.0.0"/> | ||
<kind value="resource"/> | ||
<abstract value="false"/> | ||
<type value="Observation"/> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation"/> | ||
<derivation value="constraint"/> | ||
<differential> | ||
<element> | ||
<path value="Observation.category"/> | ||
<slicing> | ||
<discriminator> | ||
<type value="profile"/> | ||
<path value="coding"/> | ||
</discriminator> | ||
<discriminator> | ||
<type value="profile"/> | ||
<path value="text"/> | ||
</discriminator> | ||
<rules value="open"/> | ||
</slicing> | ||
</element> | ||
|
||
<element> | ||
<path value="Observation.category"/> | ||
<sliceName value="slice1"/> | ||
<min value="1"/> | ||
</element> | ||
<element> | ||
<path value="Observation.category.coding"/> | ||
<min value="1"/> | ||
<type> | ||
<code value="Coding"/> | ||
<profile value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile2"/> | ||
</type> | ||
</element> | ||
|
||
<element> | ||
<path value="Observation.category"/> | ||
<sliceName value="slice2"/> | ||
<min value="1"/> | ||
</element> | ||
<element> | ||
<path value="Observation.category.coding"/> | ||
<min value="1"/> | ||
<type> | ||
<code value="Coding"/> | ||
<profile value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile3"/> | ||
</type> | ||
</element> | ||
<element> | ||
<path value="Observation.category.text"/> | ||
<type> | ||
<code value="string"/> | ||
<profile value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile4"/> | ||
</type> | ||
</element> | ||
|
||
<element> | ||
<path value="Observation.category"/> | ||
<sliceName value="slice3"/> | ||
<min value="1"/> | ||
</element> | ||
<element> | ||
<path value="Observation.category.text"/> | ||
<min value="1"/> | ||
<type> | ||
<code value="string"/> | ||
<profile value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile5"/> | ||
</type> | ||
</element> | ||
|
||
</differential> | ||
</StructureDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<id value="profile-slicing-missing-profile2"/> | ||
<url value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile2"/> | ||
<version value="0.1.0"/> | ||
<name value="TestMissingProfile2"/> | ||
<title value="Test Missing Profile #2"/> | ||
<status value="draft"/> | ||
<date value="2023-11-11T06:30:54+00:00"/> | ||
<publisher value="HL7"/> | ||
<fhirVersion value="4.0.0"/> | ||
<kind value="resource"/> | ||
<abstract value="false"/> | ||
<type value="Coding"/> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Coding"/> | ||
<derivation value="constraint"/> | ||
<differential> | ||
<element id="Coding.system"> | ||
<path value="Coding.system"/> | ||
<fixedUri value="http://example.org/profile2"/> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<id value="profile-slicing-missing-profile3"/> | ||
<url value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile3"/> | ||
<version value="0.1.0"/> | ||
<name value="TestMissingProfile3"/> | ||
<title value="Test Missing Profile #3"/> | ||
<status value="draft"/> | ||
<date value="2023-11-11T06:30:54+00:00"/> | ||
<publisher value="HL7"/> | ||
<fhirVersion value="4.0.0"/> | ||
<kind value="resource"/> | ||
<abstract value="false"/> | ||
<type value="Coding"/> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Coding"/> | ||
<derivation value="constraint"/> | ||
<differential> | ||
<element id="Coding.system"> | ||
<path value="Coding.system"/> | ||
<fixedUri value="http://example.org/profile3"/> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<id value="profile-slicing-missing-profile4"/> | ||
<url value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile4"/> | ||
<version value="0.1.0"/> | ||
<name value="TestMissingProfile4"/> | ||
<title value="Test Missing Profile #4"/> | ||
<status value="draft"/> | ||
<date value="2023-11-11T06:30:54+00:00"/> | ||
<publisher value="HL7"/> | ||
<fhirVersion value="4.0.0"/> | ||
<kind value="resource"/> | ||
<abstract value="false"/> | ||
<type value="string"/> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/string"/> | ||
<derivation value="constraint"/> | ||
<differential> | ||
<element id="string"> | ||
<path value="string"/> | ||
<fixedString value="Some Text"/> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<id value="profile-slicing-missing-profile5"/> | ||
<url value="http://hl7.org/fhir/test/StructureDefinition/profile-slicing-missing-profile5"/> | ||
<version value="0.1.0"/> | ||
<name value="TestMissingProfile5"/> | ||
<title value="Test Missing Profile #5"/> | ||
<status value="draft"/> | ||
<date value="2023-11-11T06:30:54+00:00"/> | ||
<publisher value="HL7"/> | ||
<fhirVersion value="4.0.0"/> | ||
<kind value="resource"/> | ||
<abstract value="false"/> | ||
<type value="string"/> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/string"/> | ||
<derivation value="constraint"/> | ||
<differential> | ||
<element id="string"> | ||
<path value="string"/> | ||
<fixedString value="Some Text 2"/> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |