Skip to content

Commit

Permalink
Merge pull request #2024 from ojwanganto/fix-on-ipt-data
Browse files Browse the repository at this point in the history
add the missing caresetting when querying drug orders for TPT
  • Loading branch information
makombe authored Oct 22, 2024
2 parents 9b9f10a + ceecc21 commit 669ac94
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1343,8 +1343,9 @@ public ArrayList<SimpleObject> getPatientHistoricalEnrollment(@RequestParam("pat
}
try {
// get medication patient is on
CareSetting outpatient = Context.getOrderService().getCareSettingByName("OUTPATIENT"); // TODO: include all relevant care settings
OrderType drugOrderType = Context.getOrderService().getOrderTypeByUuid(OrderType.DRUG_ORDER_TYPE_UUID);
List<Order> allDrugOrders = Context.getOrderService().getOrders(patient, null, drugOrderType, false);
List<Order> allDrugOrders = Context.getOrderService().getOrders(patient, outpatient, drugOrderType, false);
List<DrugOrder> tptDrugOrders = new ArrayList<DrugOrder>();
for (Order order : allDrugOrders) {
if (order != null && order.getConcept() != null) {
Expand Down

0 comments on commit 669ac94

Please sign in to comment.