Class Patient

java.lang.Object
de.hitec.nhplus.model.Person
de.hitec.nhplus.model.Patient

public class Patient extends Person
Patients live in a NURSING home and are treated by nurses.
  • Property Details

  • Constructor Details

    • Patient

      public Patient(String firstName, String surname, LocalDate dateOfBirth, String careLevel, String roomNumber, String assets)
      Constructor to initiate an object of class Patient with the given parameter. Use this constructor to initiate objects, which are not persisted yet, because it will not have a patient id (pid).
      Parameters:
      firstName - First name of the patient.
      surname - Last name of the patient.
      dateOfBirth - Date of birth of the patient.
      careLevel - Care level of the patient.
      roomNumber - Room number of the patient.
      assets - Assets of the patient.
    • Patient

      public Patient(long pid, String firstName, String surname, LocalDate dateOfBirth, String careLevel, String roomNumber, String assets)
      Constructor to initiate an object of class Patient with the given parameter. Use this constructor to initiate objects, which are already persisted and have a patient id (pid).
      Parameters:
      pid - Patient id.
      firstName - First name of the patient.
      surname - Last name of the patient.
      dateOfBirth - Date of birth of the patient.
      careLevel - Care level of the patient.
      roomNumber - Room number of the patient.
      assets - Assets of the patient.
  • Method Details

    • getPid

      public long getPid()
      Gets the value of the pid property.
      Property description:
      Returns:
      the value of the pid property
      See Also:
    • pidProperty

      public javafx.beans.property.SimpleLongProperty pidProperty()
      Returns:
      the pid property
      See Also:
    • getDateOfBirth

      public String getDateOfBirth()
      Gets the value of the dateOfBirth property.
      Property description:
      Returns:
      the value of the dateOfBirth property
      See Also:
    • dateOfBirthProperty

      public javafx.beans.property.SimpleStringProperty dateOfBirthProperty()
      Returns:
      the dateOfBirth property
      See Also:
    • setDateOfBirth

      public void setDateOfBirth(String dateOfBirth)
      Stores the given string as new birthOfDate.
      Parameters:
      dateOfBirth - as string in the following format: YYYY-MM-DD.
    • getCareLevel

      public String getCareLevel()
      Gets the value of the careLevel property.
      Property description:
      Returns:
      the value of the careLevel property
      See Also:
    • careLevelProperty

      public javafx.beans.property.SimpleStringProperty careLevelProperty()
      Returns:
      the careLevel property
      See Also:
    • setCareLevel

      public void setCareLevel(String careLevel)
      Sets the value of the careLevel property.
      Property description:
      Parameters:
      careLevel - the value for the careLevel property
      See Also:
    • getRoomNumber

      public String getRoomNumber()
      Gets the value of the roomNumber property.
      Property description:
      Returns:
      the value of the roomNumber property
      See Also:
    • roomNumberProperty

      public javafx.beans.property.SimpleStringProperty roomNumberProperty()
      Returns:
      the roomNumber property
      See Also:
    • setRoomNumber

      public void setRoomNumber(String roomNumber)
      Sets the value of the roomNumber property.
      Property description:
      Parameters:
      roomNumber - the value for the roomNumber property
      See Also:
    • getAssets

      public String getAssets()
      Gets the value of the assets property.
      Property description:
      Returns:
      the value of the assets property
      See Also:
    • assetsProperty

      public javafx.beans.property.SimpleStringProperty assetsProperty()
      Returns:
      the assets property
      See Also:
    • setAssets

      public void setAssets(String assets)
      Sets the value of the assets property.
      Property description:
      Parameters:
      assets - the value for the assets property
      See Also:
    • add

      public boolean add(Treatment treatment)
      Adds a treatment to the list of treatments, if the list does not already contain the treatment.
      Parameters:
      treatment - Treatment to add.
      Returns:
      False, if the treatment was already part of the list, else true.
    • toString

      public String toString()
      Overrides:
      toString in class Object