diff --git a/api/pom.xml b/api/pom.xml index 6ebaab21a..d9ef556e0 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -5,7 +5,7 @@ org.bahmni.module appointments - 1.5.0-SNAPSHOT + 1.6.1-SNAPSHOT appointments-api diff --git a/omod/pom.xml b/omod/pom.xml index 6e5fd07e6..10a651ebc 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -4,7 +4,7 @@ org.bahmni.module appointments - 1.5.0-SNAPSHOT + 1.6.1-SNAPSHOT appointments-omod @@ -26,11 +26,11 @@ ${project.parent.artifactId}-api ${project.parent.version} - + org.openmrs.web openmrs-web diff --git a/omod/src/main/java/org/openmrs/module/appointments/web/controller/AppointmentController.java b/omod/src/main/java/org/openmrs/module/appointments/web/controller/AppointmentController.java index 61a601ffc..bd77486ce 100644 --- a/omod/src/main/java/org/openmrs/module/appointments/web/controller/AppointmentController.java +++ b/omod/src/main/java/org/openmrs/module/appointments/web/controller/AppointmentController.java @@ -178,17 +178,6 @@ public ResponseEntity undoStatusChange(@PathVariable("appointmentUuid") } } - @RequestMapping(method = RequestMethod.GET) - @ResponseBody - public AppointmentDefaultResponse getAppointmentByUuid(@RequestParam(value = "uuid") String uuid) { - Appointment appointment = appointmentsService.getAppointmentByUuid(uuid); - if (appointment == null) { - log.error("Invalid. Appointment does not exist. UUID - " + uuid); - throw new RuntimeException("Appointment does not exist"); - } - return appointmentMapper.constructResponse(appointment); - } - @RequestMapping(method = RequestMethod.GET) @ResponseBody public AppointmentDefaultResponse getAppointmentById(@RequestParam(value = "id") Integer id) { diff --git a/omod/src/test/java/org/openmrs/module/appointments/web/controller/AppointmentControllerTest.java b/omod/src/test/java/org/openmrs/module/appointments/web/controller/AppointmentControllerTest.java index 7f477f4d0..04be7084c 100644 --- a/omod/src/test/java/org/openmrs/module/appointments/web/controller/AppointmentControllerTest.java +++ b/omod/src/test/java/org/openmrs/module/appointments/web/controller/AppointmentControllerTest.java @@ -170,25 +170,6 @@ public void shouldThrowExceptionIfPatientUuidIsBlankWhileCreatingAppointment() t assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode()); } - @Test - public void shouldGetAppointmentByUuid() throws Exception { - String appointmentUuid = "appointmentUuid"; - Appointment appointment = new Appointment(); - appointment.setUuid(appointmentUuid); - when(appointmentsService.getAppointmentByUuid(appointmentUuid)).thenReturn(appointment); - appointmentController.getAppointmentByUuid(appointmentUuid); - verify(appointmentsService, times(1)).getAppointmentByUuid(appointmentUuid); - verify(appointmentMapper, times(1)).constructResponse(appointment); - } - - @Test - public void shouldThrowExceptionIfAppointmentDoesNotExist() throws Exception { - when(appointmentsService.getAppointmentByUuid(any(String.class))).thenReturn(null); - expectedException.expect(RuntimeException.class); - expectedException.expectMessage("Appointment does not exist"); - appointmentController.getAppointmentByUuid("randomUuid"); - } - @Test public void shouldUndoStatusOfAppointment() throws Exception { Appointment appointment = new Appointment(); diff --git a/pom.xml b/pom.xml index b37e7bcf2..e557fe918 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.bahmni.module appointments - 1.5.0-SNAPSHOT + 1.6.1-SNAPSHOT pom Bahmni Appointment Scheduling OpenMRS Module Scheduling and managing Appointments.