☰ Scenario Read and Validate the Account by its ID
When Get FHIR resource at "http://fhirserver/Account/${data.account-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/ISiKAbrechnungsfall"
And resource has ID "${data.account-read-id}" with error message "The ID does not match the expected value"
INFO
id.replaceMatches('/_history/.+','').matches('\\bAccount-Read-Example$')
["BooleanType[true]"]
And TGR current response with attribute "$..status.value" matches "active"
And element "subject" references resource with ID "${data.account-read-patient-id}" with error message "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 "identifier.where(system = '${data.account-read-identifier-system}' and value='${data.account-read-identifier-value}').exists()" with error message 'The Account does not contain the expected identifier value'
INFO
identifier.where(system = 'https://test.krankenhaus.de/fhir/sid/abrechnungsnummer' and value='0123456789').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "identifier.where(system = '${data.account-read-identifier-system}' and value='${data.account-read-identifier-value}' and type.coding.where(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='AN').exists()).exists()" with error message 'The Account exists but does not have a valid type.'
INFO
identifier.where(system = 'https://test.krankenhaus.de/fhir/sid/abrechnungsnummer' and value='0123456789' and type.coding.where(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='AN').exists()).exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "coverage.priority = 1" with error message 'The Account does not include priority 1 for the insurance coverage.'
INFO
coverage.priority = 1
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "coverage.coverage.exists()" with error message 'The Account does not contain a linked coverage insurance relationship.'
INFO
coverage.coverage.exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "coverage.extension.where(url = 'http://fhir.de/StructureDefinition/ExtensionAbrechnungsart').exists()" with error message 'The Account does not contain an extension for the billing type.'
INFO
coverage.extension.where(url = 'http://fhir.de/StructureDefinition/ExtensionAbrechnungsart').exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "coverage.extension.where(url = 'http://fhir.de/StructureDefinition/ExtensionAbrechnungsart' and value.code = 'DRG' and value.system = 'http://fhir.de/CodeSystem/dkgev/Abrechnungsart').exists()" with error message 'The Account does not contain the correct billing type.'
INFO
coverage.extension.where(url = 'http://fhir.de/StructureDefinition/ExtensionAbrechnungsart' and value.code = 'DRG' and value.system = 'http://fhir.de/CodeSystem/dkgev/Abrechnungsart').exists()
["BooleanType[true]"]