diff --git a/api/pom.xml b/api/pom.xml
index 598b0ac..0f33aa2 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -5,7 +5,7 @@
org.bahmni.module
bahmni-ipd
- 1.1.0-SNAPSHOT
+ 1.2.0-SNAPSHOT
bahmni-ipd-api
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/ReferenceDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/ReferenceDAO.java
index 983d639..fc1a7af 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/ReferenceDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/ReferenceDAO.java
@@ -6,10 +6,10 @@
import java.util.Optional;
-@Repository
+
public interface ReferenceDAO {
-
+
Optional getReferenceByTypeAndTargetUUID(String type, String targetUUID) throws DAOException;
-
+
Reference saveReference(Reference reference) throws DAOException;
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/ScheduleDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/ScheduleDAO.java
index 7d85035..e689487 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/ScheduleDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/ScheduleDAO.java
@@ -6,9 +6,9 @@
import org.springframework.stereotype.Repository;
-@Repository
+
public interface ScheduleDAO {
-
+
Schedule getSchedule(Integer scheduleId) throws DAOException;
Schedule saveSchedule(Schedule schedule) throws DAOException;
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/SlotDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/SlotDAO.java
index e28cca8..91dfffd 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/SlotDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/SlotDAO.java
@@ -12,7 +12,7 @@
import java.time.LocalDateTime;
import java.util.List;
-@Repository
+
public interface SlotDAO {
Slot getSlot(Integer slotId) throws DAOException;
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateCareTeamDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateCareTeamDAO.java
index f696dbc..f3b0d36 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateCareTeamDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateCareTeamDAO.java
@@ -11,14 +11,12 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
-@Repository
public class HibernateCareTeamDAO implements CareTeamDAO {
private static final Logger log = LoggerFactory.getLogger(HibernateCareTeamDAO.class);
- private final SessionFactory sessionFactory;
+ private SessionFactory sessionFactory;
- @Autowired
- public HibernateCareTeamDAO(SessionFactory sessionFactory) {
+ public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateReferenceDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateReferenceDAO.java
index 9557690..0cac758 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateReferenceDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateReferenceDAO.java
@@ -12,15 +12,13 @@
import java.util.Optional;
-@Repository
public class HibernateReferenceDAO implements ReferenceDAO {
private static final Logger log = LoggerFactory.getLogger(HibernateReferenceDAO.class);
- private final SessionFactory sessionFactory;
+ private SessionFactory sessionFactory;
- @Autowired
- public HibernateReferenceDAO(SessionFactory sessionFactory) {
+ public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateScheduleDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateScheduleDAO.java
index 5a15768..98fabae 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateScheduleDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateScheduleDAO.java
@@ -11,14 +11,12 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
-@Repository
public class HibernateScheduleDAO implements ScheduleDAO {
-
+
private static final Logger log = LoggerFactory.getLogger(HibernateScheduleDAO.class);
- private final SessionFactory sessionFactory;
+ private SessionFactory sessionFactory;
- @Autowired
- public HibernateScheduleDAO(SessionFactory sessionFactory) {
+ public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
@@ -26,7 +24,7 @@ public HibernateScheduleDAO(SessionFactory sessionFactory) {
public Schedule getSchedule(Integer scheduleId) throws DAOException {
return sessionFactory.getCurrentSession().get(Schedule.class, scheduleId);
}
-
+
@Override
public Schedule saveSchedule(Schedule schedule) throws DAOException {
sessionFactory.getCurrentSession().saveOrUpdate(schedule);
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateSlotDAO.java b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateSlotDAO.java
index 845e49a..7758bcc 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateSlotDAO.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/dao/impl/HibernateSlotDAO.java
@@ -20,18 +20,16 @@
import java.time.temporal.ChronoUnit;
import java.util.List;
-@Repository
public class HibernateSlotDAO implements SlotDAO {
-
+
private static final Logger log = LoggerFactory.getLogger(HibernateSlotDAO.class);
-
- private final SessionFactory sessionFactory;
- @Autowired
- public HibernateSlotDAO(SessionFactory sessionFactory) {
+ private SessionFactory sessionFactory;
+
+ public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
-
+
@Override
public Slot getSlot(Integer slotId) throws DAOException {
return sessionFactory.getCurrentSession().get(Slot.class, slotId);
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 af76bbf..381061d 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
@@ -18,15 +18,13 @@
import java.util.Date;
import java.util.List;
-@Repository
public class HibernateWardDAO implements WardDAO {
private static final Logger log = LoggerFactory.getLogger(HibernateWardDAO.class);
- private final SessionFactory sessionFactory;
+ private SessionFactory sessionFactory;
- @Autowired
- public HibernateWardDAO(SessionFactory sessionFactory) {
+ public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/events/ConfigLoader.java b/api/src/main/java/org/openmrs/module/ipd/api/events/ConfigLoader.java
index fc58629..0f2a42c 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/events/ConfigLoader.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/events/ConfigLoader.java
@@ -20,8 +20,8 @@ public class ConfigLoader {
private ObjectMapper objectMapper = new ObjectMapper();
- @Value("${config-file.path}")
- private String routeConfigurationFileLocation;
+ @Value("${ipd.events_config.file_path:/etc/bahmni_config/openmrs/apps/ipdDashboard/eventsConfig.json}")
+ private String eventsConfigurationFileLocation;
public List getConfigs() {
if (configs.isEmpty()) {
@@ -32,10 +32,10 @@ public List getConfigs() {
private void loadConfiguration() {
try {
- File routeConfigurationFile = new FileSystemResource(routeConfigurationFileLocation).getFile();
+ File routeConfigurationFile = new FileSystemResource(eventsConfigurationFileLocation).getFile();
this.configs = objectMapper.readValue(routeConfigurationFile, new TypeReference>() {});
} catch (IOException exception) {
- log.error("Failed to load configuration for file : " + routeConfigurationFileLocation, exception);
+ log.error("Failed to load configuration for file : " + eventsConfigurationFileLocation, exception);
}
}
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/RollOverNonMedicationTasks.java b/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/RollOverNonMedicationTasks.java
index 4f2615e..931878c 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/RollOverNonMedicationTasks.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/RollOverNonMedicationTasks.java
@@ -1,21 +1,17 @@
package org.openmrs.module.ipd.api.scheduler.tasks;
+import org.openmrs.api.context.Context;
import org.openmrs.module.ipd.api.events.IPDEventManager;
import org.openmrs.module.ipd.api.events.model.IPDEvent;
import org.openmrs.module.ipd.api.events.model.IPDEventType;
import org.openmrs.scheduler.tasks.AbstractTask;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.stereotype.Component;
-@Component
-public class RollOverNonMedicationTasks extends AbstractTask implements ApplicationContextAware {
- private static ApplicationContext context;
+public class RollOverNonMedicationTasks extends AbstractTask {
@Override
public void execute() {
- IPDEventManager eventManager = context.getBean(IPDEventManager.class);
+ IPDEventManager eventManager = Context.getRegisteredComponents(IPDEventManager.class).get(0);
IPDEventType eventType = eventManager.getEventTypeForEncounter(String.valueOf(IPDEventType.ROLLOVER_TASK));
if (eventType != null) {
IPDEvent ipdEvent = new IPDEvent(null, null, eventType);
@@ -23,8 +19,4 @@ public void execute() {
}
}
- @Override
- public void setApplicationContext(ApplicationContext applicationContext) {
- this.context = applicationContext;
- }
-}
+}
\ No newline at end of file
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/ShiftStartTasks.java b/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/ShiftStartTasks.java
index 59ce500..1c2150f 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/ShiftStartTasks.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/scheduler/tasks/ShiftStartTasks.java
@@ -1,20 +1,17 @@
package org.openmrs.module.ipd.api.scheduler.tasks;
+import org.openmrs.api.context.Context;
import org.openmrs.module.ipd.api.events.IPDEventManager;
import org.openmrs.module.ipd.api.events.model.IPDEvent;
import org.openmrs.module.ipd.api.events.model.IPDEventType;
import org.openmrs.scheduler.tasks.AbstractTask;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.stereotype.Component;
-@Component
-public class ShiftStartTasks extends AbstractTask implements ApplicationContextAware {
- private static ApplicationContext context;
+public class ShiftStartTasks extends AbstractTask {
+
@Override
public void execute() {
- IPDEventManager eventManager = context.getBean(IPDEventManager.class);
+ IPDEventManager eventManager = Context.getRegisteredComponents(IPDEventManager.class).get(0);
IPDEventType eventType = eventManager.getEventTypeForEncounter(String.valueOf(IPDEventType.SHIFT_START_TASK));
if (eventType != null) {
IPDEvent ipdEvent = new IPDEvent(null, null, eventType);
@@ -22,8 +19,4 @@ public void execute() {
}
}
- @Override
- public void setApplicationContext(ApplicationContext applicationContext) {
- this.context = applicationContext;
- }
-}
+}
\ No newline at end of file
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/CareTeamService.java b/api/src/main/java/org/openmrs/module/ipd/api/service/CareTeamService.java
index 83b235c..c511ad7 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/CareTeamService.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/CareTeamService.java
@@ -2,13 +2,11 @@
import org.openmrs.Visit;
import org.openmrs.api.APIException;
-import org.openmrs.module.ipd.api.model.CareTeam;
-import org.openmrs.module.ipd.api.model.Schedule;
-import org.springframework.stereotype.Service;
import org.openmrs.api.OpenmrsService;
+import org.openmrs.module.ipd.api.model.CareTeam;
+
-@Service
public interface CareTeamService extends OpenmrsService {
CareTeam saveCareTeam(CareTeam careTeam) throws APIException;
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/ReferenceService.java b/api/src/main/java/org/openmrs/module/ipd/api/service/ReferenceService.java
index a006d08..81a0252 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/ReferenceService.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/ReferenceService.java
@@ -9,7 +9,7 @@
import java.util.Optional;
-@Service
+
public interface ReferenceService extends OpenmrsService {
// @Authorized({ PrivilegeConstants.EDIT_IPD_SCHEDULES })
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/ScheduleService.java b/api/src/main/java/org/openmrs/module/ipd/api/service/ScheduleService.java
index a370215..7e1d0e5 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/ScheduleService.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/ScheduleService.java
@@ -7,9 +7,9 @@
import org.springframework.stereotype.Service;
-@Service
+
public interface ScheduleService extends OpenmrsService {
-
+
// @Authorized({ PrivilegeConstants.EDIT_IPD_SCHEDULES })
Schedule getSchedule(Integer scheduleId) throws APIException;
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/SlotService.java b/api/src/main/java/org/openmrs/module/ipd/api/service/SlotService.java
index 05856ab..277ea36 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/SlotService.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/SlotService.java
@@ -14,7 +14,7 @@
import java.util.List;
import java.util.Map;
-@Service
+
public interface SlotService extends OpenmrsService {
// @Authorized({ PrivilegeConstants.EDIT_IPD_SLOTS })
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/CareTeamServiceImpl.java b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/CareTeamServiceImpl.java
index 84c253e..51e30b0 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/CareTeamServiceImpl.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/CareTeamServiceImpl.java
@@ -14,16 +14,14 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
@Transactional
public class CareTeamServiceImpl extends BaseOpenmrsService implements CareTeamService {
private static final Logger log = LoggerFactory.getLogger(CareTeamServiceImpl.class);
- private final CareTeamDAO careTeamDAO;
+ private CareTeamDAO careTeamDAO;
- @Autowired
- public CareTeamServiceImpl(CareTeamDAO careTeamDAO) {
+ public void setCareTeamDAO(CareTeamDAO careTeamDAO) {
this.careTeamDAO = careTeamDAO;
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ReferenceServiceImpl.java b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ReferenceServiceImpl.java
index 9895276..c78e2f4 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ReferenceServiceImpl.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ReferenceServiceImpl.java
@@ -13,16 +13,14 @@
import java.util.Optional;
-@Service
@Transactional
public class ReferenceServiceImpl extends BaseOpenmrsService implements ReferenceService {
private static final Logger log = LoggerFactory.getLogger(ReferenceServiceImpl.class);
- private final ReferenceDAO referenceDAO;
+ private ReferenceDAO referenceDAO;
- @Autowired
- public ReferenceServiceImpl(ReferenceDAO referenceDAO) {
+ public void setReferenceDAO(ReferenceDAO referenceDAO) {
this.referenceDAO = referenceDAO;
}
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ScheduleServiceImpl.java b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ScheduleServiceImpl.java
index 7521211..2cb774b 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ScheduleServiceImpl.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/ScheduleServiceImpl.java
@@ -15,13 +15,12 @@
@Service
@Transactional
public class ScheduleServiceImpl extends BaseOpenmrsService implements ScheduleService {
-
+
private static final Logger log = LoggerFactory.getLogger(ScheduleServiceImpl.class);
-
- private final ScheduleDAO scheduleDAO;
- @Autowired
- public ScheduleServiceImpl(ScheduleDAO scheduleDAO) {
+ private ScheduleDAO scheduleDAO;
+
+ public void setScheduleDAO(ScheduleDAO scheduleDAO) {
this.scheduleDAO = scheduleDAO;
}
@@ -30,7 +29,7 @@ public ScheduleServiceImpl(ScheduleDAO scheduleDAO) {
public Schedule getSchedule(Integer scheduleId) throws APIException {
return scheduleDAO.getSchedule(scheduleId);
}
-
+
@Override
public Schedule saveSchedule(Schedule schedule) throws APIException {
return scheduleDAO.saveSchedule(schedule);
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/SlotServiceImpl.java b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/SlotServiceImpl.java
index 2f94af5..edb46f0 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/SlotServiceImpl.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/SlotServiceImpl.java
@@ -25,23 +25,21 @@
import java.util.List;
import java.util.Map;
-@Service
@Transactional
public class SlotServiceImpl extends BaseOpenmrsService implements SlotService {
-
+
private static final Logger log = LoggerFactory.getLogger(SlotServiceImpl.class);
-
- private final SlotDAO slotDAO;
- private ConceptService conceptService;
- @Autowired
- public SlotServiceImpl(SlotDAO slotDAO, ConceptService conceptService) {
+ private SlotDAO slotDAO;
+ private ConceptService conceptService;
+ public void setSlotDAO(SlotDAO slotDAO) {
this.slotDAO = slotDAO;
+ }
+ public void setConceptService(ConceptService conceptService) {
this.conceptService = conceptService;
}
-
@Override
@Transactional(readOnly = true)
public Slot getSlot(Integer slotId) throws APIException {
diff --git a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/WardServiceImpl.java b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/WardServiceImpl.java
index 72dc5dd..379373e 100644
--- a/api/src/main/java/org/openmrs/module/ipd/api/service/impl/WardServiceImpl.java
+++ b/api/src/main/java/org/openmrs/module/ipd/api/service/impl/WardServiceImpl.java
@@ -15,18 +15,15 @@
import java.util.Date;
import java.util.List;
-@Service
@Transactional
public class WardServiceImpl implements WardService {
- private final WardDAO wardDAO;
+ private WardDAO wardDAO;
- @Autowired
- public WardServiceImpl(WardDAO wardDAO) {
+ public void setWardDAO(WardDAO wardDAO) {
this.wardDAO = wardDAO;
}
-
@Override
public WardPatientsSummary getIPDWardPatientSummary(String wardUuid, String providerUuid) {
Location location= Context.getService(LocationService.class).getLocationByUuid(wardUuid);
diff --git a/api/src/main/resources/application.properties b/api/src/main/resources/application.properties
index ed16b69..0a96e1e 100644
--- a/api/src/main/resources/application.properties
+++ b/api/src/main/resources/application.properties
@@ -1,3 +1,3 @@
# Route definitions
-config-file.path=/etc/bahmni_config/openmrs/apps/ipdDashboard/eventsConfig.json
\ No newline at end of file
+ipd.events_config.file_path=/etc/bahmni_config/openmrs/apps/ipdDashboard/eventsConfig.json
diff --git a/api/src/main/resources/moduleApplicationContext.xml b/api/src/main/resources/moduleApplicationContext.xml
index c9dd5ed..cdc2439 100644
--- a/api/src/main/resources/moduleApplicationContext.xml
+++ b/api/src/main/resources/moduleApplicationContext.xml
@@ -8,30 +8,117 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+ org.openmrs.module.ipd.api.service.SlotService
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.openmrs.module.ipd.api.service.WardService
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.openmrs.module.ipd.api.service.ScheduleService
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.openmrs.module.ipd.api.service.ReferenceService
+
+
+
+
+
+
+
+
+
+
+
+
- org.openmrs.module.ipd.api.service.SlotService
-
+ org.openmrs.module.ipd.api.service.CareTeamService
+
diff --git a/api/src/test/resources/TestingApplicationContext.xml b/api/src/test/resources/TestingApplicationContext.xml
index bf8a8fc..9aee781 100644
--- a/api/src/test/resources/TestingApplicationContext.xml
+++ b/api/src/test/resources/TestingApplicationContext.xml
@@ -8,5 +8,21 @@
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+
+
+
+ classpath:hibernate.cfg.xml
+
+
+
+
+ org.openmrs
+
+
+
+
+
+
diff --git a/omod/pom.xml b/omod/pom.xml
index ad45ce1..8f043d4 100644
--- a/omod/pom.xml
+++ b/omod/pom.xml
@@ -7,7 +7,7 @@
bahmni-ipd
org.bahmni.module
- 1.1.0-SNAPSHOT
+ 1.2.0-SNAPSHOT
bahmni-ipd-omod
diff --git a/omod/src/main/java/org/openmrs/module/ipd/ModuleDescriptor.java b/omod/src/main/java/org/openmrs/module/ipd/ModuleDescriptor.java
deleted file mode 100644
index 7b43171..0000000
--- a/omod/src/main/java/org/openmrs/module/ipd/ModuleDescriptor.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package org.openmrs.module.ipd;
-
-public class ModuleDescriptor {}
diff --git a/omod/src/main/java/org/openmrs/module/ipd/service/IPDCareTeamService.java b/omod/src/main/java/org/openmrs/module/ipd/service/IPDCareTeamService.java
deleted file mode 100644
index 42243a8..0000000
--- a/omod/src/main/java/org/openmrs/module/ipd/service/IPDCareTeamService.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.openmrs.module.ipd.service;
-
-import org.openmrs.module.ipd.api.model.CareTeam;
-import org.openmrs.module.ipd.contract.CareTeamParticipantRequest;
-import org.openmrs.module.ipd.contract.CareTeamRequest;
-
-import java.util.List;
-
-public interface IPDCareTeamService {
-
- CareTeam saveCareTeamParticipants(CareTeamRequest careTeamRequest);
-}
diff --git a/omod/src/main/java/org/openmrs/module/ipd/web/ModuleDescriptor.java b/omod/src/main/java/org/openmrs/module/ipd/web/ModuleDescriptor.java
new file mode 100644
index 0000000..64d9e14
--- /dev/null
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/ModuleDescriptor.java
@@ -0,0 +1,3 @@
+package org.openmrs.module.ipd.web;
+
+public class ModuleDescriptor {}
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/AdmittedPatientResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/AdmittedPatientResponse.java
similarity index 96%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/AdmittedPatientResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/AdmittedPatientResponse.java
index 75f7e8b..37539e8 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/AdmittedPatientResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/AdmittedPatientResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.Builder;
import lombok.Getter;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamParticipantRequest.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamParticipantRequest.java
similarity index 90%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamParticipantRequest.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamParticipantRequest.java
index a98afec..77621c7 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamParticipantRequest.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamParticipantRequest.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamParticipantResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamParticipantResponse.java
similarity index 91%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamParticipantResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamParticipantResponse.java
index 427c6c5..e28efe8 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamParticipantResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamParticipantResponse.java
@@ -1,9 +1,8 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.Builder;
import lombok.Getter;
import org.openmrs.module.ipd.api.model.CareTeamParticipant;
-import org.openmrs.module.ipd.api.util.DateTimeUtil;
import org.openmrs.module.webservices.rest.web.ConversionUtil;
import org.openmrs.module.webservices.rest.web.representation.Representation;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamRequest.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamRequest.java
similarity index 86%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamRequest.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamRequest.java
index 4073924..4ce32ef 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamRequest.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamRequest.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Getter;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamResponse.java
similarity index 94%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamResponse.java
index ade81b7..8e3f2d3 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/CareTeamResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/CareTeamResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.Builder;
import lombok.Getter;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/DrugOrderScheduleResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/DrugOrderScheduleResponse.java
similarity index 94%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/DrugOrderScheduleResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/DrugOrderScheduleResponse.java
index e00077f..e2b6c8c 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/DrugOrderScheduleResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/DrugOrderScheduleResponse.java
@@ -1,8 +1,8 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.*;
import org.openmrs.module.ipd.api.model.Slot;
-import org.openmrs.module.ipd.model.DrugOrderSchedule;
+import org.openmrs.module.ipd.web.model.DrugOrderSchedule;
import java.time.LocalDateTime;
import java.util.List;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDDrugOrderResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDDrugOrderResponse.java
similarity index 85%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/IPDDrugOrderResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDDrugOrderResponse.java
index 548eab5..625780f 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDDrugOrderResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDDrugOrderResponse.java
@@ -1,9 +1,9 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.*;
import org.openmrs.module.bahmniemrapi.drugorder.contract.BahmniOrderAttribute;
import org.openmrs.module.emrapi.encounter.domain.EncounterTransaction;
-import org.openmrs.module.ipd.model.IPDDrugOrder;
+import org.openmrs.module.ipd.web.model.IPDDrugOrder;
import java.util.List;
@@ -27,7 +27,7 @@ public static IPDDrugOrderResponse createFrom(IPDDrugOrder ipdDrugOrder) {
.drugOrderAttributes(ipdDrugOrder.getBahmniDrugOrder().getOrderAttributes())
.build();
if (ipdDrugOrder.getDrugOrderSchedule() != null){
- ipdDrugOrderResponse.setDrugOrderSchedule(DrugOrderScheduleResponse.createFrom(ipdDrugOrder.getDrugOrderSchedule()));
+ ipdDrugOrderResponse.setDrugOrderSchedule(DrugOrderScheduleResponse.createFrom(ipdDrugOrder.getDrugOrderSchedule()));
}
return ipdDrugOrderResponse;
}
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDPatientDetailsResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDPatientDetailsResponse.java
similarity index 94%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/IPDPatientDetailsResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDPatientDetailsResponse.java
index eebedfd..5a0f1f1 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDPatientDetailsResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDPatientDetailsResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.Builder;
import lombok.Getter;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDTreatmentsResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDTreatmentsResponse.java
similarity index 94%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/IPDTreatmentsResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDTreatmentsResponse.java
index 1b9e195..46e58c2 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDTreatmentsResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDTreatmentsResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardPatientDetailsResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardPatientDetailsResponse.java
similarity index 94%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardPatientDetailsResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardPatientDetailsResponse.java
index 10e8f33..c102359 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardPatientDetailsResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardPatientDetailsResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.Builder;
import lombok.Getter;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardPatientSummaryResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardPatientSummaryResponse.java
similarity index 93%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardPatientSummaryResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardPatientSummaryResponse.java
index fc3bfa2..24173be 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardPatientSummaryResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardPatientSummaryResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.Builder;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardResponse.java
similarity index 89%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardResponse.java
index e82967e..2919d48 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/IPDWardResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/IPDWardResponse.java
@@ -1,10 +1,9 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
-import org.openmrs.Location;
import org.openmrs.module.bedmanagement.AdmissionLocation;
@Getter
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationNoteRequest.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationNoteRequest.java
similarity index 93%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationNoteRequest.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationNoteRequest.java
index 87fdd58..437fd90 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationNoteRequest.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationNoteRequest.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationNoteResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationNoteResponse.java
similarity index 95%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationNoteResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationNoteResponse.java
index b8e2f01..162cc1b 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationNoteResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationNoteResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.*;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationPerformerRequest.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationPerformerRequest.java
similarity index 91%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationPerformerRequest.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationPerformerRequest.java
index c1d5a36..9e2f34e 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationPerformerRequest.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationPerformerRequest.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationPerformerResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationPerformerResponse.java
similarity index 96%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationPerformerResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationPerformerResponse.java
index 3b1c1cf..cab5d53 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationPerformerResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationPerformerResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.*;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationRequest.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationRequest.java
similarity index 95%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationRequest.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationRequest.java
index 43402ec..01ad0af 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationRequest.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationRequest.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationResponse.java
similarity index 97%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationResponse.java
index 856a047..7e4e009 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationAdministrationResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationAdministrationResponse.java
@@ -1,7 +1,6 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.*;
-import org.openmrs.api.context.Context;
import org.openmrs.module.ipd.api.model.MedicationAdministrationNote;
import org.openmrs.module.ipd.api.model.MedicationAdministrationPerformer;
import org.openmrs.module.webservices.rest.web.ConversionUtil;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationScheduleResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationScheduleResponse.java
similarity index 96%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationScheduleResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationScheduleResponse.java
index 80ba08e..118b97b 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationScheduleResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationScheduleResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationSlotResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationSlotResponse.java
similarity index 93%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/MedicationSlotResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationSlotResponse.java
index 60d103f..cf93f96 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/MedicationSlotResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/MedicationSlotResponse.java
@@ -1,13 +1,11 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
-import org.hl7.fhir.r4.model.MedicationAdministration;
import org.openmrs.module.ipd.api.model.Slot;
-import org.openmrs.module.ipd.factory.MedicationAdministrationFactory;
import org.openmrs.module.webservices.rest.web.ConversionUtil;
import org.openmrs.module.webservices.rest.web.representation.Representation;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/PatientMedicationSummaryResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/PatientMedicationSummaryResponse.java
similarity index 93%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/PatientMedicationSummaryResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/PatientMedicationSummaryResponse.java
index d7b3509..7c888df 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/PatientMedicationSummaryResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/PatientMedicationSummaryResponse.java
@@ -1,10 +1,10 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
-import org.openmrs.module.ipd.model.PatientMedicationSummary;
+import org.openmrs.module.ipd.web.model.PatientMedicationSummary;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/PrescribedOrderSlotSummaryResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/PrescribedOrderSlotSummaryResponse.java
similarity index 92%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/PrescribedOrderSlotSummaryResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/PrescribedOrderSlotSummaryResponse.java
index bff5a15..41019ea 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/PrescribedOrderSlotSummaryResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/PrescribedOrderSlotSummaryResponse.java
@@ -1,10 +1,10 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
-import org.openmrs.module.ipd.model.PrescribedOrderSlotSummary;
+import org.openmrs.module.ipd.web.model.PrescribedOrderSlotSummary;
import java.util.List;
import java.util.stream.Collectors;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/ScheduleMedicationRequest.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/ScheduleMedicationRequest.java
similarity index 97%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/ScheduleMedicationRequest.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/ScheduleMedicationRequest.java
index 51080fe..b2ce287 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/ScheduleMedicationRequest.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/ScheduleMedicationRequest.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -52,4 +52,4 @@ public List getDayWiseSlotsStartTimeAsLocalTime() {
public List getRemainingDaySlotsStartTimeAsLocalTime() {
return remainingDaySlotsStartTime != null ? remainingDaySlotsStartTime.stream().map(DateTimeUtil::convertEpocUTCToLocalTimeZone).collect(Collectors.toList()) : null;
}
-}
\ No newline at end of file
+}
diff --git a/omod/src/main/java/org/openmrs/module/ipd/contract/ScheduleMedicationResponse.java b/omod/src/main/java/org/openmrs/module/ipd/web/contract/ScheduleMedicationResponse.java
similarity index 96%
rename from omod/src/main/java/org/openmrs/module/ipd/contract/ScheduleMedicationResponse.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/contract/ScheduleMedicationResponse.java
index 5478ead..518e251 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/contract/ScheduleMedicationResponse.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/contract/ScheduleMedicationResponse.java
@@ -1,4 +1,4 @@
-package org.openmrs.module.ipd.contract;
+package org.openmrs.module.ipd.web.contract;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import lombok.AllArgsConstructor;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/controller/IPDCareTeamController.java b/omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDCareTeamController.java
similarity index 86%
rename from omod/src/main/java/org/openmrs/module/ipd/controller/IPDCareTeamController.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDCareTeamController.java
index e713dcd..2943c28 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/controller/IPDCareTeamController.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDCareTeamController.java
@@ -1,11 +1,10 @@
-package org.openmrs.module.ipd.controller;
+package org.openmrs.module.ipd.web.controller;
import lombok.extern.slf4j.Slf4j;
import org.openmrs.module.ipd.api.model.CareTeam;
-import org.openmrs.module.ipd.contract.CareTeamRequest;
-import org.openmrs.module.ipd.contract.CareTeamResponse;
-import org.openmrs.module.ipd.contract.ScheduleMedicationResponse;
-import org.openmrs.module.ipd.service.IPDCareTeamService;
+import org.openmrs.module.ipd.web.contract.CareTeamRequest;
+import org.openmrs.module.ipd.web.contract.CareTeamResponse;
+import org.openmrs.module.ipd.web.service.IPDCareTeamService;
import org.openmrs.module.webservices.rest.web.RestConstants;
import org.openmrs.module.webservices.rest.web.RestUtil;
import org.openmrs.module.webservices.rest.web.v1_0.controller.BaseRestController;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/controller/IPDMedicationAdministrationController.java b/omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDMedicationAdministrationController.java
similarity index 93%
rename from omod/src/main/java/org/openmrs/module/ipd/controller/IPDMedicationAdministrationController.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDMedicationAdministrationController.java
index 8caa639..71e5699 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/controller/IPDMedicationAdministrationController.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDMedicationAdministrationController.java
@@ -1,15 +1,15 @@
-package org.openmrs.module.ipd.controller;
+package org.openmrs.module.ipd.web.controller;
import lombok.extern.slf4j.Slf4j;
import org.hl7.fhir.r4.model.MedicationAdministration;
import org.openmrs.api.context.Context;
import org.openmrs.module.fhir2.apiext.dao.FhirMedicationAdministrationDao;
import org.openmrs.module.ipd.api.service.SlotService;
-import org.openmrs.module.ipd.contract.MedicationAdministrationRequest;
-import org.openmrs.module.ipd.contract.MedicationAdministrationResponse;
-import org.openmrs.module.ipd.factory.MedicationAdministrationFactory;
-import org.openmrs.module.ipd.service.IPDMedicationAdministrationService;
-import org.openmrs.module.ipd.util.PrivilegeConstants;
+import org.openmrs.module.ipd.web.contract.MedicationAdministrationRequest;
+import org.openmrs.module.ipd.web.contract.MedicationAdministrationResponse;
+import org.openmrs.module.ipd.web.factory.MedicationAdministrationFactory;
+import org.openmrs.module.ipd.web.service.IPDMedicationAdministrationService;
+import org.openmrs.module.ipd.web.util.PrivilegeConstants;
import org.openmrs.module.webservices.rest.web.RestConstants;
import org.openmrs.module.webservices.rest.web.RestUtil;
import org.openmrs.module.webservices.rest.web.v1_0.controller.BaseRestController;
diff --git a/omod/src/main/java/org/openmrs/module/ipd/controller/IPDScheduleController.java b/omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDScheduleController.java
similarity index 92%
rename from omod/src/main/java/org/openmrs/module/ipd/controller/IPDScheduleController.java
rename to omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDScheduleController.java
index 01c10cc..b7f1f47 100644
--- a/omod/src/main/java/org/openmrs/module/ipd/controller/IPDScheduleController.java
+++ b/omod/src/main/java/org/openmrs/module/ipd/web/controller/IPDScheduleController.java
@@ -1,8 +1,7 @@
-package org.openmrs.module.ipd.controller;
+package org.openmrs.module.ipd.web.controller;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
-import org.bahmni.module.bahmnicore.util.WebUtils;
import org.openmrs.Patient;
import org.openmrs.Visit;
import org.openmrs.api.PatientService;
@@ -13,19 +12,18 @@
import org.openmrs.module.ipd.api.model.Slot;
import org.openmrs.module.ipd.api.util.IPDConstants;
import org.openmrs.module.ipd.api.service.ScheduleService;
-import org.openmrs.module.ipd.contract.MedicationScheduleResponse;
-import org.openmrs.module.ipd.contract.MedicationSlotResponse;
-import org.openmrs.module.ipd.contract.PatientMedicationSummaryResponse;
-import org.openmrs.module.ipd.contract.ScheduleMedicationRequest;
-import org.openmrs.module.ipd.contract.ScheduleMedicationResponse;
-import org.openmrs.module.ipd.model.PatientMedicationSummary;
-import org.openmrs.module.ipd.service.IPDScheduleService;
-import org.openmrs.module.ipd.util.PrivilegeConstants;
+import org.openmrs.module.ipd.web.contract.MedicationScheduleResponse;
+import org.openmrs.module.ipd.web.contract.MedicationSlotResponse;
+import org.openmrs.module.ipd.web.contract.PatientMedicationSummaryResponse;
+import org.openmrs.module.ipd.web.contract.ScheduleMedicationRequest;
+import org.openmrs.module.ipd.web.contract.ScheduleMedicationResponse;
+import org.openmrs.module.ipd.web.model.PatientMedicationSummary;
+import org.openmrs.module.ipd.web.service.IPDScheduleService;
+import org.openmrs.module.ipd.web.util.PrivilegeConstants;
import org.openmrs.module.webservices.rest.web.RestConstants;
import org.openmrs.module.webservices.rest.web.RestUtil;
import org.openmrs.module.webservices.rest.web.v1_0.controller.BaseRestController;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@@ -37,7 +35,6 @@
import static org.openmrs.module.ipd.api.model.ServiceType.MEDICATION_REQUEST;
import static org.openmrs.module.ipd.api.util.DateTimeUtil.convertEpocUTCToLocalTimeZone;
-import static org.openmrs.module.ipd.contract.MedicationScheduleResponse.createFrom;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.http.HttpStatus.FORBIDDEN;
@@ -171,10 +168,10 @@ public ResponseEntity