☰ Scenario Create a MedicationRequest resource via POST
Given TGR set default header "Content-Type" to "application/fhir+json"
When TGR send POST request to "http://fhirserver/MedicationRequest" with body "!{file('src/test/resources/features/Stufe5/Medikation/fixtures/MedicationRequest-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 MedicationRequest) or ($this is Parameters)' with error message 'The response contains neither a MedicationRequest nor a Parameters resource'
INFO
($this is MedicationRequest) or ($this is Parameters)
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath '($this is MedicationRequest) implies id.exists()' with error message 'No ID was assigned to the MedicationRequest'
INFO
($this is MedicationRequest) implies id.exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is MedicationRequest) implies status.toString().matches('^completed')" with error message 'MedicationRequest status does not have the value "completed"'
INFO
($this is MedicationRequest) implies status.toString().matches('^completed')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is MedicationRequest) implies authoredOn.hasValue()" with error message 'MedicationRequest authoredOn does not contain a valid value'
INFO
($this is MedicationRequest) implies authoredOn.hasValue()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.id.exists()" with error message 'No ID was assigned to the MedicationRequest'
INFO
($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.id.exists()
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.status.toString().matches('^completed')" with error message 'MedicationRequest status does not have the value "completed"'
INFO
($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.status.toString().matches('^completed')
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.authoredOn.hasValue()" with error message 'MedicationRequest authoredOn does not contain a valid value'
INFO
($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.authoredOn.hasValue()
["BooleanType[true]"]