☰ Scenario POST a DocumentBundle with known patient and encounter
Given TGR set default header "Content-Type" to "application/fhir+json"
When TGR send POST request to "http://fhirserver/DocumentReference" with body "!{file('src/test/resources/features/Stufe5/Dokumentenaustausch/fixtures/DocumentReference-Post-Correct.json')}"
And TGR find the last request
Then TGR current response with attribute "$.responseCode" matches "20\d"
And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKDokumentenMetadaten"
INFO
Code system definition is missing for 'http://dvmd.de/fhir/CodeSystem/kdl#PT130102'
{
"locationCol": 528,
"severity": "INFORMATION",
"locationString": "DocumentReference.type.coding[0]",
"messageId": "Terminology_PassThrough_TX_Message",
"locationLine": 1,
"message": "Code system definition is missing for 'http://dvmd.de/fhir/CodeSystem/kdl#PT130102'"
}
WARN
Value set http://dvmd.de/fhir/ValueSet/kdl has been ignored due to module configuration
{
"locationCol": 528,
"severity": "WARNING",
"locationString": "DocumentReference.type.coding[0]",
"messageId": "Value set http://dvmd.de/fhir/ValueSet/kdl has been ignored due to module configuration",
"locationLine": 1,
"message": "Value set http://dvmd.de/fhir/ValueSet/kdl has been ignored due to module configuration"
}
And FHIR current response body evaluates the FHIRPath "masterIdentifier.where(system = 'urn:ietf:rfc:3986' and value = '${data.documentreference-post-master-identifier-value}').exists()" with error message 'The version-specific OID of the document does not match the expected value'
INFO
masterIdentifier.where(system = 'urn:ietf:rfc:3986' and value = 'urn:oid:1.2.840.113556.1.8000.2554.58783.21864.3474.19410.44358.58254.41281.11111').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "identifier.where(system = 'urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8' and value = '129.6.58.42.11111').exists()" with error message 'The identifier does not match the expected value'
INFO
identifier.where(system = 'urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8' and value = '129.6.58.42.11111').exists()
["BooleanType[true]"]
And TGR current response with attribute "$.body.status.content" matches "current"
And TGR current response with attribute "$.body.docStatus.content" matches "final"
And FHIR current response body evaluates the FHIRPath "content.attachment.title = 'Molekularpathologiebefund vom 12.02.26'" with error message 'The document title does not match the expected value'
INFO
content.attachment.title = 'Molekularpathologiebefund vom 12.02.26'
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "type.coding.where(system = 'http://dvmd.de/fhir/CodeSystem/kdl' and code = 'PT130102' and display = 'Molekularpathologiebefund').exists()" with error message 'The document type (KDL) code does not match the expected value'
INFO
type.coding.where(system = 'http://dvmd.de/fhir/CodeSystem/kdl' and code = 'PT130102' and display = 'Molekularpathologiebefund').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "type.coding.where(system = 'http://ihe-d.de/CodeSystems/IHEXDStypeCode' and code = 'PATH' and display = 'Pathologiebefundberichte').exists()" with error message 'The document type (XDS) code does not match the expected value'
INFO
type.coding.where(system = 'http://ihe-d.de/CodeSystems/IHEXDStypeCode' and code = 'PATH' and display = 'Pathologiebefundberichte').exists()
["BooleanType[true]"]
And element "subject" references resource with ID "${data.documentreference-read-patient-id}" with error message "The patient reference does not match the expected value"
INFO
subject.reference.replaceMatches('/_history/.+','').matches('\\bPatient-Read-Example$')
["BooleanType[true]"]
And element "context.encounter" references resource with ID "${data.documentreference-read-encounter-id}" with error message "The patient reference does not match the expected value"
INFO
context.encounter.reference.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-Finished-Example$')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "author.display.contains('Harold Hippocrates')" with error message 'The document author does not match the expected value'
INFO
author.display.contains('Harold Hippocrates')
["BooleanType[true]"]
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'
INFO
securityLabel.coding.where(code = 'N' and system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality').exists()
["BooleanType[true]"]
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 data.exists().not() and creation = @2026-02-12T12: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'
INFO
content.where(attachment.where(contentType = 'application/pdf' and (language = 'de' or language.startsWith('de-')) and url.exists() and data.exists().not() and creation = @2026-02-12T12: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()
["BooleanType[true]"]
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 does not match the expected value'
INFO
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()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "category.coding.where(code = 'BEF' and system = 'http://ihe-d.de/CodeSystems/IHEXDSclassCode' and display = 'Befundbericht').exists()" with error message 'The document class does not match the expected value'
INFO
category.coding.where(code = 'BEF' and system = 'http://ihe-d.de/CodeSystems/IHEXDSclassCode' and display = 'Befundbericht').exists()
["BooleanType[true]"]