New test case - contained profiles not supported by validator and validator doesn't check profiles asserted on references to contained resources.

This commit is contained in:
Lloyd McKenzie 2019-05-23 14:19:15 -06:00
parent eaeac2d2c5
commit 88f3924ba7
3 changed files with 75 additions and 1 deletions

View File

@ -560,8 +560,14 @@
"source" : "slicing-example-uk.profile.xml",
"errorCount": 16
}
},
"patient-contained-org.xml" : {
"errorCount": 0,
"profile" : {
"source" : "patient-contained-org-profile.xml",
"errorCount": 1
}
}
}
}
}

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="patient-contained-org-profile"/>
<contained>
<StructureDefinition>
<id value="gp"/>
<url value="http://hl7.org/fhir/patient-contained-org-org-profile"/>
<name value="PatientContainedOrgOrg"/>
<status value="draft"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Organization"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Organization"/>
<derivation value="constraint"/>
<differential>
<element id="Organization">
<path value="Organization"/>
</element>
<element id="Organization.name">
<path value="Organization.name"/>
<min value="1"/>
</element>
</differential>
</StructureDefinition>
</contained>
<url value="http://hl7.org/fhir/StructureDefinition/patient-contained-gp-profile"/>
<name value="PatientContainedOrgProfile"/>
<status value="draft"/>
<description value="Test profile to confirm that targetProfiles on references are enforced against contained resources"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element id="Patient">
<path value="Patient"/>
</element>
<element id="Patient.generalPractitioner">
<path value="Patient.generalPractitioner"/>
<type>
<code value="Reference"/>
<targetProfile value="#gp"/>
<aggregation value="contained"/>
</type>
</element>
</differential>
</StructureDefinition>

View File

@ -0,0 +1,20 @@
<Patient xmlns="http://hl7.org/fhir">
<id value="patient-error-gender"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
Check that profile validation checks contained resources - should fail because Organization is missing 'name' which is required by profile
</div>
</text>
<contained>
<Organization>
<id value="gp"/>
<identifier>
<value value="123"/>
</identifier>
</Organization>
</contained>
<generalPractitioner>
<reference value="#gp"/>
</generalPractitioner>
</Patient>