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

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 7 Next »

Status

Specification
SPECS
Apiary
ABSENT
JSON Schema request
ABSENT
JSON Schema response
ABSENT

Purpose

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

Process configuration

Parameter
Description
Value
MEDICATION_REQUEST_SCHEDULE(Cron Format) How often to perform termination`* * * * *`

Procedure logic for transition

  1. For info - status charts: Medication_request
  2. Get list Medication request 

    SELECT * FROM medication_requests MR
        WHERE MR.status == ACTIVE
            AND MR.ended_at <= current_date()
  3. Update (Set values) Medication request
    1. status  =  EXPIRED
    2. updated_by = SYSTEM_USER
    3. updated_at = timestamp
  • No labels