Skip to content

Commit

Permalink
fix temperature casting
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Dec 12, 2023
1 parent 4354a4b commit 350f9d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Components/Facility/Consultations/Mews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const getSystolicBPScore = (value?: number) => {
};

const getTempRange = (value?: number) => {
console.log(value);
if (typeof value !== "number") return;

if (value < 95) return 2;
Expand Down Expand Up @@ -141,7 +142,9 @@ export const Mews = ({ dailyRound }: { dailyRound: DailyRoundsModel }) => {
"Respiratory rate": getRespScore(dailyRound.resp),
"Heart rate": getHeartRateScore(dailyRound.pulse),
"Systolic BP": getSystolicBPScore(dailyRound.bp?.systolic),
Temperature: getTempRange(Number(dailyRound.temperature)),
Temperature: getTempRange(
dailyRound.temperature ? parseFloat(dailyRound.temperature) : undefined
),
"Level of Consciousness": getLOCRange(dailyRound.consciousness_level),
};

Expand Down

0 comments on commit 350f9d9

Please sign in to comment.