Record Class VitalSigns

java.lang.Object
java.lang.Record
org.episteme.natural.medicine.VitalSigns

public record VitalSigns(Quantity<Frequency> heartRate, Quantity<Pressure> systolic, Quantity<Pressure> diastolic, Quantity<Dimensionless> spO2, Quantity<Frequency> respirationRate, Quantity<Temperature> temperature) extends Record
Immutable record representing a snapshot of vital signs. Uses the Episteme measure system for physical accuracy.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • VitalSigns

      public VitalSigns(int hr, int sys, int dia, int spo2, int rr, double temp)
    • VitalSigns

      public VitalSigns(Quantity<Frequency> heartRate, Quantity<Pressure> systolic, Quantity<Pressure> diastolic, Quantity<Dimensionless> spO2, Quantity<Frequency> respirationRate, Quantity<Temperature> temperature)
      Creates an instance of a VitalSigns record class.
      Parameters:
      heartRate - the value for the heartRate record component
      systolic - the value for the systolic record component
      diastolic - the value for the diastolic record component
      spO2 - the value for the spO2 record component
      respirationRate - the value for the respirationRate record component
      temperature - the value for the temperature record component
  • Method Details

    • bloodPressureString

      public String bloodPressureString()
      Returns blood pressure as a formatted string "systolic/diastolic".
    • temperatureString

      public String temperatureString()
      Returns temperature formatted to one decimal place.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • heartRate

      public Quantity<Frequency> heartRate()
      Returns the value of the heartRate record component.
      Returns:
      the value of the heartRate record component
    • systolic

      public Quantity<Pressure> systolic()
      Returns the value of the systolic record component.
      Returns:
      the value of the systolic record component
    • diastolic

      public Quantity<Pressure> diastolic()
      Returns the value of the diastolic record component.
      Returns:
      the value of the diastolic record component
    • spO2

      public Quantity<Dimensionless> spO2()
      Returns the value of the spO2 record component.
      Returns:
      the value of the spO2 record component
    • respirationRate

      public Quantity<Frequency> respirationRate()
      Returns the value of the respirationRate record component.
      Returns:
      the value of the respirationRate record component
    • temperature

      public Quantity<Temperature> temperature()
      Returns the value of the temperature record component.
      Returns:
      the value of the temperature record component