better treatment BG unit handling #481

Merged
merged 2 commits into from Mar 14, 2015

Conversation

Projects
None yet
3 participants
Owner

jasoncalabrese commented Mar 14, 2015

No description provided.

@jasoncalabrese jasoncalabrese do everything we can to find a BG for a treatment; better unit conver…
…sion
86e2493

Coverage Status

Coverage remained the same at 72.69% when pulling 86e2493 on wip/treatment-bg-scale into 77f0fdc on dev.

Contributor

sulkaharo commented Mar 14, 2015

👍

@sulkaharo sulkaharo commented on an outdated diff Mar 14, 2015

static/js/client.js
});
var totalBG = 0;
closeBGs.forEach(function(d) {
- totalBG += d.y;
+ totalBG += d.y;
@sulkaharo

sulkaharo Mar 14, 2015

Contributor

This needs to be totalBG += Number(d.y); for it to work. The values are strings and mg/dl calculations fail without the parsing.

Contributor

sulkaharo commented Mar 14, 2015

Ok added one comment / fix -> with that change mixed treatment record units render correctly regardless of the display units. :)

@jasoncalabrese jasoncalabrese fix from @sulkaharo, now we should be able to correctly render treatm…
…ents no mater what BG unit is used
686e9af

Coverage Status

Coverage remained the same at 72.69% when pulling 686e9af on wip/treatment-bg-scale into 77f0fdc on dev.

@jasoncalabrese jasoncalabrese added a commit that referenced this pull request Mar 14, 2015

@jasoncalabrese jasoncalabrese Merge pull request #481 from nightscout/wip/treatment-bg-scale
better treatment BG unit handling
daab336

@jasoncalabrese jasoncalabrese merged commit daab336 into dev Mar 14, 2015

3 checks passed

continuous-integration/codeship Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

jasoncalabrese deleted the wip/treatment-bg-scale branch Mar 14, 2015

@jasoncalabrese jasoncalabrese modified the milestone: enchilada Mar 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment