Serenity BDD Report
Home > Requirements > Stufe5 > Basis > Testing search parameters against a resource of type encounter-read-in-progress (@encounter-search)
Report generated 23-03-2026 09:38

Feature: Testing search parameters against a resource of type encounter-read-in-progress (@encounter-search)

Feature Coverage By Scenario

Overview

Scenario: Precondition
Scenario: Read and Validation of the CapabilityStatement
Scenario Outline: Validation of the search parameter definitions in the CapabilityStatement (14 examples)
Scenario: Search for the encounter by ID
Scenario: Search for the Encounter by Tag
Scenario: Search for the Encounter by Count
Scenario: Search for the Encounter by Status
Scenario: Search for the Encounter by Class
Scenario: Search for the Encounter by Type
Scenario: Search for the Encounter by Patient ID
Scenario: Search for the Encounter by Account ID
Scenario: Search for the Encounter by Account Identifier
Scenario: Search for the Encounter by Admission Date with 'le' Modifier
Scenario: Search for the Encounter by Admission Date with 'gt' Modifier
Scenario: Negative Search for the Encounter by Admission Date
Scenario: Search for the Encounter by Admission Date with 'ge' und 'le' Modifiers
Scenario: Search for the Encounter by Admission Date with the Search parameter 'end-date'
Scenario: Search for the Encounter by Admission Date with the Search parameter 'date-start'
Scenario: Negative Search for the Encounter by Admission Date with the Search parameter 'date-start' and 'ge' Modifier
Scenario: Negative Search for the Encounter by Admission Date with the Search parameter 'end-date' and 'le' Modifier
Scenario: Search for the Encounter by Admission Date with both Search parameters 'date-start' and 'end-date'
Scenario: Search for the Encounter by Admission Identifier
Scenario: Search for the Encounter by Patient
Scenario: Search for the Encounter by identifier.system
Scenario: Search for the encounter by Location
Scenario: Search for the encounter by Service Provider

Scenarios

Given the Test Description: "The system under test MUST find a previously created resource when searched using the parameter and return it in the search results (SEARCH)."

Given the Preconditions: - The Encounter-Read-In-Progress and Account-Read test cases must have been executed successfully beforehand.

When Get FHIR resource at "http://fhirserver/metadata" with content type "json"

And CapabilityStatement contains interaction "search-type" for resource "Encounter"

And CapabilityStatement contains definition of search parameter "{searchParamValue}" of type "{searchParamType}" for resource "Encounter"

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
identifiertoken
statustoken
classtoken
typetoken
patientreference
accountreference
locationreference
service-providerreference
datedate
date-startdate
end-datedate

Examples:

searchParamValuesearchParamType
_tagtoken 

When Get FHIR resource at "http://fhirserver/Encounter/?_id=${data.encounter-read-in-progress-id}" with content type "xml"

And FHIR current response body is a valid CORE resource and conforms to profile "https://hl7.org/fhir/StructureDefinition/Bundle"

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."

When Get FHIR resource at "http://fhirserver/Encounter/?_tag=${data.tag-system}%7C${data.tag-value}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(meta.tag.where(code='${data.tag-value}').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?_count" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'total } 0 and entry.resource.count() } 0' with error message 'No search results were found'

