Skip to content

Commit

Permalink
Add test case for deprecated extension note, and adjust language arou…
Browse files Browse the repository at this point in the history
…nd code system properties
  • Loading branch information
Grahame Grieve committed Jan 10, 2025
1 parent 437cec3 commit fe8c8e4
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 3 deletions.
58 changes: 58 additions & 0 deletions validator/StructureDefinition-deprecated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"resourceType" : "StructureDefinition",
"id" : "deprecated",
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "vocab"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger" : 1
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "deprecated",
"_valueCode" : {
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status-reason",
"valueMarkdown" : "Testing out the [validator](http://hl7.org/fhir/validator)"
}]
}
}],
"url" : "http://hl7.org/fhir/test/StructureDefinition/deprecated",
"version" : "4.0.1",
"name" : "DeprecatedExtension",
"title" : "Deprecated Extension",
"status" : "retired",
"date" : "2019-11-01T09:29:23+11:00",
"fhirVersion" : "5.0.0",
"kind" : "complex-type",
"abstract" : false,
"context" : [{
"type" : "element",
"expression" : "Patient"
}],
"type" : "Extension",
"baseDefinition" : "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation" : "constraint",
"differential" : {
"element" : [{
"id" : "Extension.extension",
"path" : "Extension.extension",
"max" : "0"
},
{
"id" : "Extension.url",
"path" : "Extension.url",
"fixedUri" : "http://hl7.org/fhir/test/StructureDefinition/deprecated"
},
{
"id" : "Extension.value[x]",
"path" : "Extension.value[x]",
"min" : 1,
"type" : [{
"code" : "string"
}]
}]
}
}
27 changes: 24 additions & 3 deletions validator/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41400,7 +41400,7 @@
"severity": "warning",
"code": "invalid",
"details": {
"text": "The uri 'http://terminology.hl7.org/CodeSystem/utg-concept-properties#status' for the property 'status' implies the code 'status' exists in the CodeSystem UTG Specific Concept Properties for http://terminology.hl7.org/CodeSystem/utg-concept-properties but it does not exist"
"text": "The uri 'http://terminology.hl7.org/CodeSystem/utg-concept-properties#status' for the property 'status' implies a property with that URI exists in the CodeSystem UTG Specific Concept Properties for http://terminology.hl7.org/CodeSystem/utg-concept-properties, or the code 'status' does, but neither were found"
},
"diagnostics": "[3,41]",
"expression": [
Expand Down Expand Up @@ -48355,7 +48355,7 @@
"severity": "warning",
"code": "invalid",
"details": {
"text": "The uri 'http://hl7.org/fhir/concept-properties#deprecationDate' for the property 'inactive' implies the code 'deprecationDate' exists in the CodeSystem FHIR Defined Concept Properties for http://hl7.org/fhir/concept-properties but it does not exist"
"text": "The uri 'http://hl7.org/fhir/concept-properties#deprecationDate' for the property 'inactive' implies a property with that URI exists in the CodeSystem FHIR Defined Concept Properties for http://hl7.org/fhir/concept-properties, or the code 'deprecationDate' does, but neither were found"
},
"diagnostics": "[1,2]",
"expression": [
Expand Down Expand Up @@ -50749,7 +50749,7 @@
"severity": "warning",
"code": "invalid",
"details": {
"text": "The uri 'http://terminology.hl7.org/CodeSystem/utg-concept-properties#status' for the property 'status' implies the code 'status' exists in the CodeSystem UTG Specific Concept Properties for http://terminology.hl7.org/CodeSystem/utg-concept-properties but it does not exist"
"text": "The uri 'http://terminology.hl7.org/CodeSystem/utg-concept-properties#status' for the property 'status' implies a property with that URI exists in the CodeSystem UTG Specific Concept Properties for http://terminology.hl7.org/CodeSystem/utg-concept-properties, or the code 'status' does, but neither were found"
},
"diagnostics": "[1,2]",
"expression": [
Expand Down Expand Up @@ -50804,6 +50804,27 @@
}
}
},
{
"name": "deprecated-extension",
"file": "patient-deprecated-extension.json",
"version": "5.0",
"supporting" : ["StructureDefinition-deprecated.json"],
"description": "checking that the warning message picks up the deprecation notice",
"java": {
"outcome": {
"resourceType" : "OperationOutcome",
"issue" : [{
"severity" : "information",
"code" : "business-rule",
"details" : {
"text" : "The extension http://hl7.org/fhir/test/StructureDefinition/deprecated|4.0.1 is deprecated with the note Testing out the \"validator\" (http://hl7.org/fhir/validator)"
},
"diagnostics" : "[4,4]",
"expression" : ["Patient.extension[0]"]
}]
}
}
},
{
"name": "zzz",
"file": "zzz.json",
Expand Down
8 changes: 8 additions & 0 deletions validator/patient-deprecated-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"resourceType" : "Patient",
"active" : true,
"extension" : [{
"url" : "http://hl7.org/fhir/test/StructureDefinition/deprecated",
"valueString" : "something"
}]
}

0 comments on commit fe8c8e4

Please sign in to comment.