Appointment

public class Appointment

Appointment class to track the appointments of a person identified by externalId

Constructors

Appointment

public Appointment()

Constructs an empty appointment object with its status set to - org.motechproject.appointments.domain.AppointmentStatus.NONE.

Appointment

public Appointment(String externalId, DateTime appointmentDate, DateTime visitedDate, AppointmentStatus status, boolean sendReminders, Period reminderInterval, DateTime reminderStartTime)

Constructs an appointment.

Parameters:
  • externalId – external id of the person for whom this appointment tracks
  • appointmentDate – due date for the appointment
  • visitedDate – date of the fulfilled visit
  • status – status flag to indicate if the appointment was missed
  • sendReminders – flag to activate or deactivate sending reminders
  • reminderInterval – the interval between reminders - a period of time
  • reminderStartTime – time to start firing the reminder events

Methods

getAppointmentDate

public DateTime getAppointmentDate()
Returns:due date for the appointment

getApptId

public String getApptId()
Returns:appointment id generated by the system

getExternalId

public String getExternalId()
Returns:external id of the person for whom this appointment tracks

getReminderInterval

public Period getReminderInterval()
Returns:the interval between reminders - a period of time

getReminderStartTime

public DateTime getReminderStartTime()
Returns:time to start firing the reminder events

getSendReminders

public boolean getSendReminders()
Returns:flag to activate or deactivate sending reminders

getStatus

public AppointmentStatus getStatus()
Returns:status flag to indicate if the appointment was missed

getVisitedDate

public DateTime getVisitedDate()
Returns:date of the fulfilled visit

setAppointmentDate

public void setAppointmentDate(DateTime appointmentDate)
Parameters:
  • appointmentDate – due date for the appointment

setExternalId

public void setExternalId(String externalId)
Parameters:
  • externalId – external id of the person for whom this appointment tracks

setReminderInterval

public void setReminderInterval(Period interval)
Parameters:
  • interval – the interval between reminders - a period of time

setReminderStartTime

public void setReminderStartTime(DateTime startTime)
Parameters:
  • startTime – time to start firing the reminder events

setSendReminders

public void setSendReminders(boolean sendReminders)
Parameters:
  • sendReminders – flag to activate or deactivate sending reminders

setStatus

public void setStatus(AppointmentStatus status)
Parameters:
  • status – status flag to indicate if the appointment was missed

setVisitedDate

public void setVisitedDate(DateTime visitedDate)
Parameters:
  • visitedDate – date of the fulfilled visit