Class Department

java.lang.Object
cz.cuni.kubinja.hospitalsystem.calendar.Department

public class Department extends Object
Manager of appointments for department.
  • Field Details

    • name

      public String name
      Name of the department
    • appointments

      public final SortedSet<Appointment> appointments
      Sorted set of the appointments connected with the department
    • prefixSize

      public static final int prefixSize
      Size of the prefix in calendar
      See Also:
    • sizeOfSlot

      public static final int sizeOfSlot
      Size of the atomic time slot
      See Also:
    • lengthOfSlotInMinutes

      public static final int lengthOfSlotInMinutes
      Length of the slot in minutes
      See Also:
    • numberOfSlotsInHour

      public static final int numberOfSlotsInHour
      Number of slots in hour
      See Also:
  • Method Details

    • addAppointment

      public void addAppointment(Appointment appointment)
      Adds appointment info the department calendar.
      Parameters:
      appointment - Appointment that will be added into department calendar.
    • computeLayers

      public void computeLayers()
      Computes hierarchy how to arrange appointments so the parallel appointments do not overlap in the calendar diagram.
    • toString

      public String toString()
      Returns string representation of department calendar.
      Overrides:
      toString in class Object
      Returns:
      String representation of department calendar.
    • toString

      public String toString(boolean fromToday)
      Returns string representation of department calendar.
      Parameters:
      fromToday - Denotes whether calendar will be exported whole or only appointments in the present and future.
      Returns:
      String representation of department calendar.
    • size

      public int size()
      Returns number of appointments that are planned in the department.
      Returns:
      Number of appointments that are planned in the department.
    • numberOfAppearances

      public int numberOfAppearances(Person person)
      Returns number of appointments that are connected to the provided person.
      Parameters:
      person - Person for who is computed how many times had or will have appointment.
      Returns:
      Number of appointments that are connected to the provided person.