Skip to content

Commit

Permalink
Add new tests for other cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Jan 13, 2024
1 parent cd14dd7 commit f6003f0
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tx/validation/simple-code-bad-valueSet-request-parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "url",
"valueUri" : "http://hl7.org/fhir/test/ValueSet/simple-allX"
},{
"name" : "code",
"valueCode" : "code1"
},{
"name" : "system",
"valueUri" : "http://hl7.org/fhir/test/CodeSystem/simple"
}]
}
28 changes: 28 additions & 0 deletions tx/validation/simple-code-bad-valueSet-response-parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "issues",
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"severity" : "error",
"code" : "not-found",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-found"
}],
"text" : "A definition for the value Set 'http://hl7.org/fhir/test/ValueSet/simple-allX' could not be found"
}
}]
}
},
{
"name" : "message",
"valueString" : "A definition for the value Set 'http://hl7.org/fhir/test/ValueSet/simple-allX' could not be found"
},
{
"name" : "result",
"valueBoolean" : false
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "url",
"valueUri" : "http://hl7.org/fhir/test/ValueSet/simple-allX"
},{
"name" : "codeableConcept",
"valueCodeableConcept" : {
"coding" : [{
"system" : "http://hl7.org/fhir/test/CodeSystem/simple",
"code" : "code1"
}]
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "issues",
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"severity" : "error",
"code" : "not-found",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-found"
}],
"text" : "A definition for the value Set 'http://hl7.org/fhir/test/ValueSet/simple-allX' could not be found"
}
}]
}
},
{
"name" : "message",
"valueString" : "A definition for the value Set 'http://hl7.org/fhir/test/ValueSet/simple-allX' could not be found"
},
{
"name" : "result",
"valueBoolean" : false
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "url",
"valueUri" : "http://hl7.org/fhir/test/ValueSet/simple-all"
},{
"name" : "codeableConcept",
"valueCodeableConcept" : {
"coding" : [{
"system" : "http://hl7.org/fhir/test/CodeSystem/simpleXX",
"version" : "1.0.4234",
"code" : "code1"
}]
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "codeableConcept",
"valueCodeableConcept" : {
"coding" : [{
"system" : "http://hl7.org/fhir/test/CodeSystem/simpleXX",
"version" : "1.0.4234",
"code" : "code1"
}]
}
},
{
"name" : "issues",
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"severity" : "error",
"code" : "code-invalid",
"details" : {
"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/simple-all|5.0.0'"
}
},
{
"severity" : "error",
"code" : "not-found",
"details" : {

"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-found"
}],
"text" : "A definition for CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simpleXX' version '1.0.4234' could not be found, so the code cannot be validated. Valid versions: []"
},
"location" : ["CodeableConcept.coding[0].system"],
"expression" : ["CodeableConcept.coding[0].system"]
},
{
"severity" : "information",
"code" : "code-invalid",
"details" : {
"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/simpleXX|1.0.4234#code1' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'"
},
"location" : ["CodeableConcept.coding[0].code"],
"expression" : ["CodeableConcept.coding[0].code"]
}]
}
},
{
"name" : "message",
"valueString" : "A definition for CodeSystem 'http://hl7.org/fhir/test/CodeSystem/simpleXX' version '1.0.4234' could not be found, so the code cannot be validated. Valid versions: []; 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/simpleXX|1.0.4234#code1' was not found in the value set 'http://hl7.org/fhir/test/ValueSet/simple-all|5.0.0'"
},
{
"name" : "result",
"valueBoolean" : false
},
{
"name" : "x-caused-by-unknown-system",
"valueCanonical" : "http://hl7.org/fhir/test/CodeSystem/simpleXX|1.0.4234"
}]
}
13 changes: 13 additions & 0 deletions tx/validation/simple-coding-bad-valueSet-request-parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "url",
"valueUri" : "http://hl7.org/fhir/test/ValueSet/simple-allX"
},{
"name" : "coding",
"valueCoding" : {
"system" : "http://hl7.org/fhir/test/CodeSystem/simple",
"code" : "code1"
}
}]
}
28 changes: 28 additions & 0 deletions tx/validation/simple-coding-bad-valueSet-response-parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"resourceType" : "Parameters",
"parameter" : [{
"name" : "issues",
"resource" : {
"resourceType" : "OperationOutcome",
"issue" : [{
"severity" : "error",
"code" : "not-found",
"details" : {
"coding" : [{
"system" : "http://hl7.org/fhir/tools/CodeSystem/tx-issue-type",
"code" : "not-found"
}],
"text" : "A definition for the value Set 'http://hl7.org/fhir/test/ValueSet/simple-allX' could not be found"
}
}]
}
},
{
"name" : "message",
"valueString" : "A definition for the value Set 'http://hl7.org/fhir/test/ValueSet/simple-allX' could not be found"
},
{
"name" : "result",
"valueBoolean" : false
}]
}

0 comments on commit f6003f0

Please sign in to comment.