Versions Compared

Key

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

...

Info
titleNote:

Fetch Medication Request by innm_dosge, program_id, person_id and max(end_date). In case there is such Medication Request with ended_at>=current_date then next one  can be done in

  • if (ended_at - started_at) => mrr_standart_duration then
    NEW created_at >= ended at - max_mrr_renew_days>=current_day
  • if (ended_at - started_at) < mrr_standart_duration then
    NEW created_at >= ended_at - min_mrr_renew_days>=current_day

...