diff --git a/lib/iob/history.js b/lib/iob/history.js index 080715c2..ab680788 100644 --- a/lib/iob/history.js +++ b/lib/iob/history.js @@ -116,6 +116,15 @@ function calcTempTreatments (inputs) { temp.date = temp.started_at.getTime(); temp.insulin = current.insulin; tempBoluses.push(temp); + } else if (current.eventType == "Temp Basal" && current.enteredBy=="HAPP_App") { + var temp = {}; + temp.rate = current.absolute; + temp.duration = current.duration; + temp.timestamp = current.created_at; + temp.started_at = new Date(tz(temp.timestamp)); + temp.date = temp.started_at.getTime(); + temp.duration = current.duration; + tempHistory.push(temp); } else if (current.eventType == "Temp Basal") { var temp = {}; temp.rate = current.rate;