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 test dataset must have been entered in the system under test according to the specifications (manually).
Create the following DocumentReference Resource in your system:
When Get FHIR resource at "http://fhirserver/metadata" with content type "json"
And CapabilityStatement contains interaction "read" for resource "DocumentReference"
When Get FHIR resource at "http://fhirserver/DocumentReference/${data.documentreference-read-id}" with content type "json"
And resource has ID "${data.documentreference-read-id}"
And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKDokumentenMetadaten"
And FHIR current response body evaluates the FHIRPath "masterIdentifier.where(system = '${data.documentreference-read-masteridentifier-system}' and value = '${data.documentreference-read-masteridentifier-value}').exists()" with error message 'The version-specific OID of the document does not match the expected value'
And FHIR current response body evaluates the FHIRPath "identifier.where(system = '${data.documentreference-read-externalidentifier-system}' and value = '${data.documentreference-read-externalidentifier-value}').exists()" with error message 'The identifier does not match the expected value'
And FHIR current response body evaluates the FHIRPath "status = 'current'" with error message 'The document metadata status does not match the expected value'
And FHIR current response body evaluates the FHIRPath "docStatus = 'final'" with error message 'The document processing status does not match the expected value'
And FHIR current response body evaluates the FHIRPath "type.coding.where(system = 'http://dvmd.de/fhir/CodeSystem/kdl' and code = 'VL160105' and display = 'Pflegebericht').exists()" with error message 'The document type (KDL) code does not match the expected value'
And FHIR current response body evaluates the FHIRPath "type.coding.where(system = 'http://ihe-d.de/CodeSystems/IHEXDStypeCode' and code = 'PFLG' and display = 'Pflegedokumentation').exists()" with error message 'The document type (XDS) code does not match the expected value'
And FHIR current response body evaluates the FHIRPath "author.display.contains('Maxine Mustermann')" with error message 'The document author does not match the expected value'
And FHIR current response body evaluates the FHIRPath "relatesTo.where(code = 'replaces' and target.reference.exists()).exists()" with error message 'The relationship to the replaced document does not match the expected value'
And FHIR current response body evaluates the FHIRPath "securityLabel.coding.where(code = 'N' and system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality').exists()" with error message 'The confidentiality does not match the expected value'
And FHIR current response body evaluates the FHIRPath "content.where(attachment.where(contentType = 'application/pdf' and (language = 'de' or language.startsWith('de-')) and url.exists() and creation = @2026-01-31T14:50:50+01:00).exists() and format.where(code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient' and system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode').exists()).exists()" with error message 'The attachment does not match the expected value'
And FHIR current response body evaluates the FHIRPath "content.attachment.url.contains('Binary/${data.documentreference-read-binary-id}')" with error message 'The Binary reference does not match the expected value'
And FHIR current response body evaluates the FHIRPath "context.where(facilityType.coding.where(code = 'KHS' and system = 'http://ihe-d.de/CodeSystems/PatientBezogenenGesundheitsversorgung').exists() and practiceSetting.where(coding.where(code = 'ALLG' and system = 'http://ihe-d.de/CodeSystems/AerztlicheFachrichtungen').exists()).exists()).exists()" with error message 'The context Facility and Specialty does not match the expected value'
And FHIR current response body evaluates the FHIRPath "context.where(event.coding.where(code = 'E100' and system = 'http://ihe-d.de/CodeSystems/FallkontextBeiDokumentenerstellung' and display = 'ambulanter Kontakt').exists()).exists()" with error message 'The context Event does not match the expected value'
And FHIR current response body evaluates the FHIRPath "category.coding.where(code = 'DOK' and system = 'http://ihe-d.de/CodeSystems/IHEXDSclassCode' and display = 'Dokumente ohne besondere Form (Notizen)').exists()" with error message 'The document class does not match the expected value'
And element "subject" references resource with ID "${data.documentreference-read-patient-id}" with error message "The reference to Patient does not match the expected value"
And element "context.encounter" references resource with ID "${data.documentreference-read-encounter-id}" with error message "The reference to Encounter does not match the expected value"
And referenced "Encounter" resource with id "${data.documentreference-read-encounter-id}" conforms to a valid v5 "ISiKKontaktGesundheitseinrichtung" profile
And referenced "Patient" resource with id "${data.documentreference-read-patient-id}" conforms to a valid v5 "ISiKPatient" profile
When Get FHIR resource at "http://fhirserver/Binary/${data.documentreference-read-binary-id}" with content type "json"
And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKBinary"
And resource has ID "${data.documentreference-read-binary-id}" with error message "The Binary ID does not match the expected value"
And FHIR current response body evaluates the FHIRPath "contentType.value = 'application/pdf'" with error message 'The content type does not match the expected value'
And FHIR current response body evaluates the FHIRPath "data.value.empty().not()" with error message 'The data value does not match the expected value'
| Number of Scenarios | 4 | Total Duration | 8s |
| Total Number of Test Cases | 4 | Fastest Test | 421ms |
| Number of Manual Test Cases | 0 | Slowest Test | 5s |
| Tests Started | März 23, 2026 09:37:56 | Average Execution Time | 2s |
| Tests Finished | März 23, 2026 09:38:04 | Total Execution Time | 8s |
| feature | Scenario | Context | Steps | Started | Total Duration | Result |
|---|---|---|---|---|---|---|
| Read information from a resource of type DocumentReference (@DocumentReference-Read) | Precondition | 2 | 09:37:56 | 421ms | ||
| Read information from a resource of type DocumentReference (@DocumentReference-Read) | Read and Validation of the CapabilityStatement | 2 | 09:37:56 | 690ms | ||
| Read information from a resource of type DocumentReference (@DocumentReference-Read) | Read document metadata by ID | 21 | 09:37:57 | 5s 864ms | ||
| Read information from a resource of type DocumentReference (@DocumentReference-Read) | Read the Binary resource referenced in the DocumentReference resource | 5 | 09:38:03 | 1s 430ms |