Serenity BDD Report
Home > Requirements > Stufe5 > Medikation > Testing search parameters against a resource of type medicationadministration (@medicationadministration-search)
Report generated 01-09-2026 07:00

Feature: Testing search parameters against a resource of type medicationadministration (@medicationadministration-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: - The MedicationAdministration-Read and MedicationAdministration-Read-Extended 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 "MedicationAdministration"

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

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
codetoken
contextreference
effective-timedate
medicationreference
patientreference
performerreference
statustoken

Examples:

searchParamValuesearchParamType
_tagtoken

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?_id=${data.medicationadministration-read-id}" with content type "xml"

And response bundle contains resource with ID "${data.medicationadministration-read-id}" with error message "The requested MedicationAdministration ${data.medicationadministration-read-id} is not contained in the response bundle"

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 "MedicationAdministration" is valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKMedikationsVerabreichung"

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

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0 and entry.resource.count() {= 1' with error message 'The _count parameter was not applied as expected'

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?patient=Patient/${data.medication-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'

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

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?subject.identifier=${data.medication-patient-identifier}" 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 "Patient/${data.medication-patient-id}"

When Get FHIR resource at "http://fhirserver/MedicationAdministration/?_tag=${data.tag-system}%7C${data.tag-value}&patient=Patient/${data.medication-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'

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'

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?code=http://fhir.de/CodeSystem/bfarm/atc%7CV03AB23&patient=Patient/${data.medication-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'

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

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?context=Encounter/${data.medication-encounter-id}&patient=Patient/${data.medication-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'

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

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?context.identifier=${data.medication-encounter-identifier-value}&patient=Patient/${data.medication-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'

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?effective-time=gt2026-01-01&patient=Patient/${data.medication-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'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(effective.toString().empty().not() or effective.start.toString().empty().not() or effective.end.toString().empty().not())" with error message 'There are search results, but they do not fully match the search criteria'

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?medication=Medication/${data.medication-read-id}&patient=Patient/${data.medication-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'

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

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?medication.code=http://fhir.de/CodeSystem/bfarm/atc%7CV03AB23&patient=Patient/${data.medication-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'

And response bundle contains resource with ID "${data.medicationadministration-read-id}" with error message "The requested MedicationAdministration ${data.medicationadministration-read-id} is not contained in the response bundle"

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?performer=Practitioner/${data.medication-practitioner-id}&patient=Patient/${data.medication-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'

And element "performer.actor" in all bundle resources references resource with ID "Practitioner/${data.medication-practitioner-id}"

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?performer.identifier=${data.medication-practitioner-identifier}&patient=Patient/${data.medication-patient-id}" 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 element "performer.actor" in all bundle resources references resource with ID "Practitioner/${data.medication-practitioner-id}"

Then Get FHIR resource at "http://fhirserver/MedicationAdministration/?status=completed&patient=Patient/${data.medication-patient-id}" 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 = 'completed')" 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 17 Total Duration 26s
Total Number of Test Cases 26 Fastest Test 283ms
Number of Manual Test Cases 0 Slowest Test 5s
Tests Started Sep 01, 2026 07:00:52 Average Execution Time 1s
Tests Finished Sep 01, 2026 07:01:18 Cumulative Test Time
(sum of all individual test durations)
26s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Precondition 2 07:00:52 422ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Read and Validation of the CapabilityStatement 2 07:00:52 2s 406ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Validation of the search parameter definitions in the CapabilityStatement
10 passing test cases
1 07:00:55 8s 166ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration by ID 4 07:01:03 1s 139ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration by Count 2 07:01:04 520ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration by Patient Reference 3 07:01:04 750ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration by Patient Identifier 3 07:01:05 720ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Optional Search for the MedicationAdministration that belong to a Patient, by Tag 3 07:01:06 702ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Code 3 07:01:07 719ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Context 3 07:01:07 721ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Context Identifier 2 07:01:08 506ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Effective Time 3 07:01:09 760ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Referenced Medication 3 07:01:09 5s 806ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Medication Code 3 07:01:15 715ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Performer Reference 3 07:01:16 708ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Performer Identifier 3 07:01:17 690ms SUCCESS
Testing search parameters against a resource of type MedicationAdministration (@MedicationAdministration-Search) Search for the MedicationAdministration that belong to a Patient, by Status 3 07:01:17 700ms 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 = 'MedicationAdministration' 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 = 'MedicationAdministration' 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 = 'MedicationAdministration' 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 = 'MedicationAdministration' and searchParam.where(name = 'code' and type = 'token').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 = 'MedicationAdministration' and searchParam.where(name = 'context' 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 = 'MedicationAdministration' and searchParam.where(name = 'effective-time' 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 = 'MedicationAdministration' and searchParam.where(name = 'medication' 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 = 'MedicationAdministration' and searchParam.where(name = 'patient' and type = 'reference').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 = 'MedicationAdministration' and searchParam.where(name = 'performer' and type = 'reference').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 = 'MedicationAdministration' and searchParam.where(name = '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 = 'MedicationAdministration' and searchParam.where(name = '_tag' and type = 'token').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
Search for the MedicationAdministration by ID INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bMedicationAdministration-Read-Example$')).count() = 1  Details
Search for the MedicationAdministration by ID WARN - Profile reference 'https://gematik.de/fhir/isik/StructureDefinition/ISiKMedikationsVerabreichung' has not been checked because it is unknown  Details
Search for the MedicationAdministration 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 MedicationAdministration by ID INFO - Code system definition is missing for 'http://snomed.info/sct#738956005'  Details
Search for the MedicationAdministration by ID INFO - Code system definition is missing for 'http://snomed.info/sct#26643006'  Details
Search for the MedicationAdministration by ID WARN - Value set https://gematik.de/fhir/isik/ValueSet/SctRouteOfAdministration has been ignored due to module configuration  Details
Search for the MedicationAdministration by ID RBellog 0  Download Evidence
Search for the MedicationAdministration by ID Evidence Report  Download Evidence
Search for the MedicationAdministration by Count INFO - entry.resource.count() > 0 and entry.resource.count() <= 1  Details
Search for the MedicationAdministration by Count RBellog 0  Download Evidence
Search for the MedicationAdministration by Count Evidence Report  Download Evidence
Search for the MedicationAdministration by Patient Reference INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration by Patient Reference INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient/Patient-Read-Example$'))  Details
Search for the MedicationAdministration by Patient Reference RBellog 0  Download Evidence
Search for the MedicationAdministration by Patient Reference Evidence Report  Download Evidence
Search for the MedicationAdministration by Patient Identifier INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration by Patient Identifier INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient/Patient-Read-Example$'))  Details
Search for the MedicationAdministration by Patient Identifier RBellog 0  Download Evidence
Search for the MedicationAdministration by Patient Identifier Evidence Report  Download Evidence
Optional Search for the MedicationAdministration that belong to a Patient, by Tag INFO - entry.resource.count() > 0  Details
Optional Search for the MedicationAdministration that belong to a Patient, by Tag INFO - entry.resource.all(meta.tag.where(code='external').exists())  Details
Optional Search for the MedicationAdministration that belong to a Patient, by Tag RBellog 0  Download Evidence
Optional Search for the MedicationAdministration that belong to a Patient, by Tag Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Code INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Code INFO - entry.resource.where(medication.coding.empty().not()).medication.coding.where(code = 'V03AB23' and system = 'http://fhir.de/CodeSystem/bfarm/atc').exists()  Details
Search for the MedicationAdministration that belong to a Patient, by Code RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Code Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Context INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Context INFO - entry.resource.all(context.reference.replaceMatches('/_history/.+','').matches('\\bEncounter/Encounter-Read-In-Progress-Example$'))  Details
Search for the MedicationAdministration that belong to a Patient, by Context RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Context Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Context Identifier INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Context Identifier RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Context Identifier Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Effective Time INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Effective Time INFO - entry.resource.all(effective.toString().empty().not() or effective.start.toString().empty().not() or effective.end.toString().empty().not())  Details
Search for the MedicationAdministration that belong to a Patient, by Effective Time RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Effective Time Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Referenced Medication INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Referenced Medication INFO - entry.resource.all(medication.reference.replaceMatches('/_history/.+','').matches('\\bMedication/Medication-Read-Example$'))  Details
Search for the MedicationAdministration that belong to a Patient, by Referenced Medication RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Referenced Medication Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Medication Code INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Medication Code INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bMedicationAdministration-Read-Example$')).count() = 1  Details
Search for the MedicationAdministration that belong to a Patient, by Medication Code RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Medication Code Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Performer Reference INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Performer Reference INFO - entry.resource.all(performer.actor.reference.replaceMatches('/_history/.+','').matches('\\bPractitioner/Practitioner-Read-Example$'))  Details
Search for the MedicationAdministration that belong to a Patient, by Performer Reference RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Performer Reference Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Performer Identifier INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Performer Identifier INFO - entry.resource.all(performer.actor.reference.replaceMatches('/_history/.+','').matches('\\bPractitioner/Practitioner-Read-Example$'))  Details
Search for the MedicationAdministration that belong to a Patient, by Performer Identifier RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Performer Identifier Evidence Report  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Status INFO - entry.resource.count() > 0  Details
Search for the MedicationAdministration that belong to a Patient, by Status INFO - entry.resource.all(status = 'completed')  Details
Search for the MedicationAdministration that belong to a Patient, by Status RBellog 0  Download Evidence
Search for the MedicationAdministration that belong to a Patient, by Status Evidence Report  Download Evidence
Serenity BDD version 5.3.10