ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Status

  • Specification DONE
  • Apiary SPECS

Purpose

This procedure (Automatic schedule task) is designed to expire previously created Medication request Request after lifetime ends in status='NEW'.

Procedure logic for transition

  1. For info - status charts: Medication request Request Status Chart
  2. Get list of Medication requests

    SELECT * FROM medication_request_requests RMR
    	WHERE RMR.status == NEW 
    		AND RMR.expired_at <= current_date()
  3. Update (Set values) Medication request Request
    1. status  =  EXPIRED
    2. updated_by = user_id
    3. updated_at = timestamp
  • No labels