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 Summary
ConstructorsConstructorDescriptionVitalSigns(int hr, int sys, int dia, int spo2, int rr, double temp) VitalSigns(Quantity<Frequency> heartRate, Quantity<Pressure> systolic, Quantity<Pressure> diastolic, Quantity<Dimensionless> spO2, Quantity<Frequency> respirationRate, Quantity<Temperature> temperature) Creates an instance of aVitalSignsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns blood pressure as a formatted string "systolic/diastolic".Returns the value of thediastolicrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheartRaterecord component.Returns the value of therespirationRaterecord component.spO2()Returns the value of thespO2record component.systolic()Returns the value of thesystolicrecord component.Returns the value of thetemperaturerecord component.Returns temperature formatted to one decimal place.toString()Returns a string representation of this record class.
-
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 aVitalSignsrecord class.- Parameters:
heartRate- the value for theheartRaterecord componentsystolic- the value for thesystolicrecord componentdiastolic- the value for thediastolicrecord componentspO2- the value for thespO2record componentrespirationRate- the value for therespirationRaterecord componenttemperature- the value for thetemperaturerecord component
-
-
Method Details
-
bloodPressureString
Returns blood pressure as a formatted string "systolic/diastolic". -
temperatureString
Returns temperature formatted to one decimal place. -
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
heartRate
-
systolic
-
diastolic
-
spO2
Returns the value of thespO2record component.- Returns:
- the value of the
spO2record component
-
respirationRate
-
temperature
Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-