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
FieldsModifier 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.Labelattributes with a fx:id assigned in the view(package private) javafx.scene.control.Label(package private) static Appointmentthe 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.LabelFields inherited from class com.ehealthsystem.appointment.ScheduleLoader
errorLabel, NO_TIME_SELECTED, scheduleGridPane, selectedTime -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleBackButton(javafx.event.ActionEvent event) Go back to the last scene without shifting the appointmentvoidhandleDateChoice(javafx.event.ActionEvent event) Check if date is not in the pastvoidhandleShiftAppointmentButton(javafx.event.ActionEvent event) Shift the appointment when the button was pressedprivate voidset the data to current appointment informaton sectionprivate voidload the doctors scheduleprivate voidset the current data to the appointment shift sectionvoidstart(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:
SQLExceptionIOExceptionInterruptedExceptioncom.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:
SQLExceptionIOExceptionInterruptedExceptioncom.google.maps.errors.ApiException
-
loadShiftAppointment
private void loadShiftAppointment() throws SQLException, javax.activation.UnsupportedDataTypeExceptionset the current data to the appointment shift section- Throws:
SQLExceptionjavax.activation.UnsupportedDataTypeException
-
loadSchedule
load the doctors schedule- Throws:
SQLExceptionjavax.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:
SQLExceptionIOExceptionjavax.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:
IOExceptionSQLExceptionInterruptedExceptioncom.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:
SQLExceptionjavax.activation.UnsupportedDataTypeException
-