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>

public class Patient extends Role
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:
  • Constructor Details

    • Patient

      public Patient(Individual individual, MedicalSituation situation)
      Creates a new Patient object.
      Parameters:
      individual - the individual who is a patient
      situation - the medical situation context
    • Patient

      public Patient(Individual individual)
  • 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

      public Set<Pathology> getCurrentPathologies()
      Returns the set of current pathologies affecting the patient.
      Returns:
      an unmodifiable set of current pathologies
    • setCurrentPathologies

      public void setCurrentPathologies(Set<Pathology> pathologies)
      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

      public void addPathology(Pathology pathology)
      Adds a pathology to the patient's current condition.
      Parameters:
      pathology - the pathology to add
      Throws:
      NullPointerException - if the pathology is null
    • removePathology

      public void removePathology(Pathology pathology)
      Removes a pathology from the patient's current condition.
      Parameters:
      pathology - the pathology to remove
    • getTreatments

      public Set<Treatment> getTreatments()
      Returns the set of medical treatments being administered.
      Returns:
      an unmodifiable set of treatments
    • setTreatments

      public void setTreatments(Set<Treatment> treatments)
      Updates the set of current treatments.
      Parameters:
      treatments - the new set of treatments
      Throws:
      NullPointerException - if the input set is null
    • addTreatment

      public void addTreatment(Treatment treatment)
      Records a new medical treatment for the patient.
      Parameters:
      treatment - the treatment to record
      Throws:
      NullPointerException - if the treatment is null
    • removeTreatment

      public void removeTreatment(Treatment treatment)
      Removes a recorded treatment.
      Parameters:
      treatment - the treatment to remove
    • getMedicalReports

      public List<ScientificReport> getMedicalReports()
      Returns the complete chronologically ordered list of medical records.
      Returns:
      an unmodifiable view of medical records
    • addMedicalReport

      public void addMedicalReport(ScientificReport report)
    • removeMedicalReport

      public void removeMedicalReport(ScientificReport report)
    • setMedicalReports

      public void setMedicalReports(List<ScientificReport> reports)
    • removeMedicalRecord

      public void removeMedicalRecord(ScientificReport medicalRecord)
      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