rework snapshot generation tests

This commit is contained in:
Grahame Grieve 2019-07-17 20:55:04 +10:00
parent 58da7557d8
commit dd51569178
87 changed files with 92480 additions and 7 deletions

View File

@ -146,7 +146,7 @@
<url value="urn:uuid:977f7fee-448e-4090-8c3a-441b3b3cca7a"/>
<name value="t6"/>
<status value="draft"/>
<description value="fixture for #6: type narrowing #2 - this renames the type element"/>
<description value="fixture for #6: type narrowing #2 - this makes a comment about the use of date, but doesn't constrain"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
@ -155,13 +155,14 @@
<differential>
<element>
<path value="Patient.deceasedDateTime"/>
<comment value="New Comment"/>
<type>
<code value="dateTime"/>
</type>
</element>
</differential>
</StructureDefinition>
</contained>
</contained>
<contained>
<StructureDefinition>
<id value="t7"/>
@ -2076,7 +2077,7 @@
<slicing>
<discriminator>
<type value="type"/>
<path value="@this"/>
<path value="$this"/>
</discriminator>
</slicing>
<short value="some text"/>
@ -2514,9 +2515,9 @@
<action>
<assert>
<label value="test5-2"/>
<description value="The patient.deceased type must be right"/>
<description value="The patient.deceased path must be right"/>
<direction value="response"/>
<expression value="fixture('t5o').snapshot.element.where(base.path = 'Patient.deceased[x]').path = 'Patient.deceasedDateTime'"/>
<expression value="fixture('t5o').snapshot.element.where(base.path = 'Patient.deceased[x]').path = 'Patient.deceased[x]'"/>
<warningOnly value="false"/>
</assert>
</action>
@ -3947,7 +3948,7 @@
<label value="test28-1"/>
<description value="Element count must be increased by 16"/>
<direction value="response"/>
<expression value="fixture('t28o').snapshot.element.count().trace('t28o') = fixture('operationoutcome').snapshot.element.count().trace('t28') + 16"/>
<expression value="fixture('t28o').snapshot.element.count().trace('t28o') = fixture('operationoutcome').snapshot.element.count().trace('t28') + 17"/>
<warningOnly value="false"/>
</assert>
</action>
@ -3981,7 +3982,7 @@
<label value="test29-1"/>
<description value="Element count must be increased by 15"/>
<direction value="response"/>
<expression value="fixture('t29o').snapshot.element.count().trace('t29o') = fixture('parameters').snapshot.element.count().trace('t29') + 15"/>
<expression value="fixture('t29o').snapshot.element.count().trace('t29o') = fixture('parameters').snapshot.element.count().trace('t29') + 16"/>
<warningOnly value="false"/>
</assert>
</action>

View File

