Table of Contents |
---|
...
Search Medication Request
- Search record by `$.id` in column `medication_request.id`
- If not found - Search record by `$.id` in column `medication_request.request_number`
- If not found - Return 404 in case "Not found record in DB with this ID!"
- If not found - Search record by `$.id` in column `medication_request.request_number`
Validate FK
- Read data from `ops_db.medication_requests` by `id`
- Validate legal_entity_id - legal_entity_id exists
- Return 422 in case validation fails (422 EView)
- Validate employee_id - employee_id exists
- Return 422 in case validation fails (422 EView)
- Validate division_id - division_id exists
- Return 422 in case validation fails (422 EView)
- Validate medical_program_id - medical_program_id exists
- Return 422 in case validation fails (422 EView)
- Validate all medication_id - medication_id exists
- Return 422 in case validation fails (422 EView)
- Validate person_id - mpi_id exists
- Return 422 in case validation fails (422 EView)
...