☰ Scenario Read and Validate ValueSet by its ID
When Get FHIR resource at "http://fhirserver/ValueSet/${data.valueset-read-id}" with content type "xml"
And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKValueSet"
And resource has ID "${data.valueset-read-id}" with error message "The ID does not match the expected value"
INFO
id.replaceMatches('/_history/.+','').matches('\\bValueSet-Read-Example$')
["BooleanType[true]"]
Then TGR current response with attribute "$.responseCode" matches "200"
And TGR current response with attribute "$.header.[~'content-type']" matches "application/fhir\+xml;\s*charset=(?i)UTF-8"
And TGR current response with attribute "$..status.value" matches "active"
And TGR current response with attribute "$..url.value" matches "http://example.org/fhir/ValueSet/TestValueSet"
And TGR current response with attribute "$..name.value" matches "TestValueSet"
And TGR current response with attribute "$..ValueSet.version.value" matches "1.0.0"
And FHIR current response body evaluates the FHIRPath "useContext.value.coding.where(code = 'Encounter').exists()" with error message 'The ValueSet does not specify the required context'
INFO
useContext.value.coding.where(code = 'Encounter').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "expansion.exists()" with error message 'The ValueSet does not contain an expansion'
INFO
expansion.exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "expansion.contains.where(code = 'sun' and display = 'Sunday' and system = 'http://hl7.org/fhir/days-of-week').exists()" with error message 'The ValueSet does not contain the required codes'
INFO
expansion.contains.where(code = 'sun' and display = 'Sunday' and system = 'http://hl7.org/fhir/days-of-week').exists()
["BooleanType[true]"]