Skip to content

Commit

Permalink
breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jecihjoy committed Jan 28, 2024
1 parent ae84514 commit ffc5da2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.bahmni.module</groupId>
<artifactId>appointments</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.1-SNAPSHOT</version>
</parent>

<artifactId>appointments-api</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.bahmni.module</groupId>
<artifactId>appointments</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.1-SNAPSHOT</version>
</parent>

<artifactId>appointments-omod</artifactId>
Expand All @@ -26,11 +26,11 @@
<artifactId>${project.parent.artifactId}-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<!-- <dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>${project.parent.artifactId}-atom-feed</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependency> -->
<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,6 @@ public ResponseEntity<Object> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.bahmni.module</groupId>
<artifactId>appointments</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Bahmni Appointment Scheduling</name>
<description>OpenMRS Module Scheduling and managing Appointments.</description>
Expand Down

0 comments on commit ffc5da2

Please sign in to comment.