@ -1325,12 +1325,12 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
}
int fromIndex = 0;
int toIndex = 0;
if (page != pageCount) {
if (page <= pageCount) {
fromIndex = (page) * pageSize;
toIndex = fromIndex + pageSize;
} else {
toIndex = count;
if(fromIndex>count){
fromIndex= count;
if (toIndex > count) {