Skip to content

Commit

Permalink
Add test case for profiles with defaultValues
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Nov 14, 2023
1 parent 0c95c80 commit 27bf132
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions validator/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37361,6 +37361,26 @@
}
}
},
{
"name": "profile-default-value",
"file": "profile-default-value.xml",
"description": "Check default values are not allowed",
"version": "4.0",
"java": {
"outcome": {
"resourceType" : "OperationOutcome",
"issue" : [{
"severity" : "error",
"code" : "invariant",
"details" : {
"text" : "Constraint failed: sdf-21: 'Default values can only be specified on specializations'"
},
"diagnostics" : "[1,50]",
"expression" : ["StructureDefinition"]
}]
}
}
},
{
"name": "zzz",
"file": "zzz.json",
Expand Down
20 changes: 20 additions & 0 deletions validator/profile-default-value.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="profile-default-value"/>
<url value="http://hl7.org.au/fhir/test/StructureDefinition/profile-default-value"/>
<name value="ProfileDefaultValue"/>
<title value="profile-default-value"/>
<status value="draft"/>
<date value="2017-09-06T06:30:54+00:00"/>
<fhirVersion value="4.0.1"/>
<kind value="resource"/>
<abstract value="false"/>
<type value="Patient"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<derivation value="constraint"/>
<differential>
<element id="Patient.active">
<path value="Patient.active"/>
<defaultValueBoolean value="true"/>
</element>
</differential>
</StructureDefinition>

0 comments on commit 27bf132

Please sign in to comment.