nightscout
Version:
Nightscout acts as a web-based CGM (Continuous Glucose Monitor) to allow multiple caregivers to remotely view a patients glucose data in realtime.
20 lines (15 loc) • 382 B
JavaScript
;
var consts = require('./constants');
function mgdlToMMOL(mgdl) {
return (Math.round((mgdl / consts.MMOL_TO_MGDL) * 10) / 10).toFixed(1);
}
function mmolToMgdl(mgdl) {
return Math.round(mgdl * consts.MMOL_TO_MGDL);
}
function configure() {
return {
mgdlToMMOL: mgdlToMMOL
, mmolToMgdl: mmolToMgdl
};
}
module.exports = configure;