Given the Test Description: "The system under test MUST return the complete resource in response to an HTTP GET request to its URL (READ)."
Given the Preconditions: - The Medication-Read test case must have been executed successfully beforehand.
Create a MedicationStatement resource in your system with the following values:
Then Get FHIR resource at "http://fhirserver/metadata" with content type "json"
And CapabilityStatement contains interaction "read" for resource "MedicationStatement"
Then Get FHIR resource at "http://fhirserver/MedicationStatement/${data.medicationstatement-read-id}" with content type "xml"
And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKMedikationsInformation"
And resource has ID "${data.medicationstatement-read-id}"
And TGR current response with attribute "$..status.value" matches "active"
And FHIR current response body evaluates the FHIRPath "note.text.empty().not()" with error message 'The note does not contain any value'
And FHIR current response body evaluates the FHIRPath "effective.start.toString().contains('2026-02-03')" with error message 'The period does not match the expected value'
And FHIR current response body evaluates the FHIRPath "dateAsserted.toString().contains('2026-02-27')" with error message 'The date asserted does not match the expected value'
And FHIR current response body evaluates the FHIRPath "dosage.all(text.empty().not())" with error message 'The free-text dosage instructions do not match the expected value'
And FHIR current response body evaluates the FHIRPath "dosage.all(patientInstruction.empty().not())" with error message 'Patient instructions do not contain any value'
And FHIR current response body evaluates the FHIRPath "dosage.all(doseAndRate.dose.where(value ~ 1 and unit.empty().not() and system = 'http://unitsofmeasure.org' and code ='1').exists())" with error message 'Dose and rate information does not match the expected value'
And FHIR current response body evaluates the FHIRPath "(dosage.timing.repeat.when contains 'MORN') and (dosage.timing.repeat.when contains 'NOON') and (dosage.timing.repeat.when contains 'EVE')" with error message 'Timing repeat information does not match the expected value'
And element "medication" references resource with ID "Medication/${data.medication-read-id}" with error message "The referenced medication does not match the expected value"
And element "subject" references resource with ID "Patient/${data.medication-patient-id}" with error message "The referenced patient does not match the expected value"
And element "context" references resource with ID "Encounter/${data.medication-encounter-id}" with error message "The referenced encounter does not match the expected value"
And referenced "Encounter" resource with id "${data.medication-encounter-id}" conforms to a valid v5 "ISiKKontaktGesundheitseinrichtung" profile
And referenced "Patient" resource with id "${data.medication-patient-id}" conforms to a valid v5 "ISiKPatient" profile
And referenced "Condition" resource with id "${data.medication-condition-id}" conforms to a valid v5 "ISiKDiagnose" profile
And referenced "Medication" resource with id "${data.medication-read-id}" conforms to a valid v5 "ISiKMedikament" profile
| Number of Scenarios | 3 | Total Duration | 8s |
| Total Number of Test Cases | 3 | Fastest Test | 464ms |
| Number of Manual Test Cases | 0 | Slowest Test | 4s |
| Tests Started | Sep 01, 2026 07:08:08 | Average Execution Time | 2s |
| Tests Finished | Sep 01, 2026 07:08:17 |
Cumulative Test Time
(sum of all individual test durations) |
8s |
| feature | Scenario | Context | Steps | Started | Total Duration | Result |
|---|---|---|---|---|---|---|
| Read Information from a resource of type MedicationStatement (@MedicationStatement-Read) | Precondition | 2 | 07:08:08 | 464ms | ||
| Read Information from a resource of type MedicationStatement (@MedicationStatement-Read) | Read and Validation of the CapabilityStatement | 2 | 07:08:09 | 3s 628ms | ||
| Read Information from a resource of type MedicationStatement (@MedicationStatement-Read) | Read and Validate the MedicationStatement by its ID | 18 | 07:08:13 | 4s 119ms |
| Scenario | Title | Details |
|---|---|---|
| Precondition | RBellog 0 | Download Evidence |
| Read and Validation of the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'MedicationStatement' and interaction.where(code = 'read').exists()).exists() | Details |
| Read and Validation of the CapabilityStatement | RBellog 0 | Download Evidence |
| Read and Validation of the CapabilityStatement | Evidence Report | Download Evidence |
| Read and Validate the MedicationStatement by its ID | INFO - id.replaceMatches('/_history/.+','').matches('\\bMedicationStatement-Read-Example$') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - note.text.empty().not() | Details |
| Read and Validate the MedicationStatement by its ID | INFO - effective.start.toString().contains('2026-02-03') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - dateAsserted.toString().contains('2026-02-27') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - dosage.all(text.empty().not()) | Details |
| Read and Validate the MedicationStatement by its ID | INFO - dosage.all(patientInstruction.empty().not()) | Details |
| Read and Validate the MedicationStatement by its ID | INFO - dosage.all(doseAndRate.dose.where(value ~ 1 and unit.empty().not() and system = 'http://unitsofmeasure.org' and code ='1').exists()) | Details |
| Read and Validate the MedicationStatement by its ID | INFO - (dosage.timing.repeat.when contains 'MORN') and (dosage.timing.repeat.when contains 'NOON') and (dosage.timing.repeat.when contains 'EVE') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - medication.reference.replaceMatches('/_history/.+','').matches('\\bMedication/Medication-Read-Example$') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient/Patient-Read-Example$') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - context.reference.replaceMatches('/_history/.+','').matches('\\bEncounter/Encounter-Read-In-Progress-Example$') | Details |
| Read and Validate the MedicationStatement by its ID | INFO - This element does not match any known slice defined in the profile https://gematik.de/fhir/isik/StructureDefinition/ISiKKontaktGesundheitseinrichtung|5.1.2 | Details |
| Read and Validate the MedicationStatement by its ID | WARN - Rule add-7: 'Wenn die Extension 'Precinct' (Stadtteil) verwendet wird, dann muss diese Information auch als separates line-item abgebildet sein.' Failed | Details |
| Read and Validate the MedicationStatement by its ID | INFO - This element does not match any known slice defined in the profile https://gematik.de/fhir/ti/StructureDefinition/ti-patient|1.1.1 | Details |
| Read and Validate the MedicationStatement by its ID | INFO - Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/icd-10-gm#J06.9' | Details |
| Read and Validate the MedicationStatement by its ID | INFO - Code system definition is missing for 'http://snomed.info/sct#49076000' | Details |
| Read and Validate the MedicationStatement by its ID | INFO - Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/atc#V03AB23' | Details |
| Read and Validate the MedicationStatement by its ID | RBellog 0 | Download Evidence |
| Read and Validate the MedicationStatement by its ID | Evidence Report | Download Evidence |