From 27bf132f51d5a9561ef6b0bcec751fd809f68723 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 14 Nov 2023 11:49:33 +1100 Subject: [PATCH] Add test case for profiles with defaultValues --- validator/manifest.json | 20 ++++++++++++++++++++ validator/profile-default-value.xml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 validator/profile-default-value.xml diff --git a/validator/manifest.json b/validator/manifest.json index 1a9cd435..51f87ad4 100644 --- a/validator/manifest.json +++ b/validator/manifest.json @@ -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", diff --git a/validator/profile-default-value.xml b/validator/profile-default-value.xml new file mode 100644 index 00000000..3ad372a8 --- /dev/null +++ b/validator/profile-default-value.xml @@ -0,0 +1,20 @@ + + + + + + <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> \ No newline at end of file