Skip to content

Commit

Permalink
Revert wrong merged conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pamcdm committed Apr 1, 2014
1 parent f036581 commit 96a111e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,40 @@ public class Appointment extends BaseOpenmrsData implements Serializable {
// TODO confirm that "WALK-IN" should be considered active
@JsonSerialize(using = AppointmentStatusSerializer.class)
public enum AppointmentStatus {
SCHEDULED("Scheduled", true, false), RESCHEDULED("Rescheduled", true, false), WALKIN("Walk-In", true, true), CANCELLED(
"Cancelled", false, false), WAITING("Waiting", true, true), INCONSULTATION("In-Consultation", true, true), COMPLETED(
"Completed", true, false), MISSED("Missed", false, false), CANCELLED_AND_NEEDS_RESCHEDULE(
"Cancelled and Needs Reschedule", false, false);
SCHEDULED("Scheduled", false, false), RESCHEDULED("Rescheduled", false, false), WALKIN("Walk-In", false, true), CANCELLED(
"Cancelled", true, false), WAITING("Waiting", false, true), INCONSULTATION("In-Consultation", false, true), COMPLETED(
"Completed", false, false), MISSED("Missed", false, false), CANCELLED_AND_NEEDS_RESCHEDULE(
"Cancelled and Needs Reschedule", true, false);
private final String name;

/**
* Whether or not an appointment with this status should be considered "cancelled" Cancelled
* statuses: CANCELLED, CANCELLED_AND_NEEDS_RESCHEDULE
*/
private boolean cancelled;
private Boolean cancelled;

/**
* Whether or not an appointment with this status is an "active" appointment, where
* active=patient checked-in and present within the health facility Active statuses: WALKIN,
* WAITING, INCONSULTATION
*/
private boolean active;
private Boolean active;

private AppointmentStatus(final String name, final boolean cancelled, final boolean active) {
private AppointmentStatus(final String name, final Boolean cancelled, final Boolean active) {
this.name = name;
this.cancelled = cancelled;
this.active = active;
}

public String getName() {
return this.name;
}
public boolean isCancelled() {

public Boolean isCancelled() {
return this.cancelled;
}
public boolean isActive() {

public Boolean isActive() {
return this.active;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
*/
package org.openmrs.module.appointmentscheduling.api;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -30,18 +25,23 @@
import org.openmrs.test.BaseModuleContextSensitiveTest;
import org.openmrs.test.Verifies;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

/**
<<<<<<< HEAD
<<<<<<< HEAD
* Tests Time Slot methods in the {@link AppointmentService} .
=======
=======
* Tests Time Slot methods in the {@link AppointmentService} .
>>>>>>> f97b876... fixed which AppointmentStatuses are considered "cancelled"
>>>>>>> f97b876... fixed which AppointmentStatuses are considered "cancelled"
*/
public class TimeSlotServiceTest extends BaseModuleContextSensitiveTest {

Expand Down Expand Up @@ -402,21 +402,10 @@ public void shouldGetOnlyAvailableTimeSlotsByConstraintsSortedByStartDate() thro
List<TimeSlot> result = service.getTimeSlotsByConstraints(type, fromDate, null, null, null);
assertNotNull(result);
assertEquals(4, result.size());
<<<<<<< HEAD

assertEquals(5, result.get(0).getTimeSlotId().intValue());
assertEquals(4, result.get(1).getTimeSlotId().intValue());
assertEquals(8, result.get(2).getTimeSlotId().intValue());
assertEquals(9, result.get(3).getTimeSlotId().intValue());

=======

assertEquals(5, result.get(0).getTimeSlotId().intValue());
assertEquals(4, result.get(1).getTimeSlotId().intValue());
assertEquals(8, result.get(2).getTimeSlotId().intValue());
assertEquals(9, result.get(3).getTimeSlotId().intValue());

>>>>>>> f97b876... fixed which AppointmentStatuses are considered "cancelled"
}

}

0 comments on commit 96a111e

Please sign in to comment.