When Get FHIR resource at "http://fhirserver/Encounter/?status=in-progress" with content type "json"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(status = 'in-progress')" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?class=http://terminology.hl7.org/CodeSystem/v3-ActCode%7CIMP" with content type "json"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(class.where(code = 'IMP' and system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?type=http://fhir.de/CodeSystem/kontaktart-de%7Cnormalstationaer" with content type "json"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(type.coding.where(code = 'normalstationaer' and system = 'http://fhir.de/CodeSystem/kontaktart-de').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?patient=${data.patient-read-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'

And element "subject" in all bundle resources references resource with ID "${data.patient-read-id}"

When Get FHIR resource at "http://fhirserver/Encounter/?account=${data.account-read-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'

And element "account" in all bundle resources references resource with ID "${data.account-read-id}"

When Get FHIR resource at "http://fhirserver/Encounter/?account:identifier=${data.account-read-identifier-system}%7C${data.account-read-identifier-value}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And element "account" in all bundle resources references resource with ID "${data.account-read-id}"

When Get FHIR resource at "http://fhirserver/Encounter/?date=le2050-01-01" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(period.start {= @2050-01-01T23:59:59+01:00 or period.start.empty())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?date=gt1999-01-01" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(period.end }= @1999-01-01T00:00:00+01:00 or period.end.empty())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?date=2026-01-05" with content type "xml"

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"

When Get FHIR resource at "http://fhirserver/Encounter/?date=ge2026-01-05&date=le2026-01-14" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.select((period.start.exists() and period.start } @2026-01-14T23:59:59+01:00) or (period.end.exists() and period.end { @2026-01-05T00:00:00+01:00)).allFalse()" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?end-date=le2050-01-01" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(period.end {= @2050-01-01T23:59:59+01:00)" with error message 'There are search results, but they do not fully match the search criteria'

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."

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."

When Get FHIR resource at "http://fhirserver/Encounter/?date-start=ge1999-01-01" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(period.start }= @1999-01-01T00:00:00+01:00)" with error message 'There are search results, but they do not fully match the search criteria'

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."

When Get FHIR resource at "http://fhirserver/Encounter/?date-start=ge2026-01-14" with content type "xml"

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."

When Get FHIR resource at "http://fhirserver/Encounter/?end-date=le2026-01-05" with content type "xml"

And bundle does not contain resource "Encounter" with ID "${data.encounter-read-finished-id}" with error message "The requested encounter ${data.encounter-read-finished-id} must not be returned here."

When Get FHIR resource at "http://fhirserver/Encounter/?date-start=ge2026-01-05&end-date=le2026-01-14" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

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'

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."

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."

When Get FHIR resource at "http://fhirserver/Encounter/?identifier=${data.encounter-read-in-progress-identifier-system}%7C${data.encounter-read-in-progress-identifier-value}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(identifier.where(value = '${data.encounter-read-in-progress-identifier-value}' and system = '${data.encounter-read-in-progress-identifier-system}').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?patient=${data.patient-read-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'

And element "subject" in all bundle resources references resource with ID "${data.patient-read-id}"

When Get FHIR resource at "http://fhirserver/Encounter/?identifier=${data.encounter-read-in-progress-identifier-system}%7C" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(identifier.where(system = '${data.encounter-read-in-progress-identifier-system}').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Encounter/?location=Location/${data.encounter-read-in-progress-location}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath 'entry.resource.all(location.location.reference.replaceMatches("/_history/.+","").matches("\b${data.encounter-read-in-progress-location}$"))' with error message 'There are search results, but they do not fully match the search criteria'

And FHIR current response body is a valid CORE resource and conforms to profile "https://hl7.org/fhir/StructureDefinition/Bundle"

And Check if current response of resource "Encounter" is valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKKontaktGesundheitseinrichtung"

When Get FHIR resource at "http://fhirserver/Encounter/?service-provider=${data.encounter-read-in-progress-service-provider}" with content type "json"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath 'entry.resource.all(serviceProvider.reference.replaceMatches("/_history/.+","").matches("\b${data.encounter-read-in-progress-service-provider}$"))' with error message 'There are search results, but they do not fully match the search criteria'

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 25 Total Duration 27s
Total Number of Test Cases 37 Fastest Test 210ms
Number of Manual Test Cases 0 Slowest Test 1s
Tests Started März 23, 2026 09:38:36 Average Execution Time 746ms
Tests Finished März 23, 2026 09:39:04 Total Execution Time 27s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Precondition 2 09:38:36 425ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Read and Validation of the CapabilityStatement 2 09:38:37 919ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Validation of the search parameter definitions in the CapabilityStatement
13 passing test cases
1 09:38:37 3s 042ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the encounter by ID 3 09:38:41 916ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Tag 3 UNDEFINED
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Count 2 09:38:41 714ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Status 3 09:38:42 965ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Class 3 09:38:43 1s 194ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Type 3 09:38:44 925ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Patient ID 3 09:38:45 946ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Account ID 3 09:38:46 990ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Account Identifier 3 09:38:47 1s 197ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Date with 'le' Modifier 3 09:38:48 938ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Date with 'gt' Modifier 3 09:38:49 994ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Negative Search for the Encounter by Admission Date 2 09:38:50 808ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Date with 'ge' und 'le' Modifiers 3 09:38:51 1s 119ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Date with the Search parameter 'end-date' 5 09:38:52 1s 433ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Date with the Search parameter 'date-start' 4 09:38:54 1s 199ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Negative Search for the Encounter by Admission Date with the Search parameter 'date-start' and 'ge' Modifier 2 09:38:55 951ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Negative Search for the Encounter by Admission Date with the Search parameter 'end-date' and 'le' Modifier 2 09:38:56 782ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Date with both Search parameters 'date-start' and 'end-date' 5 09:38:57 1s 380ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Admission Identifier 3 09:38:58 1s 014ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by Patient 3 09:38:59 1s 192ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the Encounter by identifier.system 3 09:39:00 930ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the encounter by Location 5 09:39:01 1s 465ms SUCCESS
Testing search parameters against a resource of type encounter-read-in-progress (@Encounter-Search) Search for the encounter by Service Provider 3 09:39:03 1s 269ms SUCCESS

Manual Tests

No manual tests were recorded
Serenity BDD version 4.3.2