scheduler.model
Class Patient

java.lang.Object
  extended by scheduler.model.Patient

public class Patient
extends java.lang.Object

Represents a single patient with a necessary medication schedule and a device maintained by periodic schedule updates.


Constructor Summary
Patient(java.lang.String patientName)
          Creates a new patient representation with the specified name, a blank schedule for four bins, and a lastUpdate set to the zero time (Dec 31, 1969).
 
Method Summary
 java.util.Date getLastUpdate()
          Returns a Date instance representing the last update data and time.
 java.lang.String getPatientName()
          Returns a String representation of the patient's name.
 Schedule getSchedule()
          Returns the schedule instance pertaining to this patient.
 void setLastUpdate(java.util.Date lastUpdate)
          Sets the last device update time and date.
 void setPatientName(java.lang.String patientName)
          Sets the patient's name to the specified argument.
 void setSchedule(Schedule schedule)
          Sets the patients schedules to a new value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Patient

public Patient(java.lang.String patientName)
Creates a new patient representation with the specified name, a blank schedule for four bins, and a lastUpdate set to the zero time (Dec 31, 1969).

Parameters:
patientName - the name given to the new patient instance
Method Detail

setPatientName

public void setPatientName(java.lang.String patientName)
Sets the patient's name to the specified argument.

Parameters:
patientName - the new name for this patient instance

setLastUpdate

public void setLastUpdate(java.util.Date lastUpdate)
Sets the last device update time and date.

Parameters:
lastUpdate - the new update Date instance

setSchedule

public void setSchedule(Schedule schedule)
Sets the patients schedules to a new value.

Parameters:
schedule - the new schedule for this patient

getPatientName

public java.lang.String getPatientName()
Returns a String representation of the patient's name.

Returns:
the patient name

getLastUpdate

public java.util.Date getLastUpdate()
Returns a Date instance representing the last update data and time.

Returns:
the last update Date

getSchedule

public Schedule getSchedule()
Returns the schedule instance pertaining to this patient.

Returns:
a schedule instance for this patient