Table of Contents |
---|
Specification
The process is initiated by any employee with necessary scopes in this legal entity and involves the transfer of a signed person with electronic digital signature.
...
Decode content that is encrypted in an electronic digital signature.
Use Digital signature WS. Method checks digital signature and returns result.
See service specification
Validate DRFO
- Check that DRFO in Certificate details exists and not empty
- Check that DRFO in Certificate details is equal to DRFO in Party
- Get party.tax_id using employee_id in person payload
- Compare DRFO in Certificate with party.tax_id
- Convert DRFO and TAX_ID to uppercase
- Compare DRFO and TAX_ID as Cyrillic letters
- Convert DRFO to Cyrillic and compare as Cyrillic letters
- In case validation fails - generate 422 error
...
Patient request can be signed by any employee with necessary scopes in equal legal_entity_id.
- Check that ID in URL exists in the system
- Return 401 in case validation fails
- Check that patient request belongs to the same legal entity as the user
- In case of error - return 403
Create/update person
If person.id
is in request then add mpi_id to patient request. Update MPI.persons with new parameters.
If person.id
is not in request then create new person in status ACTIVE
or APPROVED
)
Update patient request
Update patient request:
- Change entity status in IL_DB.patient_request to SIGNED
Set updated_at - now() (Get current date-time)
Set updated_by - user_id (Extract user from token)