...
ADULT_AGE
DECLARATION_TERM
no_self_auth_ag
Request structure
Example:
...
Expand |
---|
|
Code Block |
---|
{
"$schema": "http://json-schema.org/declaration_request_newdraft-07/schema#",
"type": "object",
"properties": {
"person_id": {
"type": "string"
},
"employee_id": {
"type": "string"
},
"division_id": {
"type": "string"
},
"authorize_with": {
"type": "string"
},
"parent_declaration_id": {
"type": "string"
}
},
"required": [
"person_id",
"employee_id",
"division_id"
]
} |
|
...
validate person_id UUID
search person by person_id in MPI
validate person.auth_method != NA
validate person.status = ‘active’ and is_active =true
Validate person verification status
validate patient's verification_status is not equal to NOT_VERIFIED.
Validate authorize_with
The person can pass the id of his auth_method which he wants to confirm the create declaration request. The necessary auth method can be found by making Get person's auth methods
...
Expand |
---|
title | Response example (Code 201) |
---|
|
Code Block |
---|
{
"meta": {
"code": 201,
"url": "https://example.com/resource",
"type": "object",
"request_id": "req-adasdoijasdojsda6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
},
"data": {
"id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
"start_date": "2017-03-02",
"end_date": "2017-03-02",
"person_id": "4d0d790c-cbf1-44f5-ab21-ba8db67da161",
"employee_id": "1a8b10ea-ba09-40f2-8f9e-55608e9208c6",
"division_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"declaration_number": "0000-12H4-245D",
"declaration_id": "8311ab82-e341-4da0-8a95-235ec9885e23",
"parent_declaration_id": "8c7753fc-a647-435f-8e43-4ff4546431f6",
"status": "NEW",
"channel": "MIS",
"authorize_with": "cc949559-5dfe-420f-ac05-065e443b2cc6"
},
"urgent": {
"authentication_method_current": {
"type": "OTP",
"number": "+38093*****74"
},
"documents": [
{
"type": "PASSPORT",
"url": "https://storage.ehealth.world"
}
]
}
} |
|
Expand |
---|
title | Response example (Code 422) |
---|
|
Code Block |
---|
{
"meta": {
"code": "422",
"url": "https://example.com/resource",
"type": "object",
"request_id": "req-adasdoijasdojsda6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
},
"error": {
"type": "unverified",
"message": "Person not found"
}
} |
|
...