☰ Scenario Search for Conditions by Encounter, group by _count
When Get FHIR resource at "http://fhirserver/Condition/?encounter=Encounter/${data.medication-encounter-id}&_count=${data.search-count}" with content type "json"
And FHIR current response body evaluates the FHIRPath 'entry.resource.count() > 0 and entry.resource.count() <= ${data.search-count}' with error message 'No valid search results were found'
INFO
entry.resource.count() > 0 and entry.resource.count() <= 20
["BooleanType[true]"]
And element "encounter" in all bundle resources references resource with ID "${data.medication-encounter-id}"
INFO
entry.resource.all(encounter.reference.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-In-Progress-Example$'))
["BooleanType[true]"]