Versions Compared

Key

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

...

...

Table of Contents

Status

  • Specification 
    Status
    colourGreen
    titledone
  • Apiary 
    Status
    colourGreen
    titleDone

Purpose

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

Procedure logic for transition

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

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


  3. Update (Set values) Request for Medication request
    1. status  =  EXPIRED
    2. updated_by = user_id
    3. updated_at = timestamp