Class Patient
java.lang.Object
org.episteme.social.sociology.Role
org.episteme.social.medicine.consultation.Patient
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Temporal<TimeCoordinate>
The Patient class provides some useful information about the health of
an individual.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot
- See Also:
-
Field Summary
Fields inherited from class Role
CLIENT, OBSERVER, SERVER, SUPERVISOR -
Constructor Summary
ConstructorsConstructorDescriptionPatient(Individual individual) Patient(Individual individual, MedicalSituation situation) Creates a new Patient object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMedicalReport(ScientificReport report) voidaddPathology(Pathology pathology) Adds a pathology to the patient's current condition.voidaddTreatment(Treatment treatment) Records a new medical treatment for the patient.floatReturns the blood oxygen level of the patient.floatReturns the blood pressure of the patient.floatReturns the cardiac rate of the patient.Returns the set of current pathologies affecting the patient.Returns the complete chronologically ordered list of medical records.floatReturns the normal body temperature for this patient's species.floatReturns the pain scale level of the patient.floatReturns the respiratory rate of the patient.floatReturns the body temperature of the patient.Returns the set of medical treatments being administered.voidRemoves the most recently added medical record.voidremoveMedicalRecord(ScientificReport medicalRecord) Removes a medical record from the history.voidremoveMedicalReport(ScientificReport report) voidremovePathology(Pathology pathology) Removes a pathology from the patient's current condition.voidremoveTreatment(Treatment treatment) Removes a recorded treatment.voidsetBloodOxygen(float bloodOxygen) Sets the blood oxygen level of the patient.voidsetBloodPressure(float pressure) Sets the blood pressure of the patient.voidsetCardiacRate(float rate) Sets the cardiac rate of the patient.voidsetCurrentPathologies(Set<Pathology> pathologies) Updates the set of current pathologies.voidsetMedicalReports(List<ScientificReport> reports) voidsetNormalTemperature(float normalTemperature) Sets the normal body temperature for this patient's species.voidsetPainScale(float painScale) Sets the pain scale level of the patient.voidsetRespiratoryRate(float respiratoryRate) Sets the respiratory rate of the patient.voidsetTemperature(float temperature) Sets the body temperature of the patient.voidsetTreatments(Set<Treatment> treatments) Updates the set of current treatments.Methods inherited from class Role
equals, getId, getIndividual, getKind, getSituation, getTraits, getWhen, hashCode, setKind, setTimestamp, toStringMethods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
Patient
Creates a new Patient object.- Parameters:
individual- the individual who is a patientsituation- the medical situation context
-
Patient
-
-
Method Details
-
getBloodPressure
public float getBloodPressure()Returns the blood pressure of the patient.- Returns:
- the blood pressure in Pascals
-
setBloodPressure
public void setBloodPressure(float pressure) Sets the blood pressure of the patient.- Parameters:
pressure- the blood pressure in Pascals
-
getCardiacRate
public float getCardiacRate()Returns the cardiac rate of the patient.- Returns:
- the cardiac rate in beats per second
-
setCardiacRate
public void setCardiacRate(float rate) Sets the cardiac rate of the patient.- Parameters:
rate- the cardiac rate in beats per second
-
getTemperature
public float getTemperature()Returns the body temperature of the patient.- Returns:
- the temperature in Kelvin
-
setTemperature
public void setTemperature(float temperature) Sets the body temperature of the patient.- Parameters:
temperature- the temperature in Kelvin
-
getNormalTemperature
public float getNormalTemperature()Returns the normal body temperature for this patient's species.- Returns:
- the normal temperature in Kelvin
-
setNormalTemperature
public void setNormalTemperature(float normalTemperature) Sets the normal body temperature for this patient's species.- Parameters:
normalTemperature- the normal temperature in Kelvin
-
getRespiratoryRate
public float getRespiratoryRate()Returns the respiratory rate of the patient.- Returns:
- the respiratory rate in breaths per second
-
setRespiratoryRate
public void setRespiratoryRate(float respiratoryRate) Sets the respiratory rate of the patient.- Parameters:
respiratoryRate- the respiratory rate in breaths per second
-
getPainScale
public float getPainScale()Returns the pain scale level of the patient.- Returns:
- the pain scale value (0 to 10)
-
setPainScale
public void setPainScale(float painScale) Sets the pain scale level of the patient.- Parameters:
painScale- the pain scale value (0 to 10)
-
getBloodOxygen
public float getBloodOxygen()Returns the blood oxygen level of the patient.- Returns:
- the blood oxygen percentage
-
setBloodOxygen
public void setBloodOxygen(float bloodOxygen) Sets the blood oxygen level of the patient.- Parameters:
bloodOxygen- the blood oxygen percentage
-
getCurrentPathologies
-
setCurrentPathologies
Updates the set of current pathologies. Each element in the set must be a Pathology instance.- Parameters:
pathologies- the new set of pathologies- Throws:
NullPointerException- if the input set is null
-
addPathology
Adds a pathology to the patient's current condition.- Parameters:
pathology- the pathology to add- Throws:
NullPointerException- if the pathology is null
-
removePathology
Removes a pathology from the patient's current condition.- Parameters:
pathology- the pathology to remove
-
getTreatments
-
setTreatments
Updates the set of current treatments.- Parameters:
treatments- the new set of treatments- Throws:
NullPointerException- if the input set is null
-
addTreatment
Records a new medical treatment for the patient.- Parameters:
treatment- the treatment to record- Throws:
NullPointerException- if the treatment is null
-
removeTreatment
Removes a recorded treatment.- Parameters:
treatment- the treatment to remove
-
getMedicalReports
Returns the complete chronologically ordered list of medical records.- Returns:
- an unmodifiable view of medical records
-
addMedicalReport
-
removeMedicalReport
-
setMedicalReports
-
removeMedicalRecord
Removes a medical record from the history.- Parameters:
medicalRecord- the record to remove
-
removeLastMedicalRecord
public void removeLastMedicalRecord()Removes the most recently added medical record.- Throws:
IndexOutOfBoundsException- if there are no records to remove
-