☰ Scenario Read and Validate the Medication by its ID
Then Get FHIR resource at "http://fhirserver/Medication/${data.medication-read-id}" with content type "xml"
And resource has ID "${data.medication-read-id}"
INFO
id.replaceMatches('/_history/.+','').matches('\\bMedication-Read-Example$')
["BooleanType[true]"]
And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKMedikament"
INFO
Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/atc#V03AB23'
{
"locationCol": 361,
"severity": "INFORMATION",
"locationString": "Medication.code.coding[0]",
"messageId": "Terminology_PassThrough_TX_Message",
"locationLine": 2,
"message": "Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/atc#V03AB23'"
}
And TGR current response with attribute "$..Medication.status.value" matches "active"
And TGR current response with attribute "$..batch.lotNumber.value" matches "123"
And FHIR current response body evaluates the FHIRPath "code.coding.where(code = 'V03AB23' and system = 'http://fhir.de/CodeSystem/bfarm/atc' and display = 'Acetylcystein' and version.hasValue()).exists()" with error message 'The code does not match the expected value'
INFO
code.coding.where(code = 'V03AB23' and system = 'http://fhir.de/CodeSystem/bfarm/atc' and display = 'Acetylcystein' and version.hasValue()).exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "amount.where(numerator.value = 20 and numerator.system = 'http://unitsofmeasure.org' and numerator.unit.exists() and numerator.code = '1' and denominator.value = 1 and denominator.system = 'http://unitsofmeasure.org' and denominator.unit.exists() and denominator.code = '1').exists()" with error message 'The amount does not match the expected value'
INFO
amount.where(numerator.value = 20 and numerator.system = 'http://unitsofmeasure.org' and numerator.unit.exists() and numerator.code = '1' and denominator.value = 1 and denominator.system = 'http://unitsofmeasure.org' and denominator.unit.exists() and denominator.code = '1').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "ingredient.item.exists()" with error message 'No reference to the ingredient exists'
INFO
ingredient.item.exists()
["BooleanType[true]"]
And element "ingredient.item" references resource with ID "${data.medication-read-referenced-ingredient}" with error message "The ingredient reference does not match the expected value."
INFO
ingredient.item.reference.replaceMatches('/_history/.+','').matches('\\bMedication-Read-Referenced-Ingredient-Example$')
["BooleanType[true]"]