Purpose: This page decoding describes dates (periods) in Medication request.
...
Code Block |
---|
[medication_requests] id | uuid | not null ... created_at | date | not null started_at | date| not null ended_at | date| not null dispense_valid_from | date| not null dispense_valid_to | date| not null ... inserted_at | timestamp | not null updated_at | timestamp | not null |
DecodingDescription:
- created_at: Date which medication request created.
- Now always created_at = current_date().
- started_at - ended_at: Period which describe life-time medication request. Is near in meaning with the period of prescribing by the doctor (treatment period).
- Now started_at = created_at.
- dispense_valid_from - dispense_valid_to : Period which describe life-time for medication dispense.
- Now dispense_valid_from = started_at , dispense_valid_to = ended_at
- inserted_at, updated_at : Internal(system) non-management attributes by API
Validating:
- Must be: ended_at >= started_at >= created_at
- Not validate (both separately and the program `DOSTYPNI LIKI`) what `Days(ended_at,started_at) in (30, 90)`. Not validate always (creating medication request, qualifying, dispensing).Medication request creation date, which is determined by the external system. Format DATE '2017-09-07'.
- started_at: Start date of a treatment period, which is determined by the external system. Greater or equal to created_at. Format DATE '2017-09-07'
- ended_at: End date of a treatment period, which is determined by the external system. Greater or equal to started_at. Format DATE '2017-10-07'
Info | ||
---|---|---|
| ||
You can't create Medication Request for innm_dosage in case there is another Medication Request with the same INNM in this period (between started_at and ended_at) |
Config parameters:
- mrr_delay_input = 3
- mrr_standart_duration = 21
- min_mrr_renew_days = 3
- max_mrr_renew_days= 7
Info | ||
---|---|---|
| ||
Fetch Medication Request by innm, program_id, person_id and max(end_date) in status (ACTIVE, COMPLETED). In case there is such Medication Request with ended_at>=current_date then next one can be done in
|
Config parameters:
- dispense_period = 30
- dispense_valid_from: Start date of dispense period, which is determined by the internal system, not-manageable attribute by API. dispense_valid_from = created_at. Format DATE '2017-09-07'
- dispense_valid_to: End date of dispense period, which is determined by the internal system, not-manageable attribute by API. dispensed_valid_to = dispensed_valid_from + dispense_period. Format DATE '2017-10-07'
Info | ||
---|---|---|
| ||
Dispense of Medications under this Medication Request is possible in period between dispense_valid_from and dispense_valid_to |
- inserted_at: Internal(system) not-manageable attributes by API. Format TIMESTAMP '2017-09-07 07:09:55.540635'
- updated_at: Internal(system) not-manageable attributes by API. Format TIMESTAMP '2017-09-07 07:09:55.540635'