Skip to content

Commit

Permalink
Add expression and issue type to test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Dec 28, 2023
1 parent 8601347 commit 2cda060
Show file tree
Hide file tree
Showing 47 changed files with 703 additions and 85 deletions.
3 changes: 3 additions & 0 deletions tx/deprecated/expand-withdrawn-request-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"parameter" : [{
"name" : "url",
"valueUrl" : "http://hl7.org/fhir/test/ValueSet/withdrawn"
},{
"name" : "excludeNested",
"valueBoolean" : true
}]
}
48 changes: 26 additions & 22 deletions tx/deprecated/expand-withdrawn-response-valueSet.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@
"timestamp" : "$instant$",
"total" : 7,
"parameter" : [{
"name" : "excludeNested",
"valueBoolean" : true
},
{
"name" : "used-codesystem",
"valueUri" : "http://hl7.org/fhir/test/CodeSystem/deprecated|0.1.0"
},
{
"$optional$" : true,
"$optional$" : true,
"name" : "version",
"valueUri" : "http://hl7.org/fhir/test/CodeSystem/deprecated|0.1.0"
},
Expand All @@ -43,27 +47,27 @@
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2",
"display" : "Display 2",
"contains" : [{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2a",
"display" : "Display 2a",
"contains" : [{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2aI",
"display" : "Display 2aI"
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2aII",
"display" : "Display 2aII"
}]
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2b",
"display" : "Display 2b"
}]
"display" : "Display 2"
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2a",
"display" : "Display 2a"
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2aI",
"display" : "Display 2aI"
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2aII",
"display" : "Display 2aII"
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
"code" : "code2b",
"display" : "Display 2b"
},
{
"system" : "http://hl7.org/fhir/test/CodeSystem/deprecated",
Expand Down
5 changes: 5 additions & 0 deletions tx/deprecated/validate-draft-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"severity" : "information",
"code" : "business-rule",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to draft CodeSystem http://hl7.org/fhir/test/CodeSystem/draft|0.1.0"
}
}]
Expand Down
5 changes: 5 additions & 0 deletions tx/deprecated/validate-experimental-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"severity" : "information",
"code" : "business-rule",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to experimental CodeSystem http://hl7.org/fhir/test/CodeSystem/experimental|0.1.0"
}
}]
Expand Down
10 changes: 10 additions & 0 deletions tx/deprecated/validate-not-withdrawn-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,23 @@
"severity" : "information",
"code" : "business-rule",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to deprecated CodeSystem http://hl7.org/fhir/test/CodeSystem/deprecated|0.1.0"
}
},
{
"severity" : "information",
"code" : "business-rule",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to withdrawn ValueSet http://hl7.org/fhir/test/ValueSet/withdrawn|5.0.0"
}
}]
Expand Down
10 changes: 10 additions & 0 deletions tx/deprecated/validate-withdrawn-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,23 @@
"severity" : "information",
"code" : "business-rule",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to deprecated CodeSystem http://hl7.org/fhir/test/CodeSystem/deprecated|0.1.0"
}
},
{
"severity" : "information",
"code" : "business-rule",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "status-check"
}],
"text" : "Reference to withdrawn ValueSet http://hl7.org/fhir/test/ValueSet/withdrawn|5.0.0"
}
}]
Expand Down
14 changes: 13 additions & 1 deletion tx/errors/errors-unknown-system1-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"$optional-properties$" : ["expression" ],
"severity" : "error",
"code" : "not-found",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-found"
}],
"text" : "The code system http://hl7.org/fhir/test/CodeSystem/simpleX could not be found"
},
"location" : ["system"]
"location" : ["system"],
"expression" : ["system"]
},
{
"severity" : "warning",
"code" : "not-found",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "vs-invalid"
}],
"text" : "Unable to check whether the code is in the value set http://hl7.org/fhir/test/ValueSet/unknown-system|5.0.0"
}
}]
Expand Down
18 changes: 16 additions & 2 deletions tx/errors/errors-unknown-system2-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,34 @@
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"$optional-properties$" : ["expression" ],
"severity" : "error",
"code" : "code-invalid",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-in-vs"
}],
"text" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simpleXX#code1' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/unknown-system|5.0.0'"
},
"location" : ["code"]
"location" : ["code"],
"expression" : ["code"]
},
{
"$optional-properties$" : ["expression" ],
"severity" : "error",
"code" : "not-found",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-found"
}],
"text" : "The code system http://hl7.org/fhir/test/CodeSystem/simpleXX could not be found"
},
"location" : ["system"]
"location" : ["system"],
"expression" : ["system"]
}]
}
},
Expand Down
9 changes: 8 additions & 1 deletion tx/inactive/validate-inactive-2a-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"$optional-properties$" : ["expression" ],
"severity" : "error",
"code" : "code-invalid",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-in-vs"
}],
"text" : "$external:1:http://hl7.org/fhir/test/ValueSet/inactive-all-active|5.0.0$"
},
"location" : ["Coding.code"]
"location" : ["Coding.code"],
"expression" : ["Coding.code"]
}]
}
},
Expand Down
9 changes: 8 additions & 1 deletion tx/inactive/validate-inactive-3a-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"$optional-properties$" : ["expression" ],
"severity" : "error",
"code" : "code-invalid",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-in-vs"
}],
"text" : "$external:1:http://hl7.org/fhir/test/ValueSet/inactive-all-active|5.0.0$"
},
"location" : ["Coding.code"]
"location" : ["Coding.code"],
"expression" : ["Coding.code"]
}]
}
},
Expand Down
20 changes: 10 additions & 10 deletions tx/messages-tx.fhir.org.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"validation/simple-code-bad-code-response-parameters.json" : {
"1" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'",
"2" : "Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'",
"3" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'"
"2" : "Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'",
"3" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'"
},
"validation/simple-code-implied-bad-code-response-parameters.json" : {
"1" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'",
"2" : "Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'",
"3" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'"
"2" : "Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'",
"3" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'"
},
"validation/simple-coding-bad-code-response-parameters.json" : {
"1" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'",
"2" : "Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'",
"3" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'"
"2" : "Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'",
"3" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'"
},
"validation/simple-codeableconcept-bad-code-response-parameters.json" : {
"1" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'",
"2" : "Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'",
"3" : "No valid coding was found for the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown Code 'code1x' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'"
"2" : "Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'",
"3" : "No valid coding was found for the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#code1x' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'; Unknown code 'code1x' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'"
},
"validation/simple-code-bad-system-response-parameters.json" : {
"1" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simplex#code1' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'",
Expand Down Expand Up @@ -105,9 +105,9 @@
},
"validation/complex-codeableconcept-full-response-parameters.json" : {
"1" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#xxxx' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/version-all-1|1.1.0'",
"2" : "Unknown Code 'xxxx' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'",
"2" : "Unknown code 'xxxx' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'",
"3" : "Wrong Display Name 'xxxxx' for http://hl7.org/fhir/test/CodeSystem/version#code1 - should be 'Display 1 (1.0)' (en) (for the language(s) '--')",
"4" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#xxxx' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/version-all-1|1.1.0'; Unknown Code 'xxxx' in the system 'http://hl7.org/fhir/test/CodeSystem/simple|0.1.0'; Wrong Display Name 'xxxxx' for http://hl7.org/fhir/test/CodeSystem/version#code1 - should be 'Display 1 (1.0)' (en) (for the language(s) '--')"
"4" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/simple#xxxx' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/version-all-1|1.1.0'; Unknown code 'xxxx' in the CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simple' version '0.1.0'; Wrong Display Name 'xxxxx' for http://hl7.org/fhir/test/CodeSystem/version#code1 - should be 'Display 1 (1.0)' (en) (for the language(s) '--')"
},
"validation/simple-coding-bad-version1-response-parameters.json" : {
"1" : "The code system http://hl7.org/fhir/test/CodeSystem/simple version 1.0.0 could not be found. Valid versions: [0.1.0]",
Expand Down
16 changes: 14 additions & 2 deletions tx/other/validation-dual-filter-out-response-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,28 @@
"severity" : "error",
"code" : "code-invalid",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-in-vs"
}],
"text" : "No valid coding was found for the value set 'http://hl7.org/fhir/test/ValueSet/dual-filter'"
}
},
{
"severity" : "warning",
"$optional-properties$" : ["expression" ],
"severity" : "information",
"code" : "code-invalid",
"details" : {
"$optional-properties$" : ["coding" ],
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "this-code-not-in-vs"
}],
"text" : "The provided code 'http://hl7.org/fhir/test/CodeSystem/dual-filter#AA' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/dual-filter'"
},
"location" : ["CodeableConcept.coding[0].code"]
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
}]
}
},
Expand Down
25 changes: 25 additions & 0 deletions tx/test-cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,18 @@
"profile" : "version/parameters-default-version.json",
"request" : "validation/version-profile-coding-request-parameters.json",
"response" : "validation/version-profile-coding-response-parameters.json"
},
{
"name" : "validation-cs-code-good",
"operation" : "cs-validate-code",
"request" : "validation/cs-code-good-request-parameters.json",
"response" : "validation/cs-code-good-response-parameters.json"
},
{
"name" : "validation-cs-code-bad-code",
"operation" : "cs-validate-code",
"request" : "validation/cs-code-bad-code-request-parameters.json",
"response" : "validation/cs-code-bad-code-response-parameters.json"
}
]
},{
Expand Down Expand Up @@ -898,6 +910,19 @@
"response" : "inactive/validate-inactive-3b-response-parameters.json"
}
]
},{
"name" : "tx.fhir.org",
"mode" : "tx.fhir.org",
"description" : "These are tx.fhir.org specific tests. There's no expectation that other servers will pass these tests, and they are not executed by default. (other servers can, but they depend on other set up not controlled by the tests",
"setup" : [ ],
"tests" : [
{
"name" : "snomed-validation-1",
"operation" : "cs-validate-code",
"request" : "tx.fhir.org/snomed-validation-1-request-parameters.json",
"response" : "tx.fhir.org/snomed-validation-1-response-parameters.json"
}
]
}],
"todo" : "incomplete code systems, inactive/abstract, filter = notSelectable",
"not-done" : [
Expand Down
1 change: 1 addition & 0 deletions tx/tx.fhir.org/snomed-validation-1-request-parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"resourceType":"Parameters","parameter":[{"name":"code","valueCode":"276885007x"},{"name" : "system", "valueUri":"http://snomed.info/sct"}]}
Loading

0 comments on commit 2cda060

Please sign in to comment.