Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


n/nDescriptionInputsstep by step scriptexpected resultactual resultactual result FE
AD-1Approve DR in status NEW

DR_id

approve declaration
request
request online

200

DR status = APPROVED 

200
AD-2Approve offline DR in status NEW

DR_id

channel=MIS

approve declaration request online

403

Declaration request should be approved by Doctor

403

"message": "Declaration request should be approved by Doctor"


AD-3approve DR not in a NEW status

DR_id

status=APPROVED

approve declaration request online409  "Wrong declaration request status" 

409

"message": "Invalid transition"


AD-4approve DR for another person

DR_id

DR.data.person <> $.users.person_id

approve declaration
request409 - "Declaration request could not be approved for another person"
request online403 - forbidden403 - forbidden
AD-5approve DR with wrong DR idnot correct DR_idapprove declaration
request
request online404 Declaration request Id was not found404 not_found
AD-6approve DR w/o scopesuser w/o scopesapprove declaration
request
request online403 in case invalid scope(s)

403

"message": "Your scope does not allow to access this resource. Missing allowances: declaration_request:write"


AD-7approve DR for doctor with declaration_count >= declaration_limitDR.data.employee with declaration_count >= declaration_limitapprove declaration
request
request online422 - This doctor reaches his limit and could not sign more declarations 



AD-8approve DR with auth.method=offlineauth.method=offlineapprove declaration request online

403

Declaration request should be approved by Doctor

403

"message": "Declaration request should be approved by Doctor"


AD-9approve DR
with users
with users.is_
active
blocked=
false
trueusers.is_
active
blocked=
false
trueapprove declaration
request
request online
422
401 User is blocked

401

"message": "Invalid access token"


AD-10approve DR with users.tax_id<>person.tax_id users.tax_id<>person.tax_id approve declaration request online422
403 forbidden
422 "message": "Invalid person"
AD-11approve online DR by Doctorlogin as Doctor /api/declaration_requests/{{id}}/actions/approve 403 Declaration request should be approved by Patient

403

"message": "Declaration request should be approved by Patient"


Ad-12approve DR with expired tokentoken is expiredapprove declaration request online401