☰ Scenario Read and Validate active Condition by its ID
When Get FHIR resource at "http://fhirserver/Condition/${data.condition-read-active-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/ISiKDiagnose"
INFO
Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/icd-10-gm#J06.9'
{
"locationCol": 839,
"severity": "INFORMATION",
"locationString": "Condition.code.coding[0]",
"messageId": "Terminology_PassThrough_TX_Message",
"locationLine": 2,
"message": "Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/icd-10-gm#J06.9'"
}
INFO
Code system definition is missing for 'http://snomed.info/sct#49076000'
{
"locationCol": 1034,
"severity": "INFORMATION",
"locationString": "Condition.bodySite[0].coding[0]",
"messageId": "Terminology_PassThrough_TX_Message",
"locationLine": 2,
"message": "Code system definition is missing for 'http://snomed.info/sct#49076000'"
}
And resource has ID "${data.condition-read-active-id}" with error message "The ID does not match the expected value"
INFO
id.replaceMatches('/_history/.+','').matches('\\bCondition-Read-Active-Example$')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "code.coding.where(system = 'http://fhir.de/CodeSystem/bfarm/icd-10-gm' and code = 'J06.9' and version = '${data.icd-10-gm-version}').exists()" with error message "The Condition code is missing or a required value is absent"
INFO
code.coding.where(system = 'http://fhir.de/CodeSystem/bfarm/icd-10-gm' and code = 'J06.9' and version = '2026.0.0').exists()
["BooleanType[true]"]
And element "subject" references resource with ID "${data.patient-read-id}" with error message "The referenced case does not match the expected value."
INFO
subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient-Read-Example$')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "clinicalStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/condition-clinical' and code = 'active').exists()" with error message "The Clinical status does not have the value 'active'"
INFO
clinicalStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/condition-clinical' and code = 'active').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath 'recordedDate.toString().contains("2021-02-12")' with error message 'The documentation date does not contain the expected value'
INFO
recordedDate.toString().contains("2021-02-12")
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath 'note.text = "Test note"' with error message 'The note does not match the expected value'
INFO
note.text = "Test note"
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "bodySite.coding.where(system = 'http://snomed.info/sct' and version = 'http://snomed.info/sct/11000274103/version/${data.snomed-ct-version}' and code = '49076000').exists()" with error message 'The body site code does not match the expected value'
INFO
bodySite.coding.where(system = 'http://snomed.info/sct' and version = 'http://snomed.info/sct/11000274103/version/20251115' and code = '49076000').exists()
["BooleanType[true]"]
And TGR the custom failure message is set to "The related condition does not match the expected url"
And TGR current response with attribute "$.body.Condition.extension.url" matches "http://hl7.org/fhir/StructureDefinition/condition-related"
And TGR the custom failure message is set to "The related condition does not match the expected reference value"
And TGR current response with attribute "$.body.Condition.extension.valueReference.reference.value" matches "Condition/${data.condition-read-resolved-id}"
And TGR the custom failure message is set to "The onsetAge system field does not match the expected value."
And TGR current response with attribute "$.body.Condition.onsetAge.system.value" matches "http://unitsofmeasure.org"
And TGR the custom failure message is set to "The onsetAge unit field does not match the expected value."
And TGR current response with attribute "$.body.Condition.onsetAge.unit.value" matches "years"
And TGR the custom failure message is set to "The onsetAge value field was not found."
And TGR current response contains node "$.body.Condition.onsetAge.value.value"