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 requestrequest online

200

DR status = APPROVED 



AD-2Approve offline DR in status NEW

DR_id

channel=MIS

approve declaration requestrequest online

403

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" 

AD-4approve DR for another person

DR_id

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

approve declaration requestrequest online409 - "Declaration request could not be approved for another person"

AD-5approve DR with wrong DR idnot correct DR_idapprove declaration requestrequest online404 Declaration request Id was not found

AD-6approve DR w/o scopesuser w/o scopesapprove declaration requestrequest online403 in case invalid scope(s)

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

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

403

Declaration request should be approved by Doctor



AD-9approve DR with users.is_active=falseusers.is_active=falseapprove declaration requestrequest online422 User is blocked

AD-10approve DR with users.tax_id<>person.tax_id users.tax_id<>person.tax_id approve declaration request online403 forbidden

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"