☰ Scenario Update a MedicationRequest resource
Given TGR set default header "Content-Type" to "application/fhir+json"
When TGR send PUT request to "http://fhirserver/MedicationRequest/${data.medicationrequest-update-id}" with body "!{file('src/test/resources/features/Stufe5/Medikation/fixtures/MedicationRequest-Update-Fixture.json')}"
And TGR find the last request
Then TGR current response with attribute "$.responseCode" matches "20\d"
And TGR send empty GET request to "http://fhirserver/MedicationRequest/${data.medicationrequest-update-id}"
And TGR find the last request
And TGR current response with attribute "$.body.note.0.text.content" matches "Updated note"
And FHIR current response body evaluates the FHIRPath "dispenseRequest.quantity.value ~ 10" with error message 'The dispense quantity was not updated or was updated incorrectly'
INFO
dispenseRequest.quantity.value ~ 10
["BooleanType[true]"]
And FHIR current response body evaluates the FHIRPath "substitution.allowed = false" with error message 'Substitution allowed does not match the expected value'
INFO
substitution.allowed = false
["BooleanType[true]"]