☰ Scenario Optional Search for the Encounter by Has and ID
When Get FHIR resource at "http://fhirserver/Encounter/?_id=${data.encounter-read-in-progress-id}&_has:Condition:encounter:code=${data.condition-read-active-code}" with content type "xml"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() > 0' with error message 'No search results were found'
INFO
entry.resource.count() > 0
["BooleanType[true]"]
And response bundle contains resource with ID "${data.encounter-read-in-progress-id}" with error message "The requested Encounter ${data.encounter-read-in-progress-id} is not contained in the response bundle."
INFO
entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-In-Progress-Example$')).count() = 1
["BooleanType[true]"]