Class HealthInformationController

java.lang.Object
com.ehealthsystem.healthInformation.HealthInformationController
All Implemented Interfaces:
javafx.fxml.Initializable

public class HealthInformationController extends Object implements javafx.fxml.Initializable
managed the deleting and creation of the user health information
  • Field Details

    • healthTableView

      javafx.scene.control.TableView<HealthInformationTableView> healthTableView
      all attributes with a fx:id assigned in the view
    • ICD

      javafx.scene.control.TableColumn<HealthInformationTableView,String> ICD
    • healthProblem

      javafx.scene.control.TableColumn<HealthInformationTableView,String> healthProblem
    • deleteButton

      javafx.scene.control.Button deleteButton
    • healthChoiceBox

      javafx.scene.control.ChoiceBox healthChoiceBox
    • selectedRow

      represents the selected row to determine which row needs to be deleted when event is triggered
  • Constructor Details

    • HealthInformationController

      public HealthInformationController()
  • Method Details

    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      The first method that is called when scene is switched. Used to fill the choice box and load the users health problems.
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Parameters:
      url -
      resourceBundle -
    • loadHealthProblem

      private void loadHealthProblem() throws SQLException
      Load the users health problems from the database and store them als Observable
      Throws:
      SQLException
    • handleDeleteButton

      public void handleDeleteButton(javafx.event.ActionEvent event) throws SQLException, IOException
      deletes a users health problem (a row) in the Tableview
      Parameters:
      event - the event that triggered the method
      Throws:
      SQLException
      IOException
    • handleAddButton

      public void handleAddButton(javafx.event.ActionEvent event) throws SQLException, IOException
      Adds a health problem to the user
      Parameters:
      event - the event that triggered the method
      Throws:
      SQLException
      IOException
    • handleBackButton

      public void handleBackButton(javafx.event.ActionEvent event) throws IOException
      switches back to the primary view
      Parameters:
      event - the event that triggered the method
      Throws:
      IOException