From 3a0773f6b232fa174019203af6784d359ee10de7 Mon Sep 17 00:00:00 2001 From: Kavitha S Date: Thu, 22 Feb 2024 10:37:13 +0530 Subject: [PATCH] Kavitha | add null check to get slots for list of patients --- .../module/ipd/service/impl/IPDScheduleServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/ipd/service/impl/IPDScheduleServiceImpl.java b/omod/src/main/java/org/openmrs/module/ipd/service/impl/IPDScheduleServiceImpl.java index ecca043..8138fb0 100644 --- a/omod/src/main/java/org/openmrs/module/ipd/service/impl/IPDScheduleServiceImpl.java +++ b/omod/src/main/java/org/openmrs/module/ipd/service/impl/IPDScheduleServiceImpl.java @@ -155,12 +155,12 @@ public List getSlotsForPatientListByTime(List List slots = slotService.getSlotsForPatientListByTime(patientUuidList, localStartDate, localEndDate); List previousSlots = null; - if (includePreviousSlot == true) { + if (includePreviousSlot != null && includePreviousSlot == true) { previousSlots = slotService.getImmediatePreviousSlotsForPatientListByTime(patientUuidList, localStartDate); } List slotsDuration = null; - if (includeSlotDuration == true) { + if (includeSlotDuration !=null && includeSlotDuration == true) { List orders = slots.stream() .map(Slot::getOrder) .filter(order -> order != null)