Class AppointmentShiftController

java.lang.Object
com.ehealthsystem.appointment.ScheduleLoader
com.ehealthsystem.appointment.AppointmentShiftController

public class AppointmentShiftController extends ScheduleLoader
Class for managing the appointment shifting
  • Field Details

    • doctorLabel

      javafx.scene.control.Label doctorLabel
      attributes with a fx:id assigned in the view
    • addressLabel

      javafx.scene.control.Label addressLabel
    • specializationsLabel

      javafx.scene.control.Label specializationsLabel
    • dateLabel

      javafx.scene.control.Label dateLabel
    • timeLabel

      javafx.scene.control.Label timeLabel
    • healthProblemLabel

      javafx.scene.control.Label healthProblemLabel
    • datePicker

      javafx.scene.control.DatePicker datePicker
    • selectedDateLabel

      javafx.scene.control.Label selectedDateLabel
    • shiftAppointmentButton

      javafx.scene.control.Button shiftAppointmentButton
    • loadedAppointment

      static Appointment loadedAppointment
      the appointment to shift which is loaded in the scene
  • Constructor Details

    • AppointmentShiftController

      public AppointmentShiftController()
  • Method Details

    • start

      public void start(Appointment appointment) throws SQLException, IOException, InterruptedException, com.google.maps.errors.ApiException
      first method called when switching scenes
      Parameters:
      appointment - the apponitment selected to shift
      Throws:
      SQLException
      IOException
      InterruptedException
      com.google.maps.errors.ApiException
    • loadCurrentAppointment

      private void loadCurrentAppointment() throws SQLException, IOException, InterruptedException, com.google.maps.errors.ApiException
      set the data to current appointment informaton section
      Throws:
      SQLException
      IOException
      InterruptedException
      com.google.maps.errors.ApiException
    • loadShiftAppointment

      private void loadShiftAppointment() throws SQLException, javax.activation.UnsupportedDataTypeException
      set the current data to the appointment shift section
      Throws:
      SQLException
      javax.activation.UnsupportedDataTypeException
    • loadSchedule

      private void loadSchedule() throws SQLException, javax.activation.UnsupportedDataTypeException
      load the doctors schedule
      Throws:
      SQLException
      javax.activation.UnsupportedDataTypeException
    • handleShiftAppointmentButton

      public void handleShiftAppointmentButton(javafx.event.ActionEvent event) throws SQLException, IOException, javax.mail.MessagingException
      Shift the appointment when the button was pressed
      Parameters:
      event - event that triggered the method call
      Throws:
      SQLException
      IOException
      javax.mail.MessagingException
    • handleBackButton

      public void handleBackButton(javafx.event.ActionEvent event) throws IOException, SQLException, InterruptedException, com.google.maps.errors.ApiException
      Go back to the last scene without shifting the appointment
      Parameters:
      event - event that triggered the method call
      Throws:
      IOException
      SQLException
      InterruptedException
      com.google.maps.errors.ApiException
    • handleDateChoice

      public void handleDateChoice(javafx.event.ActionEvent event) throws SQLException, javax.activation.UnsupportedDataTypeException
      Check if date is not in the past
      Parameters:
      event - event that triggered the method call
      Throws:
      SQLException
      javax.activation.UnsupportedDataTypeException