From 96a111ea69430a10095456366317e85fed2d6652 Mon Sep 17 00:00:00 2001 From: Pamela Canchanya Date: Tue, 1 Apr 2014 15:21:40 -0400 Subject: [PATCH] Revert wrong merged conflicts --- .../appointmentscheduling/Appointment.java | 22 ++++++++------- .../api/TimeSlotServiceTest.java | 27 ++++++------------- 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/appointmentscheduling/Appointment.java b/api/src/main/java/org/openmrs/module/appointmentscheduling/Appointment.java index d180d8a5..e77d03d3 100644 --- a/api/src/main/java/org/openmrs/module/appointmentscheduling/Appointment.java +++ b/api/src/main/java/org/openmrs/module/appointmentscheduling/Appointment.java @@ -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; } diff --git a/api/src/test/java/org/openmrs/module/appointmentscheduling/api/TimeSlotServiceTest.java b/api/src/test/java/org/openmrs/module/appointmentscheduling/api/TimeSlotServiceTest.java index cec2c1f7..9f6f9e1a 100644 --- a/api/src/test/java/org/openmrs/module/appointmentscheduling/api/TimeSlotServiceTest.java +++ b/api/src/test/java/org/openmrs/module/appointmentscheduling/api/TimeSlotServiceTest.java @@ -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; @@ -30,6 +25,11 @@ 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; @@ -37,11 +37,11 @@ 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 { @@ -402,21 +402,10 @@ public void shouldGetOnlyAvailableTimeSlotsByConstraintsSortedByStartDate() thro List 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" } }