Describe the bug
The logAbnormality() function logged the measured range as “undefined” instead of “Low” or “High” when the heart rate exceeded the threshold limits. Additionally, timestamps were missing for some entries.
Expected behavior
The CSV file should log all fields accurately, including timestamp, measured range, and measured value.
Additional context
This issue was observed when simulating a heart rate of 175 bpm for Patient ID 502.
The function was updated to correctly log the measured range as "Low" or "High" based on the heart rate thresholds. Missing timestamps were fixed by including a default timestamp generator in the logging logic.
Describe the bug The logAbnormality() function logged the measured range as “undefined” instead of “Low” or “High” when the heart rate exceeded the threshold limits. Additionally, timestamps were missing for some entries.
Expected behavior The CSV file should log all fields accurately, including timestamp, measured range, and measured value.
Additional context This issue was observed when simulating a heart rate of 175 bpm for Patient ID 502.