☰ Scenario Search for Observation resources by Code and Encounter
When Get FHIR resource at "http://fhirserver/Observation/?code=http://loinc.org%7C11779-6&encounter=Encounter/${data.encounter-read-in-progress-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(code.coding.where(code = '11779-6' and system = 'http://loinc.org').exists())" with error message 'There are search results, but they do not fully match the code search criteria'
INFO
entry.resource.all(code.coding.where(code = '11779-6' and system = 'http://loinc.org').exists())
["BooleanType[true]"]
And response bundle contains resource with ID "${data.medication-observation-expected-pregnancy-delivery-date-read-id}" with error message "The requested Observation ${data.medication-observation-expected-pregnancy-delivery-date-read-id} is not contained in the response bundle"
INFO
entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bExpected-Pregnancy-Delivery-Date-Read-Example$')).count() = 1
["BooleanType[true]"]