Serenity BDD Report
Home > Requirements > Stufe5 > Medikation > Testing search parameters against a resource of type condition, according to the definition of isikcapabilitystatementklinischerolle (@condition-search)
Report generated 01-09-2026 07:02

Feature: Testing search parameters against a resource of type condition, according to the definition of isikcapabilitystatementklinischerolle (@condition-search)

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: - Some ISiKDiagnose Test Instances have been created in the System Under Test for performing different Search Requests

  • The id of one of the active ISiKDiagnose Test Instances can be configured with the property medication-condition-active-id
  • The id of one of the resolved ISiKDiagnose Test Instances can be configured with the property medication-condition-resolved-id

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

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

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

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
patientreference
encounterreference
recorded-datedate
relatedreference

Examples:

searchParamValuesearchParamType
_hasstring
_tagtoken
clinical-statustoken
subjectreference
categorytoken

When Get FHIR resource at "http://fhirserver/Condition/?_id=${data.medication-condition-active-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.medication-condition-active-id}" with error message "The requested Condition ${data.medication-condition-active-id} is not contained in the response bundle"

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

When Get FHIR resource at "http://fhirserver/Condition/?patient=Patient/${data.medication-patient-id}&_count=${data.search-count}" with content type "xml"

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'

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

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'

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

When Get FHIR resource at "http://fhirserver/Condition/?recorded-date=ge2021-02-12&patient=Patient/${data.medication-patient-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 search results were found'

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

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

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

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0 and entry.resource.count() {= ${data.search-count}' 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/Condition/?subject=Patient/${data.medication-patient-id}&_count=${data.search-count}" with content type "xml"

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'

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

When Get FHIR resource at "http://fhirserver/Condition/?clinical-status=active&_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'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(clinicalStatus.coding.where(code='active').exists())" with error message 'There are search results, but they do not match the expected clinical-status'

When Get FHIR resource at "http://fhirserver/Condition/?category=encounter-diagnosis&_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'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(category.coding.where(code='encounter-diagnosis').exists())" with error message 'There are search results, but they do not match the expected category'

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 11 Total Duration 22s
Total Number of Test Cases 21 Fastest Test 286ms
Number of Manual Test Cases 0 Slowest Test 7s
Tests Started Sep 01, 2026 07:02:29 Average Execution Time 1s
Tests Finished Sep 01, 2026 07:02:52 Cumulative Test Time
(sum of all individual test durations)
22s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Precondition 2 07:02:29 427ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Read and Validation of the CapabilityStatement 2 07:02:30 7s 424ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Validation of the search parameter definitions in the CapabilityStatement
11 passing test cases
1 07:02:37 3s 560ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Search for the Condition by ID 4 07:02:41 947ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Search for Conditions by Patient (Search Parameter 'patient'), group by _count 3 07:02:42 779ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Search for Conditions by Encounter, group by _count 3 07:02:42 696ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Search for Conditions by Recorded Date with 'ge' Modifier and Patient ('patient'), group by _count 4 07:02:43 898ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Optional Search for the Condition by Tag, group by _count 3 07:02:44 691ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Optional Search for Conditions by Patient (Search Parameter 'subject'), group by _count 3 07:02:45 696ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Optional Search for Conditions by Clinical Status 'active', group by _count 3 07:02:45 698ms SUCCESS
Testing search parameters against a resource of type Condition, according to the definition of ISiKCapabilityStatementKlinischeRolle (@Condition-Search) Optional Search for Conditions by Category 'encounter-diagnosis', group by _count 3 07:02:46 5s 715ms SUCCESS

Manual Tests

No manual tests were recorded

Evidence

Scenario Title Details
Precondition RBellog 0  Download Evidence
Read and Validation of the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and interaction.where(code = 'search-type').exists()).exists()  Details
Read and Validation of the CapabilityStatement RBellog 0  Download Evidence
Read and Validation of the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = '_id' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 1  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = '_count' and type = 'number').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 2  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'patient' and type = 'reference').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 3  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'encounter' and type = 'reference').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 4  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'recorded-date' and type = 'date').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 5  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'related' and type = 'reference').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 6  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = '_has' and type = 'string').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 7  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = '_tag' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 8  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'clinical-status' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 9  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'subject' and type = 'reference').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 10  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Condition' and searchParam.where(name = 'category' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 11  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Search for the Condition by ID WARN - Profile reference 'https://gematik.de/fhir/isik/StructureDefinition/ISiKDiagnose' has not been checked because it is unknown  Details
Search for the Condition by ID WARN - Resource meta.profile differs from the passed profile for validation: meta.profile=[]; passed=https://hl7.org/fhir/StructureDefinition/Bundle  Details
Search for the Condition by ID INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bCondition-Read-Active-Example$')).count() = 1  Details
Search for the Condition by ID INFO - Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/icd-10-gm#J06.9'  Details
Search for the Condition by ID INFO - Code system definition is missing for 'http://snomed.info/sct#49076000'  Details
Search for the Condition by ID RBellog 0  Download Evidence
Search for the Condition by ID Evidence Report  Download Evidence
Search for Conditions by Patient (Search Parameter 'patient'), group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Search for Conditions by Patient (Search Parameter 'patient'), group by _count INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient-Read-Example$'))  Details
Search for Conditions by Patient (Search Parameter 'patient'), group by _count RBellog 0  Download Evidence
Search for Conditions by Patient (Search Parameter 'patient'), group by _count Evidence Report  Download Evidence
Search for Conditions by Encounter, group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Search for Conditions by Encounter, group by _count INFO - entry.resource.all(encounter.reference.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-In-Progress-Example$'))  Details
Search for Conditions by Encounter, group by _count RBellog 0  Download Evidence
Search for Conditions by Encounter, group by _count Evidence Report  Download Evidence
Search for Conditions by Recorded Date with 'ge' Modifier and Patient ('patient'), group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Search for Conditions by Recorded Date with 'ge' Modifier and Patient ('patient'), group by _count INFO - entry.resource.all(recordedDate >= @2021-02-12T00:00:00+01:00)  Details
Search for Conditions by Recorded Date with 'ge' Modifier and Patient ('patient'), group by _count INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient-Read-Example$'))  Details
Search for Conditions by Recorded Date with 'ge' Modifier and Patient ('patient'), group by _count RBellog 0  Download Evidence
Search for Conditions by Recorded Date with 'ge' Modifier and Patient ('patient'), group by _count Evidence Report  Download Evidence
Optional Search for the Condition by Tag, group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Optional Search for the Condition by Tag, group by _count INFO - entry.resource.all(meta.tag.where(code='external').exists())  Details
Optional Search for the Condition by Tag, group by _count RBellog 0  Download Evidence
Optional Search for the Condition by Tag, group by _count Evidence Report  Download Evidence
Optional Search for Conditions by Patient (Search Parameter 'subject'), group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Optional Search for Conditions by Patient (Search Parameter 'subject'), group by _count INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient-Read-Example$'))  Details
Optional Search for Conditions by Patient (Search Parameter 'subject'), group by _count RBellog 0  Download Evidence
Optional Search for Conditions by Patient (Search Parameter 'subject'), group by _count Evidence Report  Download Evidence
Optional Search for Conditions by Clinical Status 'active', group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Optional Search for Conditions by Clinical Status 'active', group by _count INFO - entry.resource.all(clinicalStatus.coding.where(code='active').exists())  Details
Optional Search for Conditions by Clinical Status 'active', group by _count RBellog 0  Download Evidence
Optional Search for Conditions by Clinical Status 'active', group by _count Evidence Report  Download Evidence
Optional Search for Conditions by Category 'encounter-diagnosis', group by _count INFO - entry.resource.count() > 0 and entry.resource.count() <= 20  Details
Optional Search for Conditions by Category 'encounter-diagnosis', group by _count INFO - entry.resource.all(category.coding.where(code='encounter-diagnosis').exists())  Details
Optional Search for Conditions by Category 'encounter-diagnosis', group by _count RBellog 0  Download Evidence
Optional Search for Conditions by Category 'encounter-diagnosis', group by _count Evidence Report  Download Evidence
Serenity BDD version 5.3.10