@ -0,0 +1,217 @@
<snapshot-generation-tests>
<test type="generate" id="t1">
<rule text="The snapshot must have the same number of elements, in the same order, with matching paths" fhirpath="fixture('t1o').snapshot.element.select(path) = fixture('patient').snapshot.element.select(path)"/>
<rule text="The snapshot elements must be the same - check short description" fhirpath="fixture('t1o').snapshot.element.all(aliasAs('A').short = fixture('patient').snapshot.element.where(path = alias('A').path).short)"/>
<rule text="The snapshot elements must be the same - check min cardinality" fhirpath="fixture('t1o').snapshot.element.all(aliasAs('A').min = fixture('patient').snapshot.element.where(path = alias('A').path).min)"/>
<rule text="The snapshot elements must be the same - check max cardinality" fhirpath="fixture('t1o').snapshot.element.all(aliasAs('A').max = fixture('patient').snapshot.element.where(path = alias('A').path).max)"/>
<rule text="The snapshot elements must be the same - check binding" fhirpath="fixture('t1o').snapshot.element.where(binding.valueSet.exists()).all(aliasAs('A').binding.valueSet.trace('A') = fixture('patient').snapshot.element.where(path = alias('A').path).binding.valueSet.trace('B'))"/>
</test>
<test type="generate" id="t2">
<rule text="The snapshot must have the same number of elements, in the same order, with matching paths" fhirpath="fixture('t2o').snapshot.element.select(path) = fixture('valueset').snapshot.element.select(path)"/>
<rule text="The snapshot elements must be the same" fhirpath="fixture('t2o').snapshot.element.all(aliasAs('A').short = fixture('valueset').snapshot.element.where(path = alias('A').path).short)"/>
</test>
<test type="generate" id="t3">
<rule text="The snapshot must have the same number of elements, in the same order, with matching paths" fhirpath="fixture('t3o').snapshot.element.select(path) = fixture('patient').snapshot.element.select(path)"/>
<rule text="The snapshot elements must be the same" fhirpath="fixture('t3o').snapshot.element.all(aliasAs('A').short = fixture('patient').snapshot.element.where(path = alias('A').path).short)"/>
<rule text="The patient.identifier cardinality must be right" fhirpath="fixture('t3o').snapshot.element.where(path = 'Patient.identifier').min = 1"/>
</test>
<test type="generate" id="t4">
<rule text="The patient.identifier documentation must be right" fhirpath="fixture('t4o').snapshot.element.where(path = 'Patient.identifier').definition.trace('definition') != '... some more doco'"/>
</test>
<test type="generate" id="t5">
<rule text="The patient.deceased type must be right" fhirpath="fixture('t5o').snapshot.element.where(base.path = 'Patient.deceased[x]').type.code = 'dateTime'"/>
<rule text="The patient.deceased path must be right" fhirpath="fixture('t5o').snapshot.element.where(base.path = 'Patient.deceased[x]').path = 'Patient.deceased[x]'"/>
</test>
<test type="generate" id="t6">
<rule text="The patient.deceased type must be right" fhirpath="fixture('t6o').snapshot.element.where(base.path = 'Patient.deceased[x]').type.code = 'dateTime'"/>
<rule text="The patient.deceased type must be right" fhirpath="fixture('t6o').snapshot.element.where(base.path = 'Patient.deceased[x]').path = 'Patient.deceasedDateTime'"/>
</test>
<test type="generate" id="t7">
<rule text="The mapping must be made" fhirpath="fixture('t7o').snapshot.element.where(base.path = 'Patient.identifier').mapping.count() = fixture('t1o').snapshot.element.where(base.path = 'Patient.identifier').mapping.count() + 1"/>
</test>
<test type="generate" id="t8">
<rule text="Mustsupport must be true on Patient.identifier" fhirpath="fixture('t8o').snapshot.element.where(path = 'Patient.identifier').mustSupport"/>
<rule text="Mustsupport must be true on Patient.identifier.system" fhirpath="fixture('t8o').snapshot.element.where(path = 'Patient.identifier.system').mustSupport"/>
</test>
<test type="generate" id="t9">
<rule text="Mustsupport must not be true on Patient.identifier" fhirpath="fixture('t9o').snapshot.element.where(path = 'Patient.identifier').mustSupport.empty()"/>
<rule text="Mustsupport must be true on Patient.identifier.system" fhirpath="fixture('t9o').snapshot.element.where(path = 'Patient.identifier.system').mustSupport"/>
</test>
<test type="generate" id="t10">
<rule text="Patient.identifier must be sliced" fhirpath="fixture('t10o').snapshot.element.where(path = 'Patient.identifier').first().slicing.exists()"/>
<rule text="Patient.identifier must not have a slice name" fhirpath="fixture('t10o').snapshot.element.where(path = 'Patient.identifier').first().sliceName.empty()"/>
<rule text="Patient.identifier must be sliced into two slices" fhirpath="fixture('t10o').snapshot.element.where(path = 'Patient.identifier').count() = 3"/>
<rule text="Patient.identifier slice must not have a slice name" fhirpath="fixture('t10o').snapshot.element.where(path = 'Patient.identifier').tail().slicing.empty()"/>
<rule text="Patient.identifier tail must have a slice name" fhirpath="fixture('t10o').snapshot.element.where(path = 'Patient.identifier').tail().all(sliceName.empty().not())"/>
<rule text="Patient.identifier.use must be fixed" fhirpath="fixture('t10o').snapshot.element.where(path = 'Patient.identifier.use').all(fixed.empty().not())"/>
</test>
<test type="generate" id="t11">
<rule text="Patient.extension must be sliced" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension').first().slicing.exists()"/>
<rule text="Patient.extension first must not have a slice name" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension').first().sliceName.empty()"/>
<rule text="Patient.extension must be sliced into two slices" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension').count() = 3"/>
<rule text="Patient.extension must not have a slice name" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension').tail().slicing.empty()"/>
<rule text="Patient.extension tail must not have a slice name" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension').tail().all(sliceName.empty().not())"/>
<rule text="Patient.extension cardinality must be correct" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension').first().max.exists()"/>
<rule text="Patient.extension cardinality must be correct" fhirpath="fixture('t11o').snapshot.element.where(path = 'Patient.extension')[1].min.exists()"/>
</test>
<test type="generate" id="t12">
<rule text="Patient.extension must be sliced" fhirpath="fixture('t12o').snapshot.element.where(path = 'Patient.extension').first().slicing.exists()"/>
<rule text="Patient.extension first must not have a slice name" fhirpath="fixture('t12o').snapshot.element.where(path = 'Patient.extension').first().sliceName.empty()"/>
<rule text="Patient.extension must be sliced into two slices" fhirpath="fixture('t12o').snapshot.element.where(path = 'Patient.extension').count() = 3"/>
<rule text="Patient.extension must not have a slice name" fhirpath="fixture('t12o').snapshot.element.where(path = 'Patient.extension').tail().slicing.empty()"/>
<rule text="Patient.extension tail must not have a slice name" fhirpath="fixture('t12o').snapshot.element.where(path = 'Patient.extension').tail().all(sliceName.empty().not())"/>
<rule text="Patient.extension cardinality must be correct" fhirpath="fixture('t12o').snapshot.element.where(path = 'Patient.extension')[1].min.exists()"/>
</test>
<test type="generate" id="t12a">
<rule text="Patient.extension must be sliced" fhirpath="fixture('t12ao').snapshot.element.where(path = 'Patient.extension').first().slicing.exists()"/>
<rule text="Patient.extension first must not have a slice name" fhirpath="fixture('t12ao').snapshot.element.where(path = 'Patient.extension').first().sliceName.empty()"/>
<rule text="Patient.extension must be sliced into two slices" fhirpath="fixture('t12ao').snapshot.element.where(path = 'Patient.extension').count() = 2"/>
<rule text="Patient.extension must not have a slice name" fhirpath="fixture('t12ao').snapshot.element.where(path = 'Patient.extension').tail().slicing.empty()"/>
<rule text="Patient.extension tail must not have a slice name" fhirpath="fixture('t12ao').snapshot.element.where(path = 'Patient.extension').tail().all(sliceName.empty().not())"/>
</test>
<test type="generate" id="t13">
<rule text="element 7 (base) path" fhirpath="fixture('t13o').snapshot.element[7].path = 'Patient.extension'"/>
<rule text="element 7 slicing" fhirpath="fixture('t13o').snapshot.element[7].slicing.exists()"/>
<rule text="element 8 (1st slice) path" fhirpath="fixture('t13o').snapshot.element[8].path = 'Patient.extension'"/>
<rule text="element 8 (1st slice) name" fhirpath="fixture('t13o').snapshot.element[8].sliceName = 't'"/>
<rule text="element 9 (2nd slice) profile name" fhirpath="fixture('t13o').snapshot.element[8].type[0].profile = 'http://hl7.org/fhir/StructureDefinition/patient-birthTime'"/>
<rule text="element 9 (2nd slice) path" fhirpath="fixture('t13o').snapshot.element[9].path = 'Patient.extension'"/>
<rule text="element 8 (1st slice) name" fhirpath="fixture('t13o').snapshot.element[9].sliceName = 'complex'"/>
<rule text="element 9 (2nd slice) profile name" fhirpath="fixture('t13o').snapshot.element[9].type[0].profile = 'http://hl7.org/fhir/StructureDefinition/patient-nationality'"/>
<rule text="element 10 (2nd slice).id path" fhirpath="fixture('t13o').snapshot.element[10].path = 'Patient.extension.id'"/>
<rule text="element 11 (2nd slice).extension path" fhirpath="fixture('t13o').snapshot.element[11].path = 'Patient.extension.extension'"/>
<rule text="element 12 (2nd slice).extension path" fhirpath="fixture('t13o').snapshot.element[12].path = 'Patient.extension.extension'"/>
<rule text="element 12 (2nd slice).extension must support" fhirpath="fixture('t13o').snapshot.element[12].mustSupport"/>
<rule text="element 13 (2nd slice).extension.id path" fhirpath="fixture('t13o').snapshot.element[13].path = 'Patient.extension.extension.id'"/>
<rule text="element 14 (2nd slice).extension.extension path" fhirpath="fixture('t13o').snapshot.element[14].path = 'Patient.extension.extension.extension'"/>
<rule text="element 15 (2nd slice).extension.url path" fhirpath="fixture('t13o').snapshot.element[15].path = 'Patient.extension.extension.url'"/>
<rule text="element 16 (2nd slice).extension.valueCodeableConcept path" fhirpath="fixture('t13o').snapshot.element[16].path = 'Patient.extension.extension.valueCodeableConcept'"/>
<rule text="element 17 (2nd slice).extension path" fhirpath="fixture('t13o').snapshot.element[17].path = 'Patient.extension.extension'"/>
<rule text="element 17 (2nd slice).extension cardinality" fhirpath="fixture('t13o').snapshot.element[17].max = '0'"/>
<rule text="element 18 (2nd slice).extension.id path" fhirpath="fixture('t13o').snapshot.element[18].path = 'Patient.extension.extension.id'"/>
<rule text="element 19 (2nd slice).extension.extension path" fhirpath="fixture('t13o').snapshot.element[19].path = 'Patient.extension.extension.extension'"/>
<rule text="element 20 (2nd slice).extension.url path" fhirpath="fixture('t13o').snapshot.element[20].path = 'Patient.extension.extension.url'"/>
<rule text="element 21 (2nd slice).extension.valuePeriod path" fhirpath="fixture('t13o').snapshot.element[21].path = 'Patient.extension.extension.valuePeriod'"/>
<rule text="element 22.url path" fhirpath="fixture('t13o').snapshot.element[22].path = 'Patient.extension.url'"/>
<rule text="element 22.value path" fhirpath="fixture('t13o').snapshot.element[23].path = 'Patient.extension.value[x]'"/>
</test>
<test type="generate" id="t14">
<rule text="element count increased by 13" fhirpath="fixture('t14o').snapshot.element.count() = fixture('organization').snapshot.element.count() + 13"/>
</test>
<test type="generate" id="t15">
<rule text="element count increased by 27" fhirpath="fixture('t15o').snapshot.element.count() = fixture('patient').snapshot.element.count() + 27"/>
</test>
<test type="generate" id="t16">
<rule text="element count increased by 17" fhirpath="fixture('t16o').snapshot.element.count() = fixture('t15o').snapshot.element.count() + 17"/>
</test>
<test type="generate" id="t17">
<rule text="Patient.modifierExtension must be sliced" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension').first().slicing.exists()"/>
<rule text="Patient.modifierExtension first must not have a slice name" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension').first().sliceName.empty()"/>
<rule text="Patient.modifierExtension must be sliced into two slices" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension').count() = 3"/>
<rule text="Patient.modifierExtension must not have a slice name" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension').tail().slicing.empty()"/>
<rule text="Patient.modifierExtension tail must not have a slice name" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension').tail().all(sliceName.empty().not())"/>
<rule text="Patient.modifierExtension cardinality must be correct" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension').first().max.exists()"/>
<rule text="Patient.modifierExtension cardinality must be correct" fhirpath="fixture('t17o').snapshot.element.where(path = 'Patient.modifierExtension')[1].min.exists()"/>
</test>
<test type="generate" id="t18">
<rule text="Patient.modifierExtension must be sliced" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension').first().slicing.exists()"/>
<rule text="Patient.modifierExtension first must not have a slice name" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension').first().sliceName.empty()"/>
<rule text="Patient.modifierExtension must be sliced into two slices" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension').count() = 3"/>
<rule text="Patient.modifierExtension must not have a slice name" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension').tail().slicing.empty()"/>
<rule text="Patient.modifierExtension tail must not have a slice name" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension').tail().all(sliceName.empty().not())"/>
<rule text="Patient.modifierExtension cardinality must be correct" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension').first().max.exists()"/>
<rule text="Patient.modifierExtension cardinality must be correct" fhirpath="fixture('t18o').snapshot.element.where(path = 'Patient.modifierExtension')[1].min.exists()"/>
</test>
<test type="generate" id="t19">
<rule text="Patient.modifierExtension must be sliced" fhirpath="fixture('t19o').snapshot.element.where(path = 'Patient.modifierExtension').first().slicing.exists()"/>
<rule text="Patient.modifierExtension first must not have a slice name" fhirpath="fixture('t19o').snapshot.element.where(path = 'Patient.modifierExtension').first().sliceName.empty()"/>
<rule text="Patient.modifierExtension must be sliced into one slices" fhirpath="fixture('t19o').snapshot.element.where(path = 'Patient.modifierExtension').count() = 2"/>
<rule text="Patient.modifierExtension must not have a slice name" fhirpath="fixture('t19o').snapshot.element.where(path = 'Patient.modifierExtension').tail().slicing.empty()"/>
<rule text="Patient.modifierExtension tail must not have a slice name" fhirpath="fixture('t19o').snapshot.element.where(path = 'Patient.modifierExtension').tail().all(sliceName.empty().not())"/>
</test>
<test type="generate" id="t21">
<rule text="PlanDefinition.action.action must be sliced" fhirpath="fixture('t21o').snapshot.element.where(path = 'PlanDefinition.action.action').first().slicing.exists()"/>
<rule text="PlanDefinition.action.action first must not have a slice name" fhirpath="fixture('t21o').snapshot.element.where(path = 'PlanDefinition.action.action').first().sliceName.empty()"/>
<rule text="PlanDefinition.action.action must be sliced into two slices" fhirpath="fixture('t21o').snapshot.element.where(path = 'PlanDefinition.action.action').count() = 3"/>
<rule text="PlanDefinition.action.action tail must not have a slice name" fhirpath="fixture('t21o').snapshot.element.where(path = 'PlanDefinition.action.action').tail().slicing.empty()"/>
<rule text="PlanDefinition.action.action tail must not have a slice name" fhirpath="fixture('t21o').snapshot.element.where(path = 'PlanDefinition.action.action').tail().all(sliceName.empty().not())"/>
</test>
<test type="generate" id="t22">
<rule text="element count increased by 76" fhirpath="fixture('t22o').snapshot.element.count().trace('t22o') = fixture('patient').snapshot.element.count().trace('t22patient') + 76"/>
</test>
<test type="generate" id="t23">
<rule text="element count increased by ??" fhirpath="fixture('t23o').snapshot.element.count().trace('t23o') = fixture('patient').snapshot.element.count().trace('t23patient') + 11"/>
</test>
<test type="generate" id="t24b">
<rule text="Element count of profile a is increased by 24 from base Patient" fhirpath="fixture('t24bo').snapshot.element.count().trace('t24ao') = fixture('patient').snapshot.element.count().trace('t24Patient') + 22"/>
<rule text="Element count of profile b is identical to profile a" fhirpath="fixture('t24bo').snapshot.element.count().trace('t24bo') = fixture('t24ao').snapshot.element.count().trace('t24ao')"/>
</test>
<test type="sort" id="t26">
<rule text="differential element count the same" fhirpath="fixture('t26o').differential.element.count() = fixture('t26').differential.element.count()"/>
</test>
<test type="generate" id="t27">
<rule text="Contract.type.coding.code must have a pattern" fhirpath="fixture('t27o').snapshot.element.where(path = 'Contract.type.coding.code').pattern.exists()"/>
<rule text="Contract.type.coding.system must have a pattern" fhirpath="fixture('t27o').snapshot.element.where(path = 'Contract.type.coding.system').pattern.exists()"/>
</test>
<test type="generate" id="t28">
<rule text="Element count must be increased by 16" fhirpath="fixture('t28o').snapshot.element.count().trace('t28o') = fixture('operationoutcome').snapshot.element.count().trace('t28') + 17"/>
</test>
<test type="generate" id="t29">
<rule text="Element count must be increased by 15" fhirpath="fixture('t29o').snapshot.element.count().trace('t29o') = fixture('parameters').snapshot.element.count().trace('t29') + 16"/>
<rule text="There is an element with id 'Parameters.parameter.part:foo.id'" fhirpath="fixture('t29o').snapshot.element.where(id = 'Parameters.parameter.part:foo.id').count()=1"/>
</test>
<test type="generate" id="t30b">
<rule text="Snapshot doesn't result in an error'" fhirpath="fixture('t30bo').snapshot.element.count().trace('t30bo')&gt;1"/>
</test>
<test type="generate" id="t31">
<rule text="Snapshot contains regex extension'" fhirpath="fixture('t31o').snapshot.element.extension('http://hl7.org/fhir/StructureDefinition/regex').count().trace('t31o ext count')=2"/>
</test>
<test type="generate" id="t32">
<rule text="Snapshot Questionnaire.item element has slicing'" fhirpath="fixture('t32o').snapshot.element.where(id = 'Questionnaire.item').slicing.count().trace('t32o item slicing count')=1"/>
</test>
<test type="generate" id="t33">
<rule text="Snapshot contains referenced item children with correct path'" fhirpath="fixture('t33o').snapshot.element.where(id = 'ExplanationOfBenefit.addItem.adjudication.extension').exists()"/>
</test>
<test type="generate" id="t34">
<rule text="There must be 2 elements on Basic.identifier.extension in the snapshot" fhirpath="fixture('t34o').snapshot.element.where(path = 'Basic.identifier.extension').count() = 2"/>
<rule text="The narrative must mention the extension URL (http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status)" fhirpath="fixture('t34o').text.div.contains('http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status')"/>
</test>
<test type="generate" id="t35">
<rule text="There must be 2 elements on Basic.identifier.extension in the snapshot" fhirpath="fixture('t35o').snapshot.element.where(path = 'Basic.identifier.extension').count() = 2"/>
<rule text="The narrative must mention the extension URL (http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status)" fhirpath="fixture('t35o').text.div.contains('http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status')"/>
</test>
<test type="generate" id="t36">
<rule text="Snapshot generation didn't blow up" fhirpath="fixture('t36o').snapshot.element.count() &gt; 0"/>
</test>
<test type="generate" id="t37"/>
<test type="generate" id="t38">
<rule text="Snapshot generation didn't blow up" fhirpath="fixture('t38o').snapshot.element.count() &gt; 0"/>
</test>
<test type="generate" id="t40">
<rule text="There should only be one element definition for value[x]" fhirpath="fixture('t40o').snapshot.element.where(path.startsWith('Observation.value')).count() = 1"/>
<rule text="The element definition for value[x] should have min = 1" fhirpath="fixture('t40o').snapshot.element.where(path.startsWith('Observation.value')).min = 1"/>
</test>
<test type="generate" id="t41">
<rule text="There should only be one element definition for value[x]" fhirpath="fixture('t41o').snapshot.element.where(path.startsWith('Observation.value')).count() = 1"/>
<rule text="The element definition for value[x] should have 2 types" fhirpath="fixture('t41o').snapshot.element.where(path.startsWith('Observation.value')).type.count() = 2"/>
</test>
<test type="generate" id="t42">
<rule text="There should only be one element definition for value[x]" fhirpath="fixture('t42o').snapshot.element.where(path.startsWith('Observation.value')).count() = 1"/>
<rule text="The element definition for value[x] should have 1 type" fhirpath="fixture('t42o').snapshot.element.where(path.startsWith('Observation.value')).type.count() = 1"/>
<rule text="The element definition for value[x] should have short = 'some text'" fhirpath="fixture('t42o').snapshot.element.where(path.startsWith('Observation.value')).short = 'some text'"/>
</test>
<test type="generate" id="t43">
<rule text="There should be 9 element definitions for value[x] (base + quantity + walking into quantity" fhirpath="fixture('t43o').snapshot.element.where(path.startsWith('Observation.value')).count() = 9"/>
<rule text="The element definition for value[x] should have 1 type" fhirpath="fixture('t43o').snapshot.element.where(id = 'Observation.value[x]').type.count().trace('count') = 1"/>
<rule text="The element definition for value[x] should have short = 'some text'" fhirpath="fixture('t43o').snapshot.element.where(id = 'Observation.value[x]').short = 'some text'"/>
<rule text="The element definition for value[x] quantity slice should have sliceName = 'Quantity'" fhirpath="fixture('t43o').snapshot.element.where(id = 'Observation.value[x]:Quantity').check(exists(), 'no slice').sliceName = 'Quantity'"/>
<rule text="The element definition for value[x].value quantity slice should have sliceName = 'Quantity'" fhirpath="fixture('t43o').snapshot.element.where(id = 'Observation.value[x]:Quantity.value').check(exists(), 'no slice').min = 1"/>
</test>
<test type="generate" id="t44">
<rule text="There should be 9 element definitions for value[x] (base + quantity + walking into quantity" fhirpath="fixture('t44o').snapshot.element.where(path.startsWith('Observation.value')).count() = 9"/>
<rule text="The element definition for value[x] should have 1 type" fhirpath="fixture('t44o').snapshot.element.where(id = 'Observation.value[x]').type.count().trace('count') = 1"/>
<rule text="The element definition for value[x] should have short = 'some text'" fhirpath="fixture('t44o').snapshot.element.where(id = 'Observation.value[x]').short = 'some text'"/>
<rule text="The element definition for value[x] quantity slice should have sliceName = 'Quantity'" fhirpath="fixture('t44o').snapshot.element.where(id = 'Observation.value[x]:Quantity').check(exists(), 'no slice').sliceName = 'Quantity'"/>
<rule text="The element definition for value[x].value quantity slice should have sliceName = 'Quantity'" fhirpath="fixture('t44o').snapshot.element.where(id = 'Observation.value[x]:Quantity.value').check(exists(), 'no slice').min = 1"/>
</test>
</snapshot-generation-tests>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t1"/>
<url value="urn:uuid:c7e52962-c322-4417-bd95-fb0dfc40fd62"/>
<name value="t1"/>
<status value="draft"/>
<description value="fixture for #1: no change in the differential"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t10"/>
<url value="urn:uuid:772b9182-39d3-45fd-b01c-e09df0a5cf6c"/>
<name value="t10"/>
<status value="draft"/>
<description value="fixture for #10: Simple slicing"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="use"/>
</discriminator>
<ordered value="false"/>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.identifier"/>
<sliceName value="name1"/>
</element>
<element>
<path value="Patient.identifier.use"/>
<fixedCode value="usual"/>
</element>
<element>
<path value="Patient.identifier"/>
<sliceName value="name2"/>
</element>
<element>
<path value="Patient.identifier.use"/>
<fixedCode value="official"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t11"/>
<url value="urn:uuid:f119d7d3-81e3-4432-8c68-11baafa5f986"/>
<name value="t11"/>
<status value="draft"/>
<description value="fixture for #11: slicing on extensions"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<ordered value="false"/>
<rules value="open"/>
</slicing>
<max value="3"/>
</element>
<element>
<path value="Patient.extension"/>
<sliceName value="name1"/>
<min value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
<element>
<path value="Patient.extension"/>
<sliceName value="name2"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t12"/>
<url value="urn:uuid:01e790b6-b67b-4173-9b2b-31a0fb8c3180"/>
<name value="t12"/>
<status value="draft"/>
<description value="fixture for #12: slicing on extensions, no set up of slicing"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.extension"/>
<sliceName value="name1"/>
<min value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
<element>
<path value="Patient.extension"/>
<sliceName value="name2"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t12a"/>
<url value="urn:uuid:37c463da-eac0-4b17-b15d-a3e524d9ebdf"/>
<name value="t12a"/>
<status value="draft"/>
<description value="fixture for #12a: slicing on extensions, no set up of slicing, single slice"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.extension"/>
<sliceName value="name1"/>
<min value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t13"/>
<url value="urn:uuid:4f21d695-b60f-4c4f-8412-15d12d18fa5e"/>
<name value="t13"/>
<status value="draft"/>
<description value="fixture for #13: complex slicing"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<ordered value="false"/>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.extension"/>
<sliceName value="t"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
<element>
<path value="Patient.extension"/>
<sliceName value="complex"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-nationality"/>
</type>
</element>
<element>
<path value="Patient.extension.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<ordered value="false"/>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.extension.extension"/>
<sliceName value="code"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-nationality#code"/>
</type>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.extension.extension"/>
<sliceName value="period"/>
<max value="0"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-nationality#period"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t14"/>
<url value="urn:uuid:17a816a1-0196-4eb4-86c3-2f6e05944598"/>
<name value="t14"/>
<status value="draft"/>
<description value="fixture for #14: see task 8742"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Organization"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Organization.address"/>
<min value="1"/>
<max value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Organization.address.extension"/>
<sliceName value="USLabCountycodes"/>
<short value="County/Parish FIPS codes"/>
<definition value="County/Parish FIPS codes"/>
<requirements value="County/Parish Code SHALL use FIPS 6-4 ( INCITS 31:2009)."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/us-core-county"/>
</type>
<mustSupport value="true"/>
<binding>
<strength value="required"/>
<description value="FIPS codes for US counties and county equivalent entities."/>
<valueSet value="http://hl7.org/fhir/ValueSet/fips-county"/>
</binding>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t15"/>
<url value="urn:uuid:78efa570-6e30-410d-ac5a-16ea423d13d4"/>
<name value="t15"/>
<status value="draft"/>
<description value="fixture for #15: complex extensions with children"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.address"/>
</element>
<element>
<path value="Patient.address.extension"/>
<sliceName value="Geolocation"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/geolocation"/>
</type>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.address.extension.extension"/>
<sliceName value="latitude"/>
<type>
<code value="Extension"/>
<profile value="latitude"/>
</type>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.address.extension.extension.valueDecimal"/>
<mustSupport value="true"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t16"/>
<url value="urn:uuid:b94f9d67-5ad1-44df-850d-33a933800f40"/>
<name value="t16"/>
<status value="draft"/>
<description value="fixture for #16: extending a complex extension&#39;s children in derived profile"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="urn:uuid:78efa570-6e30-410d-ac5a-16ea423d13d4"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.address.extension"/>
<sliceName value="Geolocation"/>
</element>
<element>
<path value="Patient.address.extension.extension"/>
<sliceName value="latitude"/>
</element>
<element>
<path value="Patient.address.extension.extension.valueDecimal.extension"/>
<sliceName value="Geolocation.latitude.rendered"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/rendered-value"/>
</type>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.address.extension.extension.valueDecimal.extension.valueString"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.address.extension.extension"/>
<sliceName value="longitude"/>
</element>
<element>
<path value="Patient.address.extension.extension.valueDecimal.extension"/>
<sliceName value="Geolocation.longitude.rendered"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/rendered-value"/>
</type>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.address.extension.extension.valueDecimal.extension.valueString"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.address.extension"/>
<sliceName value="ISO-AddressUse"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/iso21090-AD-use"/>
</type>
<mustSupport value="true"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t17"/>
<url value="urn:uuid:1313b735-ddb1-4bd4-aa8e-a3156d2919a8"/>
<name value="t17"/>
<status value="draft"/>
<description value="fixture for #17: use a modifier extension instead"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.modifierExtension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<ordered value="false"/>
<rules value="open"/>
</slicing>
<max value="3"/>
</element>
<element>
<path value="Patient.modifierExtension"/>
<sliceName value="name1"/>
<min value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
<element>
<path value="Patient.modifierExtension"/>
<sliceName value="name2"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t18"/>
<url value="urn:uuid:14b4442c-ef9f-4630-bb44-681b65f758ac"/>
<name value="t18"/>
<status value="draft"/>
<description value="fixture for #18: use a modifier extension, with no set up"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.modifierExtension"/>
<sliceName value="name1"/>
<min value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
<element>
<path value="Patient.modifierExtension"/>
<sliceName value="name2"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t19"/>
<url value="urn:uuid:6d245aa4-fa65-44e7-8177-cb15b09854f4"/>
<name value="t19"/>
<status value="draft"/>
<description value="fixture for #19: use a modifier extension, with no set up, and only one slice"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.modifierExtension"/>
<sliceName value="name1"/>
<min value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t2"/>
<url value="urn:uuid:4b8c9c27-9d93-4f66-84f1-c7ca98687792"/>
<name value="t2"/>
<status value="draft"/>
<description value="fixture for #2: no change in the differential, but a value set"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="ValueSet"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
<derivation value="constraint"/>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t21"/>
<url value="urn:uuid:ea08f7c0-97f2-44bb-8ef5-f36d9e53148c"/>
<name value="t21"/>
<status value="draft"/>
<description value="fixture for #21: Slicing a backbone element on it&#39;s nested use"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="PlanDefinition"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
<derivation value="constraint"/>
<differential>
<element id="PlanDefinition:ordertemplate">
<path value="PlanDefinition"/>
</element>
<element id="PlanDefinition:ordertemplate.action.action">
<path value="PlanDefinition.action.action"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="prefix"/>
</discriminator>
<rules value="open"/>
</slicing>
<min value="1"/>
<max value="*"/>
</element>
<element id="PlanDefinition:ordertemplate.action.action:subtask1">
<path value="PlanDefinition.action.action"/>
<sliceName value="subtask1"/>
<min value="0"/>
<max value="1"/>
</element>
<element id="PlanDefinition:ordertemplate.action.action:subtask1.prefix">
<path value="PlanDefinition.action.action.prefix"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<fixedString value="slice1"/>
</element>
<element id="PlanDefinition:ordertemplate.action.action:subtask2">
<path value="PlanDefinition.action.action"/>
<sliceName value="subtask2"/>
<min value="0"/>
<max value="1"/>
</element>
<element id="PlanDefinition:ordertemplate.action.action:subtask2.prefix">
<path value="PlanDefinition.action.action.prefix"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<fixedString value="slice2"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t22"/>
<url value="urn:uuid:a690d8bf-7b93-4785-b5d7-74bc3452a24b"/>
<name value="t22"/>
<status value="draft"/>
<description value="fixture for #22: Constrain base element before slicing"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="type.coding.code"/>
</discriminator>
<rules value="open"/>
</slicing>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.extension"/>
<sliceName value="validDate"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/identifier-validDate"/>
</type>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.type"/>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.type.coding"/>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.type.coding.system"/>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.type.coding.code"/>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.system"/>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.value"/>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier"/>
<sliceName value="MRN"/>
<min value="1"/>
<max value="1"/>
</element>
<element>
<path value="Patient.identifier.extension"/>
<sliceName value="validDate"/>
<min value="1"/>
</element>
<element>
<path value="Patient.identifier.type"/>
</element>
<element>
<path value="Patient.identifier.type.coding"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="system"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.identifier.type.coding"/>
<sliceName value="preferredCoding"/>
</element>
<element>
<path value="Patient.identifier.type.coding.system"/>
<fixedUri value="http://hl7.org/fhir/v2/0203"/>
</element>
<element>
<path value="Patient.identifier.type.coding.code"/>
<fixedCode value="MR"/>
</element>
<element>
<path value="Patient.identifier"/>
<sliceName value="JHN"/>
<min value="1"/>
<max value="1"/>
</element>
<element>
<path value="Patient.identifier.extension"/>
<sliceName value="validDate"/>
<max value="0"/>
</element>
<element>
<path value="Patient.identifier.type"/>
</element>
<element>
<path value="Patient.identifier.type.coding"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="system"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.identifier.type.coding"/>
<sliceName value="preferredCoding"/>
</element>
<element>
<path value="Patient.identifier.type.coding.system"/>
<fixedUri value="http://hl7.org/fhir/v2/0203"/>
</element>
<element>
<path value="Patient.identifier.type.coding.code"/>
<fixedCode value="JHN"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t23"/>
<url value="urn:uuid:2e28117d-bb6f-4d8e-9ccd-5472535cc2d6"/>
<name value="t23"/>
<status value="draft"/>
<description value="fixture for #23: Test Slicing - unsorted differential"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient"/>
</element>
<element>
<path value="Patient.contact"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="gender"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.contact"/>
<sliceName value="males"/>
</element>
<element>
<path value="Patient.contact.gender"/>
<fixedCode value="male"/>
</element>
<element>
<path value="Patient.contact.telecom"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t24a"/>
<url value="urn:uuid:5eac3230-a289-4662-a296-2b673d6d3293"/>
<name value="t24a"/>
<status value="draft"/>
<description value="fixture for #24a: Constrain base element before slicing when slices were already defined - backbone"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient"/>
</element>
<element>
<path value="Patient.contact"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="gender"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.contact"/>
<sliceName value="males"/>
</element>
<element>
<path value="Patient.contact.telecom"/>
<min value="1"/>
</element>
<element>
<path value="Patient.contact.gender"/>
<fixedCode value="male"/>
</element>
<element>
<path value="Patient.contact"/>
<sliceName value="females"/>
</element>
<element>
<path value="Patient.contact.telecom"/>
<max value="0"/>
</element>
<element>
<path value="Patient.contact.gender"/>
<fixedCode value="female"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t24b"/>
<url value="urn:uuid:6a446a41-a552-4391-babc-db4caee2d987"/>
<name value="t24b"/>
<status value="draft"/>
<description value="fixture for #24b: Constrain base element before slicing when slices were already defined - backbone"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="urn:uuid:5eac3230-a289-4662-a296-2b673d6d3293"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient"/>
</element>
<element>
<path value="Patient.contact"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="gender"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element>
<path value="Patient.contact.name"/>
<min value="1"/>
</element>
<element>
<path value="Patient.contact"/>
<sliceName value="males"/>
</element>
<element>
<path value="Patient.contact.name"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t26"/>
<url value="urn:uuid:ab833682-88b9-4e7a-8e08-eb82f39f7beb"/>
<name value="t26"/>
<status value="draft"/>
<description value="fixture for #26: Test differential sorting for polymorphic references"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient"/>
</element>
<element>
<path value="Patient.generalPractitioner"/>
<slicing>
<discriminator>
<type value="exists"/>
<path value="display"/>
</discriminator>
<rules value="open"/>
</slicing>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
</element>
<element>
<path value="Patient.generalPractitioner"/>
<sliceName value="sliceA"/>
</element>
<element>
<path value="Patient.generalPractitioner.display"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t26"/>
<url value="urn:uuid:ab833682-88b9-4e7a-8e08-eb82f39f7beb"/>
<name value="t26"/>
<status value="draft"/>
<description value="fixture for #26: Test differential sorting for polymorphic references"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient"/>
</element>
<element>
<path value="Patient.generalPractitioner"/>
<slicing>
<discriminator>
<type value="exists"/>
<path value="display"/>
</discriminator>
<rules value="open"/>
</slicing>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
</element>
<element>
<path value="Patient.generalPractitioner"/>
<sliceName value="sliceA"/>
</element>
<element>
<path value="Patient.generalPractitioner.display"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t27"/>
<url value="urn:uuid:d2cb3b87-8f73-46fd-821c-cf39f0432757"/>
<name value="t27"/>
<status value="draft"/>
<description value="fixture for #27: walking into a type for Contract"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Contract"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Contract"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Contract"/>
</element>
<element>
<path value="Contract.type"/>
<label value="Consent"/>
<short value="Consent"/>
<definition value="SHALL contain exactly one [1..1] type=&quot;CONS&quot; (CodeSystem: HL7ActClass urn:oid:2.16.840.1.113883.5.6) (CONF:2219-2008)."/>
<min value="1"/>
<max value="1"/>
</element>
<element>
<path value="Contract.type.coding.system"/>
<patternCode value="urn:oid:2.16.840.1.113883.5.6"/>
</element>
<element>
<path value="Contract.type.coding.code"/>
<patternCode value="CONS"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t28"/>
<url value="urn:uuid:7c3e3bd7-7919-4348-bed7-a65af1690842"/>
<name value="t28"/>
<status value="draft"/>
<description value="fixture for #28: Test children of a polymorphic type"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="OperationOutcome"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="OperationOutcome"/>
</element>
<element>
<path value="OperationOutcome.issue"/>
</element>
<element>
<path value="OperationOutcome.issue.details"/>
</element>
<element>
<path value="OperationOutcome.issue.details.text"/>
</element>
<element>
<path value="OperationOutcome.issue.details.text.extension"/>
<sliceName value="translation"/>
<type>
<code value="Extension"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/iso21090-ST-translation"/>
</type>
</element>
<element>
<path value="OperationOutcome.issue.details.text.extension.valueString"/>
</element>
<element>
<path value="OperationOutcome.issue.details.text.extension.valueString.extension"/>
<sliceName value="language"/>
<type>
<code value="Extension"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/iso21090-ST-language"/>
</type>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,906 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t29"/>
<url value="urn:uuid:8371f159-76b3-41f7-a66f-bde129e7e603"/>
<name value="t29"/>
<status value="draft"/>
<description value="fixture for #29: Test recursion on elements that are deeper than children of the root and have a different name (Parameters.parameter.part)"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2 Mapping"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM Mapping"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<type value="OperationOutcome"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
<derivation value="constraint"/>
<snapshot>
<element id="Parameters">
<path value="Parameters"/>
<short value="Operation Request or Response"/>
<definition value="This resource is a non-persisted resource used to pass information into and back from an [operation](http://test.org/profile/operations.html). It has no other use, and there is no RESTful endpoint associated with it."/>
<comment value="The parameters that may be used are defined by the OperationDefinition resource."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Parameters"/>
<min value="0"/>
<max value="*"/>
</base>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="Entity. Role, or Act"/>
</mapping>
<mapping>
<identity value="v2"/>
<map value="n/a"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.id">
<path value="Parameters.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comment value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="id"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.meta">
<path value="Parameters.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.meta"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Meta"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.implicitRules">
<path value="Parameters.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."/>
<comment value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it&#39;s narrative along with other profiles, value sets, etc."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.implicitRules"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&#39;s meaning or interpretation"/>
<isSummary value="true"/>
</element>
<element id="Parameters.language">
<path value="Parameters.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comment value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.language"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
<valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="Language"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
<valueBoolean value="true"/>
</extension>
<strength value="preferred"/>
<description value="A human language."/>
<valueSet value="http://hl7.org/fhir/ValueSet/languages"/>
</binding>
</element>
<element id="Parameters.parameter">
<path value="Parameters.parameter"/>
<short value="Operation Parameter"/>
<definition value="A parameter passed to or received from the operation."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Parameters.parameter"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression value="hasValue() or (children().count() &gt; id.count())"/>
<xpath value="@value|f:*|h:div"/>
<source value="Element"/>
</constraint>
<constraint>
<key value="inv-1"/>
<severity value="error"/>
<human value="A parameter must have one and only one of (value, resource, part)"/>
<expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))"/>
<xpath value="(exists(f:resource) or exists(f:part) or exists(f:*[starts-with(local-name(.), &#39;value&#39;)])) and not(exists(f:*[starts-with(local-name(.), &#39;value&#39;)])) and exists(f:resource))) and not(exists(f:*[starts-with(local-name(.), &#39;value&#39;)])) and exists(f:part))) and not(exists(f:part) and exists(f:resource))"/>
<source value="Parameters.parameter"/>
</constraint>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.id">
<path value="Parameters.parameter.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.parameter.extension">
<path value="Parameters.parameter.extension"/>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.parameter.modifierExtension">
<path value="Parameters.parameter.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element&#39;s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.&#xA;&#xA;Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<requirements value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://test.org/profile/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Parameters.parameter.name">
<path value="Parameters.parameter.name"/>
<short value="Name from the definition"/>
<definition value="The name of the parameter (reference to the operation definition)."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.name"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.value[x]">
<path value="Parameters.parameter.value[x]"/>
<short value="If parameter is a data type"/>
<definition value="If the parameter is a data type."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.value[x]"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="base64Binary"/>
</type>
<type>
<code value="boolean"/>
</type>
<type>
<code value="canonical"/>
</type>
<type>
<code value="code"/>
</type>
<type>
<code value="date"/>
</type>
<type>
<code value="dateTime"/>
</type>
<type>
<code value="decimal"/>
</type>
<type>
<code value="id"/>
</type>
<type>
<code value="instant"/>
</type>
<type>
<code value="integer"/>
</type>
<type>
<code value="markdown"/>
</type>
<type>
<code value="oid"/>
</type>
<type>
<code value="positiveInt"/>
</type>
<type>
<code value="string"/>
</type>
<type>
<code value="time"/>
</type>
<type>
<code value="unsignedInt"/>
</type>
<type>
<code value="uri"/>
</type>
<type>
<code value="url"/>
</type>
<type>
<code value="uuid"/>
</type>
<type>
<code value="Address"/>
</type>
<type>
<code value="Age"/>
</type>
<type>
<code value="Annotation"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Coding"/>
</type>
<type>
<code value="ContactPoint"/>
</type>
<type>
<code value="Count"/>
</type>
<type>
<code value="Distance"/>
</type>
<type>
<code value="Duration"/>
</type>
<type>
<code value="HumanName"/>
</type>
<type>
<code value="Identifier"/>
</type>
<type>
<code value="Money"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Reference"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="Signature"/>
</type>
<type>
<code value="Timing"/>
</type>
<type>
<code value="ContactDetail"/>
</type>
<type>
<code value="Contributor"/>
</type>
<type>
<code value="DataRequirement"/>
</type>
<type>
<code value="Expression"/>
</type>
<type>
<code value="ParameterDefinition"/>
</type>
<type>
<code value="RelatedArtifact"/>
</type>
<type>
<code value="TriggerDefinition"/>
</type>
<type>
<code value="UsageContext"/>
</type>
<type>
<code value="Dosage"/>
</type>
<condition value="inv-1"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.resource">
<path value="Parameters.parameter.resource"/>
<short value="If parameter is a whole resource"/>
<definition value="If the parameter is a whole resource."/>
<comment value="When resolving references in resources, the operation definition may specify how references may be resolved between parameters. If a reference cannot be resolved between the parameters, the application should fall back to it&#39;s general resource resolution methods."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.resource"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Resource"/>
</type>
<condition value="inv-1"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part">
<path value="Parameters.parameter.part"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="name"/>
</discriminator>
<rules value="closed"/>
</slicing>
<short value="Named part of a multi-part parameter"/>
<definition value="A named part of a multi-part parameter."/>
<comment value="Only one level of nested parameters is allowed."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Parameters.parameter.part"/>
<min value="0"/>
<max value="*"/>
</base>
<contentReference value="#Parameters.parameter"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part:foo">
<path value="Parameters.parameter.part"/>
<sliceName value="foo"/>
<short value="Named part of a multi-part parameter"/>
<definition value="A named part of a multi-part parameter."/>
<comment value="Only one level of nested parameters is allowed."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.part"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part:foo.id">
<path value="Parameters.parameter.part.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.extension">
<path value="Parameters.parameter.part.extension"/>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.modifierExtension">
<path value="Parameters.parameter.part.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element&#39;s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.&#xA;&#xA;Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<requirements value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://test.org/profile/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.name">
<path value="Parameters.parameter.part.name"/>
<short value="Name from the definition"/>
<definition value="The name of the parameter (reference to the operation definition)."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.name"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<fixedString value="foo"/>
<mustSupport value="true"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part:foo.value[x]">
<path value="Parameters.parameter.part.value[x]"/>
<slicing>
<discriminator>
<type value="type"/>
<path value="$this"/>
</discriminator>
<ordered value="false"/>
<rules value="closed"/>
</slicing>
<short value="If parameter is a data type"/>
<definition value="If the parameter is a data type."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.value[x]"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Coding"/>
</type>
<condition value="inv-1"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding">
<path value="Parameters.parameter.part.value[x]"/>
<sliceName value="Coding"/>
<short value="If parameter is a data type"/>
<definition value="If the parameter is a data type."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.value[x]"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Coding"/>
</type>
<condition value="inv-1"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.id">
<path value="Parameters.parameter.part.value[x].id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.extension">
<path value="Parameters.parameter.part.value[x].extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.system">
<path value="Parameters.parameter.part.value[x].system"/>
<short value="Identity of the terminology system"/>
<definition value="The identification of the code system that defines the meaning of the symbol in the code."/>
<comment value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7&#39;s list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
<requirements value="Need to be unambiguous about the source of the definition of the symbol."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Coding.system"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./codeSystem"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.version">
<path value="Parameters.parameter.part.value[x].version"/>
<short value="Version of the system - if relevant"/>
<definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
<comment value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Coding.version"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.7"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./codeSystemVersion"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.code">
<path value="Parameters.parameter.part.value[x].code"/>
<short value="Symbol in syntax defined by the system"/>
<definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
<requirements value="Need to refer to a particular code in the system."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Coding.code"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.display">
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
<valueBoolean value="true"/>
</extension>
<path value="Parameters.parameter.part.value[x].display"/>
<short value="Representation defined by the system"/>
<definition value="A representation of the meaning of the code in the system, following the rules of the system."/>
<requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Coding.display"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.2 - but note this is not well followed"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CV.displayName"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.value[x]:Coding.userSelected">
<path value="Parameters.parameter.part.value[x].userSelected"/>
<short value="If this coding was chosen directly by the user"/>
<definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
<comment value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly &#39;directly chosen&#39; implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
<requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Coding.userSelected"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="boolean"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="Sometimes implied by being first"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CD.codingRationale"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source &quot;true&quot;; fhir:target dt:CDCoding.codingRationale\#O ]"/>
</mapping>
</element>
<element id="Parameters.parameter.part:foo.resource">
<path value="Parameters.parameter.part.resource"/>
<short value="If parameter is a whole resource"/>
<definition value="If the parameter is a whole resource."/>
<comment value="When resolving references in resources, the operation definition may specify how references may be resolved between parameters. If a reference cannot be resolved between the parameters, the application should fall back to it&#39;s general resource resolution methods."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Parameters.parameter.resource"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Resource"/>
</type>
<condition value="inv-1"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Parameters.parameter.part:foo.part">
<path value="Parameters.parameter.part.part"/>
<short value="Named part of a multi-part parameter"/>
<definition value="A named part of a multi-part parameter."/>
<comment value="Only one level of nested parameters is allowed."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Parameters.parameter.part"/>
<min value="0"/>
<max value="*"/>
</base>
<contentReference value="#Parameters.parameter"/>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
</snapshot>
<differential>
<element id="Parameters">
<path value="Parameters"/>
</element>
<element id="Parameters.parameter">
<path value="Parameters.parameter"/>
</element>
<element id="Parameters.parameter.part">
<path value="Parameters.parameter.part"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="name"/>
</discriminator>
<rules value="closed"/>
</slicing>
</element>
<element id="Parameters.parameter.part:foo">
<path value="Parameters.parameter.part"/>
<sliceName value="foo"/>
<min value="1"/>
<max value="1"/>
</element>
<element id="Parameters.parameter.part:foo.name">
<path value="Parameters.parameter.part.name"/>
<fixedString value="foo"/>
<mustSupport value="true"/>
</element>
<element id="Parameters.parameter.part:foo.valueCoding">
<path value="Parameters.parameter.part.valueCoding"/>
<min value="1"/>
<type>
<code value="Coding"/>
</type>
</element>
<element id="Parameters.parameter.part:foo.valueCoding.code">
<path value="Parameters.parameter.part.valueCoding.code"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t29"/>
<url value="urn:uuid:8371f159-76b3-41f7-a66f-bde129e7e603"/>
<name value="t29"/>
<status value="draft"/>
<description value="fixture for #29: Test recursion on elements that are deeper than children of the root and have a different name (Parameters.parameter.part)"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="OperationOutcome"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Parameters"/>
</element>
<element>
<path value="Parameters.parameter"/>
</element>
<element>
<path value="Parameters.parameter.part"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="name"/>
</discriminator>
<rules value="closed"/>
</slicing>
</element>
<element>
<path value="Parameters.parameter.part"/>
<sliceName value="foo"/>
<min value="1"/>
<max value="1"/>
</element>
<element>
<path value="Parameters.parameter.part.name"/>
<fixedString value="foo"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Parameters.parameter.part.valueCoding"/>
<min value="1"/>
<type>
<code value="Coding"/>
</type>
</element>
<element>
<path value="Parameters.parameter.part.valueCoding.code"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t3"/>
<url value="urn:uuid:b3f56cfa-98a3-422c-9584-738e09881ac9"/>
<name value="t3"/>
<status value="draft"/>
<description value="fixture for #3: change a cardinality"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t30b"/>
<url value="urn:uuid:d144e878-9445-42cd-9e5c-28e4d8072a20"/>
<name value="t30b"/>
<status value="draft"/>
<description value="Profile and derived profile both slice a backbone element; derived profile"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Observation"/>
<baseDefinition value="urn:uuid:149505c1-a51b-4378-9d31-d14dd62f18e6"/>
<derivation value="constraint"/>
<differential>
<element id="Observation">
<path value="Observation"/>
</element>
<element id="Observation.component:allelic-frequency">
<path value="Observation.component"/>
<sliceName value="allelic-frequency"/>
<max value="1"/>
</element>
<element id="Observation.component:allelic-frequency.code">
<path value="Observation.component.code"/>
<min value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<patternCodeableConcept>
<coding>
<system value="http://loinc.org"/>
<code value="81258-6"/>
</coding>
</patternCodeableConcept>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t31"/>
<url value="urn:uuid:e9d11ae4-b7be-40c2-9c19-c9a1c4861428"/>
<name value="t31"/>
<status value="draft"/>
<description value="fixture for #31: Propagate extensions from differential to snapshot"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Parameters"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
<derivation value="constraint"/>
<differential>
<element id="Parameters">
<path value="Parameters"/>
</element>
<element id="Parameters.parameter">
<path value="Parameters.parameter"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="name"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element id="Parameters.parameter:string">
<path value="Parameters.parameter"/>
<sliceName value="string"/>
</element>
<element id="Parameters.parameter:string.name">
<path value="Parameters.parameter.name"/>
<fixedString value="string"/>
</element>
<element id="Parameters.parameter:string.valueString">
<extension url="http://hl7.org/fhir/StructureDefinition/regex">
<valueString value="(a)*"/>
</extension>
<path value="Parameters.parameter.valueString"/>
<type>
<code value="string"/>
</type>
<maxLength value="2"/>
</element>
<element id="Parameters.parameter:string.valueString.extension:translation">
<path value="Parameters.parameter.valueString.extension"/>
<sliceName value="translation"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/translation"/>
</type>
</element>
<element id="Parameters.parameter:string.valueString.extension:translation.extension:content">
<path value="Parameters.parameter.valueString.extension.extension"/>
<sliceName value="content"/>
</element>
<element id="Parameters.parameter:string.valueString.extension:translation.extension:content.valueString">
<extension url="http://hl7.org/fhir/StructureDefinition/regex">
<valueString value="(b)*"/>
</extension>
<path value="Parameters.parameter.valueString.extension.extension.valueString"/>
<sliceName value="content"/>
<maxLength value="2"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t32"/>
<url value="urn:uuid:d4cbb68a-8c76-43a8-b0f1-854d24f881dc"/>
<name value="t32"/>
<status value="draft"/>
<description value="fixture for #32: Test disappearing slice definition"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Questionnaire"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
<derivation value="constraint"/>
<differential>
<element id="Questionnaire">
<path value="Questionnaire"/>
</element>
<element id="Questionnaire.item">
<path value="Questionnaire.item"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="linkId"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element id="Questionnaire.item.linkId">
<path value="Questionnaire.item.linkId"/>
<mustSupport value="true"/>
</element>
<element id="Questionnaire.item">
<path value="Questionnaire.item"/>
<sliceName value="record-type"/>
</element>
<element id="Questionnaire.item:record-type.linkId">
<path value="Questionnaire.item.linkId"/>
<fixedString value="record-type"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t33"/>
<url value="urn:uuid:75055c57-8e5d-4c0a-ab22-43371571f724"/>
<name value="t33"/>
<status value="draft"/>
<description value="fixture for #33: Test disappearing slice definition"/>
<fhirVersion value="3.0.1"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="ExplanationOfBenefit"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit"/>
<derivation value="constraint"/>
<differential>
<element id="ExplanationOfBenefit.addItem">
<path value="ExplanationOfBenefit.addItem"/>
<mustSupport value="true"/>
</element>
<element id="ExplanationOfBenefit.addItem.adjudication">
<path value="ExplanationOfBenefit.addItem.adjudication"/>
</element>
<element id="ExplanationOfBenefit.addItem.adjudication.extension">
<path value="ExplanationOfBenefit.addItem.adjudication.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element id="ExplanationOfBenefit.addItem.adjudication.extension:someExt">
<path value="ExplanationOfBenefit.addItem.adjudication.extension"/>
<sliceName value="someExt"/>
<type>
<code value="Extension"/>
<profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason"/>
</type>
<mustSupport value="true"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,739 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t34"/>
<url value="urn:uuid:0fefeab4-abd9-4ea6-b9c7-8a07a04f600c"/>
<name value="t34"/>
<status value="draft"/>
<description value="fixture for #34: Referencing a custom extension"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM Mapping"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/fivews"/>
<name value="FiveWs Pattern Mapping"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<type value="Basic"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Basic"/>
<derivation value="constraint"/>
<snapshot>
<element id="Basic">
<path value="Basic"/>
<short value="Resource for non-supported content"/>
<definition value="Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don&#39;t map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."/>
<alias value="Z-resource"/>
<alias value="Extension-resource"/>
<alias value="Custom-resource"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Basic"/>
<min value="0"/>
<max value="*"/>
</base>
<constraint>
<key value="dom-2"/>
<severity value="error"/>
<human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
<expression value="contained.contained.empty()"/>
<xpath value="not(parent::f:contained and f:contained)"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<key value="dom-4"/>
<severity value="error"/>
<human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
<expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
<xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<key value="dom-3"/>
<severity value="error"/>
<human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource"/>
<expression value="contained.where(((&#39;#&#39;+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = &#39;#&#39;).exists() or descendants().where(as(canonical) = &#39;#&#39;).exists() or descendants().where(as(canonical) = &#39;#&#39;).exists()).not()).trace(&#39;unmatched&#39;, id).empty()"/>
<xpath value="not(exists(for $contained in f:contained return $contained[not(parent::*/descendant::f:reference/@value=concat(&#39;#&#39;, $contained/*/id/@value) or descendant::f:reference[@value=&#39;#&#39;])]))"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice">
<valueBoolean value="true"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation">
<valueMarkdown value="When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."/>
</extension>
<key value="dom-6"/>
<severity value="warning"/>
<human value="A resource should have narrative for robust management"/>
<expression value="text.div.exists()"/>
<xpath value="exists(f:text/h:div)"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<key value="dom-5"/>
<severity value="error"/>
<human value="If a resource is contained in another resource, it SHALL NOT have a security label"/>
<expression value="contained.meta.security.empty()"/>
<xpath value="not(exists(f:contained/*/f:meta/f:security))"/>
<source value="DomainResource"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="Entity. Role, or Act"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act, Entity or Role"/>
</mapping>
</element>
<element id="Basic.id">
<path value="Basic.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comment value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="id"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Basic.meta">
<path value="Basic.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.meta"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Meta"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Basic.implicitRules">
<path value="Basic.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."/>
<comment value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it&#39;s narrative along with other profiles, value sets, etc."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.implicitRules"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&#39;s meaning or interpretation"/>
<isSummary value="true"/>
</element>
<element id="Basic.language">
<path value="Basic.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comment value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.language"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
<valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="Language"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
<valueBoolean value="true"/>
</extension>
<strength value="preferred"/>
<description value="A human language."/>
<valueSet value="http://hl7.org/fhir/ValueSet/languages"/>
</binding>
</element>
<element id="Basic.text">
<path value="Basic.text"/>
<short value="Text summary of the resource, for human interpretation"/>
<definition value="A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
<comment value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later."/>
<alias value="narrative"/>
<alias value="html"/>
<alias value="xhtml"/>
<alias value="display"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="DomainResource.text"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Narrative"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="Act.text?"/>
</mapping>
</element>
<element id="Basic.contained">
<path value="Basic.contained"/>
<short value="Contained, inline Resources"/>
<definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
<comment value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels."/>
<alias value="inline resources"/>
<alias value="anonymous resources"/>
<alias value="contained resources"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="DomainResource.contained"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Resource"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Basic.extension">
<path value="Basic.extension"/>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="DomainResource.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Basic.modifierExtension">
<path value="Basic.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element&#39;s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.&#xA;&#xA;Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<requirements value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://test.org/profile/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="DomainResource.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Basic.identifier">
<path value="Basic.identifier"/>
<short value="Business identifier"/>
<definition value="Identifier assigned to the resource for business purposes, outside the context of FHIR."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Basic.identifier"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Identifier"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.identifier"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./identifier"/>
</mapping>
</element>
<element id="Basic.identifier.id">
<path value="Basic.identifier.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Basic.identifier.extension">
<path value="Basic.identifier.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Basic.identifier.extension:foo">
<path value="Basic.identifier.extension"/>
<sliceName value="foo"/>
<short value="Status"/>
<definition value="An Extension"/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
<profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
<isSummary value="false"/>
</element>
<element id="Basic.identifier.use">
<path value="Basic.identifier.use"/>
<short value="usual | official | temp | secondary | old (If known)"/>
<definition value="The purpose of this identifier."/>
<comment value="Applications can assume that an identifier is permanent unless it explicitly says that it is temporary."/>
<requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.use"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary id for a permanent one."/>
<isSummary value="true"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="IdentifierUse"/>
</extension>
<strength value="required"/>
<description value="Identifies the purpose for this identifier, if known ."/>
<valueSet value="http://hl7.org/fhir/ValueSet/identifier-use|4.0.0"/>
</binding>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Role.code or implied by context"/>
</mapping>
</element>
<element id="Basic.identifier.type">
<path value="Basic.identifier.type"/>
<short value="Description of identifier"/>
<definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."/>
<comment value="This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type."/>
<requirements value="Allows users to make use of identifiers when the identifier system is not known."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.type"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="CodeableConcept"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="IdentifierType"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
<valueBoolean value="true"/>
</extension>
<strength value="extensible"/>
<description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."/>
<valueSet value="http://hl7.org/fhir/ValueSet/identifier-type"/>
</binding>
<mapping>
<identity value="v2"/>
<map value="CX.5"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Role.code or implied by context"/>
</mapping>
</element>
<element id="Basic.identifier.system">
<path value="Basic.identifier.system"/>
<short value="The namespace for the identifier value"/>
<definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique."/>
<comment value="Identifier.system is always case sensitive."/>
<requirements value="There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we&#39;re dealing with. The system identifies a particular set of unique identifiers."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.system"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<example>
<label value="General"/>
<valueUri value="http://www.acme.com/identifiers/patient"/>
</example>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.4 / EI-2-4"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="II.root or Role.id.root"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./IdentifierType"/>
</mapping>
</element>
<element id="Basic.identifier.value">
<path value="Basic.identifier.value"/>
<short value="The value that is unique"/>
<definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system."/>
<comment value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value&#39;s primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](http://test.org/profile/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.value"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<example>
<label value="General"/>
<valueString value="123456"/>
</example>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.1 / EI.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Value"/>
</mapping>
</element>
<element id="Basic.identifier.period">
<path value="Basic.identifier.period"/>
<short value="Time period when id is/was valid for use"/>
<definition value="Time period during which identifier is/was valid for use."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.period"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Period"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.7 + CX.8"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Role.effectiveTime or implied by context"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StartDate and ./EndDate"/>
</mapping>
</element>
<element id="Basic.identifier.assigner">
<path value="Basic.identifier.assigner"/>
<short value="Organization that issued id (may be just text)"/>
<definition value="Organization that issued/manages the identifier."/>
<comment value="The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.assigner"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Reference"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.4 / (CX.4,CX.9,CX.10)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./IdentifierIssuingAuthority"/>
</mapping>
</element>
<element id="Basic.code">
<path value="Basic.code"/>
<short value="Kind of Resource"/>
<definition value="Identifies the &#39;type&#39; of resource - equivalent to the resource name for other resources."/>
<comment value="Because resource references will only be able to indicate &#39;Basic&#39;, the type of reference will need to be specified in a Profile identified as part of the resource. Refer to the resource notes section for information on appropriate terminologies for this code.&#xA;&#xA;This element is labeled as a modifier because it defines the meaning of the resource and cannot be ignored."/>
<requirements value="Must be able to distinguish different types of Basic resources."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Basic.code"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="CodeableConcept"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This element determines what kind of resource is being represented which drives the meaning of all of the other elements."/>
<isSummary value="true"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="BasicResourceType"/>
</extension>
<strength value="example"/>
<description value="Codes for identifying types of resources not yet defined by FHIR."/>
<valueSet value="http://hl7.org/fhir/ValueSet/basic-resource-type"/>
</binding>
<mapping>
<identity value="w5"/>
<map value="FiveWs.what[x]"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
</element>
<element id="Basic.subject">
<path value="Basic.subject"/>
<short value="Identifies the focus of this resource"/>
<definition value="Identifies the patient, practitioner, device or any other resource that is the &quot;focus&quot; of this resource."/>
<comment value="Optional as not all potential resources will have subjects. Resources associated with multiple subjects can handle this via extension."/>
<requirements value="Needed for partitioning the resource by Patient."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Basic.subject"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Reference"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.subject[x]"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SBJ&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="FiveWs.subject"/>
</mapping>
</element>
<element id="Basic.created">
<path value="Basic.created"/>
<short value="When created"/>
<definition value="Identifies when the resource was first created."/>
<requirements value="Allows ordering resource instances by time."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Basic.created"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="date"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.recorded"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;AUT&#39;]/time (possibly through a ControlAct and Role)"/>
</mapping>
</element>
<element id="Basic.author">
<path value="Basic.author"/>
<short value="Who created"/>
<definition value="Indicates who was responsible for creating the resource instance."/>
<requirements value="Needed for partitioning the resource."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Basic.author"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Reference"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.author"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SUB&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
</element>
</snapshot>
<differential>
<element id="Basic">
<path value="Basic"/>
</element>
<element id="Basic.identifier">
<path value="Basic.identifier"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
<element id="Basic.identifier.extension:foo">
<path value="Basic.identifier.extension"/>
<sliceName value="foo"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t34"/>
<url value="urn:uuid:0fefeab4-abd9-4ea6-b9c7-8a07a04f600c"/>
<name value="t34"/>
<status value="draft"/>
<description value="fixture for #34: Referencing a custom extension"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Basic"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Basic"/>
<derivation value="constraint"/>
<differential>
<element id="Basic">
<path value="Basic"/>
</element>
<element id="Basic.identifier">
<path value="Basic.identifier"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
<element id="Basic.identifier.extension:foo">
<path value="Basic.identifier.extension"/>
<sliceName value="foo"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,739 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t35"/>
<url value="urn:uuid:b22b108f-20f0-4a9e-8bb6-3a8041c8b7b3"/>
<name value="t35"/>
<status value="draft"/>
<description value="fixture for #35: Referencing a profiled custom extension"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM Mapping"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/fivews"/>
<name value="FiveWs Pattern Mapping"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<type value="Basic"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Basic"/>
<derivation value="constraint"/>
<snapshot>
<element id="Basic">
<path value="Basic"/>
<short value="Resource for non-supported content"/>
<definition value="Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don&#39;t map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."/>
<alias value="Z-resource"/>
<alias value="Extension-resource"/>
<alias value="Custom-resource"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Basic"/>
<min value="0"/>
<max value="*"/>
</base>
<constraint>
<key value="dom-2"/>
<severity value="error"/>
<human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
<expression value="contained.contained.empty()"/>
<xpath value="not(parent::f:contained and f:contained)"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<key value="dom-4"/>
<severity value="error"/>
<human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
<expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
<xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<key value="dom-3"/>
<severity value="error"/>
<human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource"/>
<expression value="contained.where(((&#39;#&#39;+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = &#39;#&#39;).exists() or descendants().where(as(canonical) = &#39;#&#39;).exists() or descendants().where(as(canonical) = &#39;#&#39;).exists()).not()).trace(&#39;unmatched&#39;, id).empty()"/>
<xpath value="not(exists(for $contained in f:contained return $contained[not(parent::*/descendant::f:reference/@value=concat(&#39;#&#39;, $contained/*/id/@value) or descendant::f:reference[@value=&#39;#&#39;])]))"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice">
<valueBoolean value="true"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation">
<valueMarkdown value="When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."/>
</extension>
<key value="dom-6"/>
<severity value="warning"/>
<human value="A resource should have narrative for robust management"/>
<expression value="text.div.exists()"/>
<xpath value="exists(f:text/h:div)"/>
<source value="DomainResource"/>
</constraint>
<constraint>
<key value="dom-5"/>
<severity value="error"/>
<human value="If a resource is contained in another resource, it SHALL NOT have a security label"/>
<expression value="contained.meta.security.empty()"/>
<xpath value="not(exists(f:contained/*/f:meta/f:security))"/>
<source value="DomainResource"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="Entity. Role, or Act"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act, Entity or Role"/>
</mapping>
</element>
<element id="Basic.id">
<path value="Basic.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comment value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="id"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Basic.meta">
<path value="Basic.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.meta"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Meta"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
</element>
<element id="Basic.implicitRules">
<path value="Basic.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."/>
<comment value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it&#39;s narrative along with other profiles, value sets, etc."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.implicitRules"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&#39;s meaning or interpretation"/>
<isSummary value="true"/>
</element>
<element id="Basic.language">
<path value="Basic.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comment value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Resource.language"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
<valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="Language"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
<valueBoolean value="true"/>
</extension>
<strength value="preferred"/>
<description value="A human language."/>
<valueSet value="http://hl7.org/fhir/ValueSet/languages"/>
</binding>
</element>
<element id="Basic.text">
<path value="Basic.text"/>
<short value="Text summary of the resource, for human interpretation"/>
<definition value="A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
<comment value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later."/>
<alias value="narrative"/>
<alias value="html"/>
<alias value="xhtml"/>
<alias value="display"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="DomainResource.text"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Narrative"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="Act.text?"/>
</mapping>
</element>
<element id="Basic.contained">
<path value="Basic.contained"/>
<short value="Contained, inline Resources"/>
<definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
<comment value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels."/>
<alias value="inline resources"/>
<alias value="anonymous resources"/>
<alias value="contained resources"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="DomainResource.contained"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Resource"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Basic.extension">
<path value="Basic.extension"/>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="DomainResource.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Basic.modifierExtension">
<path value="Basic.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element&#39;s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.&#xA;&#xA;Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<requirements value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://test.org/profile/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="DomainResource.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="Basic.identifier">
<path value="Basic.identifier"/>
<short value="Business identifier"/>
<definition value="Identifier assigned to the resource for business purposes, outside the context of FHIR."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Basic.identifier"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Identifier"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.identifier"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./identifier"/>
</mapping>
</element>
<element id="Basic.identifier.id">
<path value="Basic.identifier.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Basic.identifier.extension">
<path value="Basic.identifier.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="Basic.identifier.extension:foo">
<path value="Basic.identifier.extension"/>
<sliceName value="foo"/>
<short value="Status"/>
<definition value="An Extension"/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
<profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-statu2"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
<isSummary value="false"/>
</element>
<element id="Basic.identifier.use">
<path value="Basic.identifier.use"/>
<short value="usual | official | temp | secondary | old (If known)"/>
<definition value="The purpose of this identifier."/>
<comment value="Applications can assume that an identifier is permanent unless it explicitly says that it is temporary."/>
<requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.use"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary id for a permanent one."/>
<isSummary value="true"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="IdentifierUse"/>
</extension>
<strength value="required"/>
<description value="Identifies the purpose for this identifier, if known ."/>
<valueSet value="http://hl7.org/fhir/ValueSet/identifier-use|4.0.0"/>
</binding>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Role.code or implied by context"/>
</mapping>
</element>
<element id="Basic.identifier.type">
<path value="Basic.identifier.type"/>
<short value="Description of identifier"/>
<definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."/>
<comment value="This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type."/>
<requirements value="Allows users to make use of identifiers when the identifier system is not known."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.type"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="CodeableConcept"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="IdentifierType"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
<valueBoolean value="true"/>
</extension>
<strength value="extensible"/>
<description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."/>
<valueSet value="http://hl7.org/fhir/ValueSet/identifier-type"/>
</binding>
<mapping>
<identity value="v2"/>
<map value="CX.5"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Role.code or implied by context"/>
</mapping>
</element>
<element id="Basic.identifier.system">
<path value="Basic.identifier.system"/>
<short value="The namespace for the identifier value"/>
<definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique."/>
<comment value="Identifier.system is always case sensitive."/>
<requirements value="There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we&#39;re dealing with. The system identifies a particular set of unique identifiers."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.system"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<example>
<label value="General"/>
<valueUri value="http://www.acme.com/identifiers/patient"/>
</example>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.4 / EI-2-4"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="II.root or Role.id.root"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./IdentifierType"/>
</mapping>
</element>
<element id="Basic.identifier.value">
<path value="Basic.identifier.value"/>
<short value="The value that is unique"/>
<definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system."/>
<comment value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value&#39;s primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](http://test.org/profile/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.value"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<example>
<label value="General"/>
<valueString value="123456"/>
</example>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.1 / EI.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Value"/>
</mapping>
</element>
<element id="Basic.identifier.period">
<path value="Basic.identifier.period"/>
<short value="Time period when id is/was valid for use"/>
<definition value="Time period during which identifier is/was valid for use."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.period"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Period"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.7 + CX.8"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Role.effectiveTime or implied by context"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StartDate and ./EndDate"/>
</mapping>
</element>
<element id="Basic.identifier.assigner">
<path value="Basic.identifier.assigner"/>
<short value="Organization that issued id (may be just text)"/>
<definition value="Organization that issued/manages the identifier."/>
<comment value="The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Identifier.assigner"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Reference"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CX.4 / (CX.4,CX.9,CX.10)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./IdentifierIssuingAuthority"/>
</mapping>
</element>
<element id="Basic.code">
<path value="Basic.code"/>
<short value="Kind of Resource"/>
<definition value="Identifies the &#39;type&#39; of resource - equivalent to the resource name for other resources."/>
<comment value="Because resource references will only be able to indicate &#39;Basic&#39;, the type of reference will need to be specified in a Profile identified as part of the resource. Refer to the resource notes section for information on appropriate terminologies for this code.&#xA;&#xA;This element is labeled as a modifier because it defines the meaning of the resource and cannot be ignored."/>
<requirements value="Must be able to distinguish different types of Basic resources."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="Basic.code"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="CodeableConcept"/>
</type>
<isModifier value="true"/>
<isModifierReason value="This element determines what kind of resource is being represented which drives the meaning of all of the other elements."/>
<isSummary value="true"/>
<binding>
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
<valueString value="BasicResourceType"/>
</extension>
<strength value="example"/>
<description value="Codes for identifying types of resources not yet defined by FHIR."/>
<valueSet value="http://hl7.org/fhir/ValueSet/basic-resource-type"/>
</binding>
<mapping>
<identity value="w5"/>
<map value="FiveWs.what[x]"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
</element>
<element id="Basic.subject">
<path value="Basic.subject"/>
<short value="Identifies the focus of this resource"/>
<definition value="Identifies the patient, practitioner, device or any other resource that is the &quot;focus&quot; of this resource."/>
<comment value="Optional as not all potential resources will have subjects. Resources associated with multiple subjects can handle this via extension."/>
<requirements value="Needed for partitioning the resource by Patient."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Basic.subject"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Reference"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.subject[x]"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SBJ&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="FiveWs.subject"/>
</mapping>
</element>
<element id="Basic.created">
<path value="Basic.created"/>
<short value="When created"/>
<definition value="Identifies when the resource was first created."/>
<requirements value="Allows ordering resource instances by time."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Basic.created"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="date"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.recorded"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;AUT&#39;]/time (possibly through a ControlAct and Role)"/>
</mapping>
</element>
<element id="Basic.author">
<path value="Basic.author"/>
<short value="Who created"/>
<definition value="Indicates who was responsible for creating the resource instance."/>
<requirements value="Needed for partitioning the resource."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Basic.author"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Reference"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isModifier value="false"/>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="FiveWs.author"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SUB&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
</element>
</snapshot>
<differential>
<element id="Basic">
<path value="Basic"/>
</element>
<element id="Basic.identifier">
<path value="Basic.identifier"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
<element id="Basic.identifier.extension:foo">
<path value="Basic.identifier.extension"/>
<sliceName value="foo"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-statu2"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t35"/>
<url value="urn:uuid:b22b108f-20f0-4a9e-8bb6-3a8041c8b7b3"/>
<name value="t35"/>
<status value="draft"/>
<description value="fixture for #35: Referencing a profiled custom extension"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Basic"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Basic"/>
<derivation value="constraint"/>
<differential>
<element id="Basic">
<path value="Basic"/>
</element>
<element id="Basic.identifier">
<path value="Basic.identifier"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
<element id="Basic.identifier.extension:foo">
<path value="Basic.identifier.extension"/>
<sliceName value="foo"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Extension"/>
<profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-statu2"/>
</type>
<mustSupport value="true"/>
<isModifier value="false"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t36"/>
<url value="urn:uuid:428d7c25-e55f-42b4-a93e-83cef54421d7"/>
<name value="t36"/>
<status value="draft"/>
<description value="fixture for #36: Deep Recursion"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="PlanDefinition"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
<derivation value="constraint"/>
<differential>
<element id="PlanDefinition">
<path value="PlanDefinition"/>
</element>
<element id="PlanDefinition.action">
<path value="PlanDefinition.action"/>
</element>
<element id="PlanDefinition.action.action">
<path value="PlanDefinition.action.action"/>
</element>
<element id="PlanDefinition.action.action.action">
<path value="PlanDefinition.action.action.action"/>
</element>
<element id="PlanDefinition.action.action.action.action">
<path value="PlanDefinition.action.action.action.action"/>
</element>
<element id="PlanDefinition.action.action.action.action.condition">
<path value="PlanDefinition.action.action.action.action.condition"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="kind"/>
</discriminator>
<rules value="open"/>
</slicing>
</element>
<element id="PlanDefinition.action.action.action.action.condition:stopConditions">
<path value="PlanDefinition.action.action.action.action.condition"/>
<sliceName value="stopConditions"/>
</element>
<element id="PlanDefinition.action.action.action.action.condition:stopConditions:kind">
<path value="PlanDefinition.action.action.action.action.condition.kind"/>
<type>
<code value="code"/>
</type>
<fixedCode value="stop"/>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t37"/>
<url value="urn:uuid:44a92f3e-3681-4dbc-baa2-48a07e2765ca"/>
<name value="t37"/>
<status value="draft"/>
<description value="fixture for #37: Test bad Path"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="MedicationRequest"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="MedicationRequest"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction.timing"/>
</element>
<element>
<path value="MedicationRequiest.dosageInstruction.timing.event"/>
<mustSupport value="true"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction.timing.repeat"/>
<mustSupport value="true"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t38"/>
<url value="urn:uuid:00d940df-0e4f-40db-8051-252901d659e4"/>
<name value="t38"/>
<status value="draft"/>
<description value="fixture for #38: Deep nesting"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="MedicationRequest"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="MedicationRequest"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction.timing"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction.timing.repeat"/>
</element>
<element>
<path value="MedicationRequest.dosageInstruction.timing.repeat.bounds[x]"/>
<type>
<code value="Duration"/>
<profile value="http://example.org/fhir/StructureDefinition/profile-duration"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t4"/>
<url value="urn:uuid:71e0a5a6-95bf-4e04-aa6a-4af0ebef3f29"/>
<name value="t4"/>
<status value="draft"/>
<description value="fixture for #4: test appending documentation"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier"/>
<definition value="... some more doco"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t40"/>
<url value="urn:uuid:9"/>
<name value="t40"/>
<status value="draft"/>
<description value="fixture for #40: Choice Types: constrain minimum cardinality"/>
<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"/>
</element>
<element>
<path value="Observation.value[x]"/>
<short value="some text"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t41"/>
<url value="urn:uuid:4485cada-4667-4460-937d-f2dbe6e73f1d"/>
<name value="t41"/>
<status value="draft"/>
<description value="fixture for #41: Choice Types: constrain list of choices to 2"/>
<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"/>
</element>
<element>
<path value="Observation.value[x]"/>
<short value="some text"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t42"/>
<url value="urn:uuid:5eb149bd-b2f3-4d63-80d2-4d7fccbd76db"/>
<name value="t42"/>
<status value="draft"/>
<description value="fixture for #42: Choice Types: constrain list of choices to 1"/>
<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"/>
</element>
<element>
<path value="Observation.value[x]"/>
<short value="some text"/>
<type>
<code value="Quantity"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t43"/>
<url value="urn:uuid:4caab1de-9278-4783-810c-472c3071f7fd"/>
<name value="t43"/>
<status value="draft"/>
<description value="fixture for #43: Choice Types: constrain list of choices to 1 and constrain the type (slicing)"/>
<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"/>
</element>
<element>
<path value="Observation.value[x]"/>
<slicing>
<discriminator>
<type value="type"/>
<path value="$this"/>
</discriminator>
</slicing>
<short value="some text"/>
<type>
<code value="Quantity"/>
</type>
</element>
<element>
<path value="Observation.value[x]"/>
<sliceName value="Quantity"/>
<short value="some text for quantity"/>
<type>
<code value="Quantity"/>
</type>
</element>
<element>
<path value="Observation.value[x].value"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t44"/>
<url value="urn:uuid:ecb6f563-2957-4da8-832e-cb6d94329a93"/>
<name value="t44"/>
<status value="draft"/>
<description value="fixture for #44: Choice Types: constrain list of choices to 1 and constrain the type (shortcut)"/>
<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"/>
</element>
<element>
<path value="Observation.value[x]"/>
<short value="some text"/>
<type>
<code value="Quantity"/>
</type>
</element>
<element>
<path value="Observation.valueQuantity"/>
<short value="some text for quantity"/>
</element>
<element>
<path value="Observation.valueQuantity.value"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t5"/>
<url value="urn:uuid:5dfe34b3-58ed-43bd-a677-1612246a8f1b"/>
<name value="t5"/>
<status value="draft"/>
<description value="fixture for #5: type narrowing #1"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.deceased[x]"/>
<type>
<code value="dateTime"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t6"/>
<url value="urn:uuid:977f7fee-448e-4090-8c3a-441b3b3cca7a"/>
<name value="t6"/>
<status value="draft"/>
<description value="fixture for #6: type narrowing #2 - this makes a comment about the use of date, but doesn&#39;t constrain"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.deceasedDateTime"/>
<comment value="New Comment"/>
<type>
<code value="dateTime"/>
</type>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t7"/>
<url value="urn:uuid:7a1d096b-bb61-40f7-880a-8cc4ba0329b9"/>
<name value="t7"/>
<status value="draft"/>
<description value="fixture for #7: type mapping resolution"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier"/>
<mapping>
<identity value="rim"/>
<map value="test"/>
</mapping>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t8"/>
<url value="urn:uuid:d2cb3b87-8f73-46fd-821c-cf39f0512757"/>
<name value="t8"/>
<status value="draft"/>
<description value="fixture for #8: walking into a type"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier"/>
<mustSupport value="true"/>
</element>
<element>
<path value="Patient.identifier.system"/>
<mustSupport value="true"/>
</element>
</differential>
</StructureDefinition>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="t9"/>
<url value="urn:uuid:d03a45b9-fc35-43c8-9f93-890487cf7076"/>
<name value="t9"/>
<status value="draft"/>
<description value="fixture for #9: walking into a type (sparsely)"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element>
<path value="Patient.identifier.system"/>
<mustSupport value="true"/>
</element>
</differential>
</StructureDefinition>