Package Common

Class AppointmentOutcomeManager

java.lang.Object
Common.AppointmentOutcomeManager
Direct Known Subclasses:
AdminAOM, DoctorAOM, PatientAOM, PharmaAOM

public abstract class AppointmentOutcomeManager extends Object
The AppointmentOutcomeManager class provides functionalities for managing appointment outcomes. It allows adding, removing, and retrieving appointment outcomes from the associated AppointmentOutcomeDatabase.
  • Field Details

  • Constructor Details

  • Method Details

    • addOutcome

      public boolean addOutcome(AppointmentOutcome outcome, DoctorSchedule schedule)
      Adds a new appointment outcome to the database if it does not already exist.
      Parameters:
      outcome - the AppointmentOutcome to be added
      schedule - the DoctorSchedule associated with the appointment
      Returns:
      true if the outcome was added successfully; false if it already exists or the schedule is invalid
    • removeOutcome

      public boolean removeOutcome(String appointmentID)
      Removes an appointment outcome from the database by its unique identifier.
      Parameters:
      appointmentID - the unique identifier of the appointment outcome to be removed
      Returns:
      true if the outcome was successfully removed; false otherwise
    • getOutcome

      public AppointmentOutcome getOutcome(String appointmentID)
      Retrieves an appointment outcome by its unique identifier.
      Parameters:
      appointmentID - the unique identifier of the appointment outcome to retrieve
      Returns:
      the AppointmentOutcome object if found; otherwise, returns null
    • getAllOutcomes

      public List<AppointmentOutcome> getAllOutcomes()
      Retrieves all appointment outcomes from the database.
      Returns:
      a list of all AppointmentOutcome objects in the database