Skip to content

Commit

Permalink
Merge pull request #21 from openmrs/fix/updateOrderEncounter
Browse files Browse the repository at this point in the history
(fix) Update order and encounter to pick correct Id
  • Loading branch information
slubwama authored May 28, 2024
2 parents 6c762e4 + cca0b2d commit 79db42f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public DispenseRequest covertToDispenseRequest(Map dispenseItem) {

if (patient != null && order != null && encounter != null) {
dispenseRequest.setPatientId(patient.getPatientId());
dispenseRequest.setOrderId(Integer.parseInt(dispenseItem.get("order").toString()));
dispenseRequest.setEncounterId(Integer.parseInt(dispenseItem.get("encounter").toString()));
dispenseRequest.setOrderId(order.getOrderId());
dispenseRequest.setEncounterId(encounter.getEncounterId());
} else {
throw new IllegalArgumentException("patient,order,and encounter can not be null");
}
Expand Down

0 comments on commit 79db42f

Please sign in to comment.