...
Extract legal_entity_id (client_id) from token
Extract employee_id from request
Check if $.client_id=employees.legal_entity_id
in case error return 422
Check patient_signed flag
If "patient_signed" is not present in request, return 422 ("required property patient_signed was not present")
If "patient_signed"=false in request, return 422 ("Patient must sign declaration form")
Validate human readable declaration number
...