Skip to content

Commit

Permalink
change on bp results
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald-pro committed Aug 5, 2024
1 parent 57c8292 commit d7758d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions routes/processes/nishauri_new.js
Original file line number Diff line number Diff line change
Expand Up @@ -4700,22 +4700,24 @@ router.get(
}
});

//console.log(blood_pressure);

if (blood_pressure && blood_pressure.length > 0) {
let transformedData = blood_pressure.map((bp) => {
return {
systolic: bp.systolic,
diastolic: bp.diastolic,
pulse_rate: bp.pulse_rate,
notes: bp.notes,
date_time: moment(bp.created_at).format("YYYY-MM-DD HH:mm:ss")
date_time: moment(bp.created_at).format("YYYY-MM-DD H:h:s")
};
});

});
return res.status(200).json({
success: true,
message: "User blood pressure logs retrieved successfully",
data: {
blood_pressure: transformedData,
blood_pressure: blood_pressure,
user_id: user_id
}
});
Expand Down

0 comments on commit d7758d3

Please sign in to comment.