Skip to content

Commit

Permalink
Merge pull request #445 from patryllus/feat/drug_order_remove_date_st…
Browse files Browse the repository at this point in the history
…opped_null_requirement_scheduled_task

Pushing removal of date_stopped for drug_orgers changes to dwapi/DML and scheduled tasks
  • Loading branch information
njorocs authored May 28, 2024
2 parents bd0ddac + 412267f commit f625b09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion omod/src/main/resources/sql/Scheduled_Updates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7967,7 +7967,7 @@ from orders o
left outer join concept_set cs on o.concept_id = cs.concept_id and do.dose_units = cs.concept_id and do.quantity_units = cs.concept_id and do.route = cs.concept_id
where o.voided = 0
and o.order_type_id = 2
and ((o.order_action = 'NEW' and o.date_stopped is not null) or (o.order_reason_non_coded = 'previously existing orders'))
and (o.order_action = 'NEW' or (o.order_reason_non_coded = 'previously existing orders'))
and e.voided = 0
and e.date_created >= last_update_time
or e.date_changed >= last_update_time
Expand Down
2 changes: 1 addition & 1 deletion omod/src/main/resources/sql/dwapi/DML.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6936,7 +6936,7 @@ BEGIN
cn3.concept_name_type = 'FULLY_SPECIFIED'
left outer join concept_set cs on o.concept_id = cs.concept_id and do.dose_units = cs.concept_id and do.quantity_units = cs.concept_id and do.route = cs.concept_id
where o.voided = 0 and o.order_type_id = 2
and ((o.order_action = 'NEW' and o.date_stopped is not null) or (o.order_reason_non_coded = 'previously existing orders'))
and (o.order_action = 'NEW' or (o.order_reason_non_coded = 'previously existing orders'))
group by o.order_group_id,o.patient_id, o.encounter_id;

SELECT 'Completed processing drug orders';
Expand Down

0 comments on commit f625b09

Please sign in to comment.