LexBwmn / Project_3_Section1_Group3_Patient_System

1 stars 0 forks source link

Incorrect logging format in abnormalHeart.csv #9

Closed AnonimGuest closed 7 hours ago

AnonimGuest commented 7 hours ago

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.

AnonimGuest commented 7 hours ago

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.