Package com.ehealthsystem.appointment
Class AppointmentShiftController
java.lang.Object
com.ehealthsystem.appointment.ScheduleLoader
com.ehealthsystem.appointment.AppointmentShiftController
Class for managing the appointment shifting
-
Field Summary
Modifier and TypeFieldDescription(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.DatePicker
(package private) javafx.scene.control.Label
attributes with a fx:id assigned in the view(package private) javafx.scene.control.Label
(package private) static Appointment
the appointment to shift which is loaded in the scene(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Button
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
Fields inherited from class com.ehealthsystem.appointment.ScheduleLoader
errorLabel, NO_TIME_SELECTED, scheduleGridPane, selectedTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleBackButton
(javafx.event.ActionEvent event) Go back to the last scene without shifting the appointmentvoid
handleDateChoice
(javafx.event.ActionEvent event) Check if date is not in the pastvoid
handleShiftAppointmentButton
(javafx.event.ActionEvent event) Shift the appointment when the button was pressedprivate void
set the data to current appointment informaton sectionprivate void
load the doctors scheduleprivate void
set the current data to the appointment shift sectionvoid
start
(Appointment appointment) first method called when switching scenesMethods inherited from class com.ehealthsystem.appointment.ScheduleLoader
loadSchedule, selectedTimeChanged
-
Field Details
-
doctorLabel
javafx.scene.control.Label doctorLabelattributes 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
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.ApiExceptionset the data to current appointment informaton section- Throws:
SQLException
IOException
InterruptedException
com.google.maps.errors.ApiException
-
loadShiftAppointment
private void loadShiftAppointment() throws SQLException, javax.activation.UnsupportedDataTypeExceptionset the current data to the appointment shift section- Throws:
SQLException
javax.activation.UnsupportedDataTypeException
-
loadSchedule
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
-