☰ Scenario Read and Validate finished Encounter by its ID
When Get FHIR resource at "http://fhirserver/Encounter/${data.encounter-read-finished-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/ISiKKontaktGesundheitseinrichtung"
INFO
This element does not match any known slice defined in the profile https://gematik.de/fhir/isik/StructureDefinition/ISiKKontaktGesundheitseinrichtung|5.1.2
{
"locationCol": 2055,
"severity": "INFORMATION",
"locationString": "Encounter.location[0]",
"locationLine": 2,
"message": "This element does not match any known slice defined in the profile https://gematik.de/fhir/isik/StructureDefinition/ISiKKontaktGesundheitseinrichtung|5.1.2"
}
And resource has ID "${data.encounter-read-finished-id}" with error message "The returned Encounter resource has not the expected ID"
INFO
id.replaceMatches('/_history/.+','').matches('\\bEncounter-Read-Finished-Example$')
["BooleanType[true]"]
And TGR current response with attribute "$..status.value" matches "finished"
And FHIR current response body evaluates the FHIRPath "identifier.where(system = '${data.encounter-read-finished-identifier-system}' and value='${data.encounter-read-finished-identifier-value}').exists()" with error message 'The Encounter does not contain the correct admission number'
INFO
identifier.where(system = 'https://test.krankenhaus.de/fhir/sid/fallnr' and value='0123456789').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "class.where(code = 'IMP' and system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists()" with error message 'The Encounter does not contain the correct class code'
INFO
class.where(code = 'IMP' and system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "type.coding.where(code = 'normalstationaer' and system = 'http://fhir.de/CodeSystem/kontaktart-de').exists()" with error message 'The Encounter does not contain the correct type'
INFO
type.coding.where(code = 'normalstationaer' and system = 'http://fhir.de/CodeSystem/kontaktart-de').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "serviceType.coding.where(code = '1500' and system = 'http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel').exists()" with error message 'The Encounter does not contain the correct department code'
INFO
serviceType.coding.where(code = '1500' and system = 'http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel').exists()
["BooleanType[true]"]
And element "subject" references resource with ID "${data.account-read-patient-id}" with error message "The referenced Patient does not match the expected value"
INFO
subject.reference.replaceMatches('/_history/.+','').matches('\\bAccount-Read-Patient-Example$')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "period.start.toString().contains('2026-01-06')" with error message 'The Encounter does not contain a valid start date'
INFO
period.start.toString().contains('2026-01-06')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "period.end.toString().contains('2026-01-08')" with error message 'The Encounter does not contain a valid end date.'
INFO
period.end.toString().contains('2026-01-08')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "hospitalization.admitSource.coding.where(code = 'E' and system = 'http://fhir.de/CodeSystem/dgkev/Aufnahmeanlass').exists()" with error message 'The Encounter does not contain the correct admission reason'
INFO
hospitalization.admitSource.coding.where(code = 'E' and system = 'http://fhir.de/CodeSystem/dgkev/Aufnahmeanlass').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "extension.where(url = 'http://fhir.de/StructureDefinition/Aufnahmegrund' and extension.where(url = 'ErsteUndZweiteStelle' and value.code = '01' and value.system = 'http://fhir.de/CodeSystem/dkgev/AufnahmegrundErsteUndZweiteStelle').exists()).exists()" with error message 'The encounter does not contain the correct admission reason'
INFO
extension.where(url = 'http://fhir.de/StructureDefinition/Aufnahmegrund' and extension.where(url = 'ErsteUndZweiteStelle' and value.code = '01' and value.system = 'http://fhir.de/CodeSystem/dkgev/AufnahmegrundErsteUndZweiteStelle').exists()).exists()
["BooleanType[true]"]
And element "account" references resource with ID "Account/${data.account-read-id}" with error message "The linked billing case does not match the expected value"
INFO
account.reference.replaceMatches('/_history/.+','').matches('\\bAccount/Account-Read-Example$')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "account.identifier.value = '${data.account-read-identifier-value}'" with error message 'The identifier of the linked billing case does not match the expected value'
INFO
account.identifier.value = '0123456789'
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "location.location.identifier.where(system = 'https://test.krankenhaus.de/fhir/sid/zimmerId' and value = 'Z001').exists()" with error message 'The location does not contain the correct code'
INFO
location.location.identifier.where(system = 'https://test.krankenhaus.de/fhir/sid/zimmerId' and value = 'Z001').exists()
["BooleanType[true]"]