☰ Scenario Search for the Encounter by Admission Date with both Search parameters 'date-start' and 'end-date' and Patient
When Get FHIR resource at "http://fhirserver/Encounter/?date-start=ge2026-01-05&end-date=le2026-01-14&patient=Patient/${data.account-read-patient-id}" 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 FHIR current response body evaluates the FHIRPath "entry.resource.all(period.start > @2026-01-05T00:00:00+01:00 and period.end < @2026-01-14T23:59:59+01:00).allTrue()" with error message 'There are search results, but they do not fully match the search criteria'
INFO
entry.resource.all(period.start > @2026-01-05T00:00:00+01:00 and period.end < @2026-01-14T23:59:59+01:00).allTrue()
["BooleanType[true]"]
And bundle does not contain resource "Encounter" with ID "${data.encounter-read-in-progress-id}" with error message "The requested encounter ${data.encounter-read-in-progress-id} must not be returned here."
INFO
entry.resource.ofType(Encounter).where(id.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-In-Progress-Example$')).count() = 0
["BooleanType[true]"]
And response bundle contains resource with ID "${data.encounter-read-finished-id}" with error message "The requested encounter ${data.encounter-read-finished-id} is not contained in the response bundle."
INFO
entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-Finished-Example$')).count() = 1
["BooleanType[true]"]