Versions Compared

Key

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

...

Validate digital sign as described on sign patient request process

Check signed content

Check decoded signed content with previously created on IL.db.

Code Block
SELECT data
FROM merge_requests
WHERE id = {:id}

In case if they are not equal - generate 422 error (message: "Signed content does not match the previously created content")

Validate schema

Validate request using schema (TBD)

...

  1. Validate merge request id exists in DB

    1. In case of error - return 404

  2. Check merge request status is APPROVED

    1. In case of error - return 422 (Incorrect status to sign merge request)

Check signed content

  1. Get previously request data from il.merge_requests.data.

  2. Compare it with request data_ to_be_signed field.

    1. In case they are not equal - return 422 error (Signed content does not match the previously created content)

  3. Check patient_signed = true. It means that person signed printout content.

    1. In case of error - return 422 error (Patient must sign merge request form).

...