☰ Scenario Create a RiskAssessment resource via POST
Given TGR set default header "Content-Type" to "application/fhir+json"
When TGR send POST request to "http://fhirserver/RiskAssessment" with body "!{file('src/test/resources/features/Stufe5/Medikation/fixtures/RiskAssessment-Create-Fixture.json')}"
And TGR find the last request
Then TGR current response with attribute "$.responseCode" matches "20\d"
And FHIR current response body evaluates the FHIRPath '($this is RiskAssessment) or ($this is Parameters)' with error message 'The response contains neither a RiskAssessment nor a Parameters resource'
INFO
($this is RiskAssessment) or ($this is Parameters)
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath '($this is RiskAssessment) implies id.exists()' with error message 'No ID was assigned to the RiskAssessment'
INFO
($this is RiskAssessment) implies id.exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is RiskAssessment) implies status.toString().matches('^final')" with error message 'RiskAssessment status does not have the value "final"'
INFO
($this is RiskAssessment) implies status.toString().matches('^final')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is RiskAssessment).resource.id.exists()" with error message 'No ID was assigned to the RiskAssessment'
INFO
($this is Parameters) implies parameter.where(name = 'return' and resource is RiskAssessment).resource.id.exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is RiskAssessment).resource.status.toString().matches('^final')" with error message 'RiskAssessment status does not have the value "final"'
INFO
($this is Parameters) implies parameter.where(name = 'return' and resource is RiskAssessment).resource.status.toString().matches('^final')
["BooleanType[true]"]