diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateWardDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateWardDAO.java index f161726..599ffa3 100644 --- a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateWardDAO.java +++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateWardDAO.java @@ -59,7 +59,7 @@ public List getAdmittedPatients(Location location, Provider pro "JOIN org.openmrs.module.bedmanagement.entity.BedLocationMapping locmap on locmap.bed = assignment.bed " + "JOIN org.openmrs.Location l on locmap.location = l " + "LEFT JOIN careTeam.participants ctp ON ctp.voided = 0 " + - "LEFT JOIN org.openmrs.Order o on o.encounter = e " + + "LEFT JOIN org.openmrs.Order o on o.encounter = e and o.dateStopped is null and o.action!='DISCONTINUE' and o.careSetting.careSettingId = 2 " + "LEFT JOIN Slot s on s.order = o " + "where assignment.endDatetime is null and v.stopDatetime is null "; diff --git a/api/src/main/resources/liquibase.xml b/api/src/main/resources/liquibase.xml index d9927a4..648ac33 100644 --- a/api/src/main/resources/liquibase.xml +++ b/api/src/main/resources/liquibase.xml @@ -388,7 +388,7 @@ - + SELECT COUNT(*) FROM scheduler_task_config WHERE name = "Mark Slots As Missed"; @@ -400,7 +400,7 @@ start_on_startup, created_by, date_created, uuid) VALUES ('Mark Slots As Missed', 'Mark Slots As Missed', 'org.openmrs.module.ipd.api.scheduler.tasks.MarkSlotsAsMissed', - TIMESTAMP(CURDATE()), 'MM/dd/yyyy HH:mm:ss', 86340, false, 1, NOW(), UUID()); + TIMESTAMP(CURDATE(), "23:59"), 'MM/dd/yyyy HH:mm:ss', 86400, false, 1, NOW(), UUID());