Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents
Purpose

This procedure is designed to expire previously created Request for Medication request after ended time-life in NEW status.


Procedure logic for transition

  1. For info - status charts: Request_for_medication_request
  2. Get list Request for Medication

...

  1. request 

    Code Block
    languagesql
    SELECT * FROM requests_for_medication_request RMR
    	WHERE RMR.status == NEW 
    		AND RMR.expiry_to <= current_date()


  2. Update (Set values) Request for Medication request
    1. status  =

...

    1.  EXPIRED
    2. updated_by = user_id
    3. updated_at = timestamp