java.lang.Object
de.hitec.nhplus.model.Person
de.hitec.nhplus.model.Patient
Patients live in a NURSING home and are treated by nurses.
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.SimpleStringProperty
javafx.beans.property.SimpleStringProperty
javafx.beans.property.SimpleStringProperty
javafx.beans.property.SimpleLongProperty
javafx.beans.property.SimpleStringProperty
-
Constructor Summary
ConstructorDescriptionPatient
(long pid, String firstName, String surname, LocalDate dateOfBirth, String careLevel, String roomNumber, String assets) Constructor to initiate an object of classPatient
with the given parameter.Patient
(String firstName, String surname, LocalDate dateOfBirth, String careLevel, String roomNumber, String assets) Constructor to initiate an object of classPatient
with the given parameter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a treatment to the list of treatments, if the list does not already contain the treatment.javafx.beans.property.SimpleStringProperty
javafx.beans.property.SimpleStringProperty
javafx.beans.property.SimpleStringProperty
Gets the value of theassets
property.Gets the value of thecareLevel
property.Gets the value of thedateOfBirth
property.long
getPid()
Gets the value of thepid
property.Gets the value of theroomNumber
property.javafx.beans.property.SimpleLongProperty
javafx.beans.property.SimpleStringProperty
void
Sets the value of theassets
property.void
setCareLevel
(String careLevel) Sets the value of thecareLevel
property.void
setDateOfBirth
(String dateOfBirth) Stores the given string as newbirthOfDate
.void
setRoomNumber
(String roomNumber) Sets the value of theroomNumber
property.toString()
Methods inherited from class de.hitec.nhplus.model.Person
firstNameProperty, getFirstName, getSurname, setFirstName, setSurname, surnameProperty
-
Property Details
-
pid
public javafx.beans.property.SimpleLongProperty pidProperty- See Also:
-
dateOfBirth
public javafx.beans.property.SimpleStringProperty dateOfBirthProperty- See Also:
-
careLevel
public javafx.beans.property.SimpleStringProperty careLevelProperty- See Also:
-
roomNumber
public javafx.beans.property.SimpleStringProperty roomNumberProperty- See Also:
-
assets
public javafx.beans.property.SimpleStringProperty assetsProperty- See Also:
-
-
Constructor Details
-
Patient
public Patient(String firstName, String surname, LocalDate dateOfBirth, String careLevel, String roomNumber, String assets) Constructor to initiate an object of classPatient
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 classPatient
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 thepid
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
Gets the value of thedateOfBirth
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
Stores the given string as newbirthOfDate
.- Parameters:
dateOfBirth
- as string in the following format: YYYY-MM-DD.
-
getCareLevel
Gets the value of thecareLevel
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
Sets the value of thecareLevel
property.- Property description:
- Parameters:
careLevel
- the value for thecareLevel
property- See Also:
-
getRoomNumber
Gets the value of theroomNumber
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
Sets the value of theroomNumber
property.- Property description:
- Parameters:
roomNumber
- the value for theroomNumber
property- See Also:
-
getAssets
Gets the value of theassets
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
Sets the value of theassets
property.- Property description:
- Parameters:
assets
- the value for theassets
property- See Also:
-
add
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
-