Skip to content

Commit

Permalink
Merge branch 'dorianscholz/electron-fslibre' into libre-rollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
krystophv committed Oct 19, 2017
2 parents c85cd04 + 5b8b770 commit 82e6869
Show file tree
Hide file tree
Showing 25 changed files with 3,551 additions and 392 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"stage-0",
"react"
],
"retainLines": true,
"plugins": ["add-module-exports"],
"env": {
"production": {
Expand All @@ -19,7 +20,13 @@
},
"test": {
"plugins": [
["resolver", { "resolveDirs": [ "app/node_modules" ]}],
[ "module-resolver", {
"root": ["./app/node_modules"],
"alias": {
"node-hid": "./app/node_modules/node-hid",
"serialport": "./app/node_modules/serialport"
}
} ],
["webpack-loaders", { "config": "webpack.config.test.js", "verbose": false }],
"babel-plugin-rewire",
["transform-define", {
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
app/dist/
app/main.js
node_modules
dist/
web/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ coverage

_book/
web/

\.vscode/
8 changes: 8 additions & 0 deletions app/reducers/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ const devices = {
source: {type: 'device', driverId: 'AbbottFreeStyleFreedomLite'},
enabled: {mac: false, win: true}
},
abbottfreestylelibre: {
instructions: '(Unsupported) Plug in meter with micro-USB cable',
key: 'abbottfreestylelibre',
name: 'Abbott FreeStyle Libre (Beta)',
showDriverLink: {linux: false, mac: false, win: false},
source: {type: 'device', driverId: 'AbbottFreeStyleLibre'},
enabled: {linux: true, mac: true, win: true}
},
bayercontournext: {
instructions: 'Plug in meter with micro-USB',
key: 'bayercontournext',
Expand Down
5 changes: 3 additions & 2 deletions docs/checklists/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Checklists for the implementation of drivers for reading data from diabetes devices currently supported or in development.

* [Abbott FreeStyle (BGM)](abbottFreeStyleLite.md)
* [Abbott FreeStyle Lite & Freedom Lite (BGM)](abbottFreeStyleLite.md)
* [Abbott FreeStyle Libre (CGM & BGM data)](abbottFreeStyleLibre.md)
* [Abbott Precision Xtra (blood glucose & ketone meter)](abbottPrecisionXtra.md)
* [Animas Vibe (CGM data)](animasCGM.md)
* [Animas Ping and Vibe Insulin Pumps](animasPingAndVibe.md)
Expand All @@ -11,4 +12,4 @@ Checklists for the implementation of drivers for reading data from diabetes devi
* [Insulet OmniPod Insulin Delivery System](insuletOmniPod.md)
* [OneTouch VerioIQ (BGM)](oneTouchVerioIQ.md)
* [Tandem Insulin Pumps](tandem.md)
* [Tandem G4 (CGM data)](tandemCGM.md)
* [Tandem G4 (CGM data)](tandemCGM.md)
147 changes: 147 additions & 0 deletions docs/checklists/abbottFreeStyleLibre.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
## Checklist for CGM Implementation

(Key:

- `[x]` available in data protocol/documented in spec and implemented
- `[-]` available in data protocol/documented in spec but *not* yet implemented
- `[?]` unknown whether available in data protocol/documented in spec; *not* yet implemented
- `*[ ]` TODO: needs implementation!
- `[ ]` unavailable in data protocol and/or not documented in spec and not yet implemented)

### Required if Present

#### CBG

- `[x]` cbg values
- `[ ]` units of cbg values (read from device, not hard-coded)
- `[x]` out-of-range values (LO or HI)
- `[x]` out-of-range value thresholds (e.g., often 40 for low and 400 for high on CGMs)

Device-specific? (Add any device-specific notes/additions here.)
- internal glucose unit is always mg/dL for this device, independent of display unit
- out-of-range thresholds are 41 mg/dL and 499 mg/dL
- out-of-range measurements are reported as values 40 or 500 respectively

#### Device Events
- `[ ]` calibrations
- `[ ]` calibration value
- `[ ]` units of calibration value (read from device, not hard-coded)
- `[x]` time changes (presence of which is also in the [BtUTC section](#bootstrapping-to-utc) below)
- `[x]` device display time `from` (before change) and `to` (result of change)
- `[x]` agent of change (`automatic` or `manual`)
- `[ ]` timezone
- `[ ]` reason for change (read from device)

Device-specific? (Add any device-specific notes/additions here.)
- device does not need calibration

#### Settings

- `[x]` units preference for BG display
- `[x]` units of data being uploaded (will be mutated to mmol/L storage units if not mmol/L)
- `[x]` transmitter ID
- `[ ]` low alert settings
- `[ ]` enabled
- `[ ]` level/threshold
- `[ ]` snooze threshold
- `[ ]` high alert settings
- `[ ]` enabled
- `[ ]` level/threshold
- `[ ]` snooze threshold
- `[ ]` rate-of-change alerts
- `[ ]` fall rate alert
- `[ ]` enabled
- `[ ]` rate threshold for alerting
- `[ ]` rise rate alert
- `[ ]` enabled
- `[ ]` rate threshold for alerting
- `[ ]` out-of-range alerts
- `[ ]` enabled
- `[ ]` snooze time between alerts
- `[ ]` predictive alerts
- `[ ]` low prediction
- `[ ]` enabled
- `[ ]` time sensitivity (minutes to predicted low for alerting)
- `[ ]` high prediction
- `[ ]` enabled
- `[ ]` time sensitivity (minutes to predicted high for alerting)
- `[ ]` calibration alerts/reminders
- `[ ]` pre-reminder
- `[ ]` overdue alert

Settings history:

- `[ ]` device stores all changes to settings OR
- `[x]` device only returns current settings at time of upload

No Tidepool data model (yet): volume and/or vibrate mode of all alerts (can/should go in `payload`).

Device-specific? (Add any device-specific notes/additions here.)

#### "Bootstrapping" to UTC

- `[x]` index
- `[ ]` UTC timestamp (*Hey, one can dream!*) OR
- `[x]` internal timestamp or persistent log index (across device communication sessions) to order all pump events (regardless of type), independent of device display time OR
- `[ ]` ephemeral log index (does not persist across device communication sessions) to order all pump events (regardless of type), independent of device display time
- `[x]` date & time settings changes

Device-specific? (Add any device-specific notes/additions here.)

### No Tidepool Data Model Yet

> **NB:** You can and should add to this section if there are other data types documented in the device's data protocol specification but not part of Tidepool's data model (yet).
- `[-]` activity/exercise
- `[-]` food (e.g., Dexcom allows logging carb events)
- `[-]` notes/other events
- `[-]` insulin (rapid acting, long term)

### Tidepool ingestion API

Choose one of the following:

- `[x]` legacy "jellyfish" ingestion API
- `*[ ]` platform ingestion API

### Known implementation issues/TODOs

*Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*


## Checklist for Blood Glucose Meter Implementation

### Required if Present

- `[x]` smbg values
- `[ ]` units of smbg values (read from device, not hard-coded)
- `[x]` out-of-range values (LO or HI)
- `[x]` out-of-range value thresholds (e.g., often 20 for low and 600 for high on BGMs)
- `[x]` date & time settings changes
- `[x]` blood ketone values
- `[ ]` units of blood ketone values (read from device, not hard-coded)
- `[x]` ketone out-of-range values
- `[x]` ketone out-of-range value thresholds

Device-specific? (Add any device-specific notes/additions here.)
- internal glucose unit is always mg/dL for this device, independent of display unit
- glucose out-of-range thresholds are 41 mg/dL and 499 mg/dL
- glucose out-of-range measurements are reported as values 40 or 500 respectively
- ketone out-of-range upper threshold is 8.0 mmol/L

### No Tidepool Data Model Yet

- `[x]` control (solution) tests (whether marked in UI or auto-detected) - until we have a data model, these should be discarded
- `[-]` device settings, other than date & time (e.g., target blood glucose range)
- `[-]` tag/note (e.g., pre- vs. post-meal)

### Tidepool ingestion API

Choose one of the following:

- `[x]` legacy "jellyfish" ingestion API
- `*[ ]` platform ingestion API

### Known implementation issues/TODOs

*Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
4 changes: 0 additions & 4 deletions docs/checklisttemplates/CGMChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,4 @@ Choose one of the following:

### Known implementation issues/TODOs

Add any device-specific known issues or implementation TODOs here in checklist format.

### Known implementation issues/TODOs

*Use this space to describe device-specific known issues or implementation TODOs **not** contained in the above datatype-specific sections.*
3 changes: 3 additions & 0 deletions lib/core/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var insuletOmniPod = require('../drivers/insulet/insuletDriver');
var oneTouchUltra2 = require('../drivers/onetouch/oneTouchUltra2');
var oneTouchVerioIQ = require('../drivers/onetouch/oneTouchVerioIQ');
var abbottFreeStyleLite = require('../drivers/abbott/abbottFreeStyleLite');
var abbottFreeStyleLibre = require('../drivers/abbott/abbottFreeStyleLibre');
var bayerContourNext = require('../drivers/bayer/bayerContourNext');
var animasDriver = require('../drivers/animas/animasDriver');
var medtronicDriver = require('../drivers/medtronic/medtronicDriver');
Expand All @@ -60,6 +61,7 @@ device._deviceDrivers = {
'OneTouchVerioIQ': oneTouchVerioIQ,
'AbbottFreeStyleLite': abbottFreeStyleLite,
'AbbottFreeStyleFreedomLite': abbottFreeStyleLite,
'AbbottFreeStyleLibre': abbottFreeStyleLibre,
'BayerContourNext': bayerContourNext,
'BayerContourNextUsb': bayerContourNext,
'BayerContourUsb': bayerContourNext,
Expand All @@ -76,6 +78,7 @@ device._deviceComms = {
'OneTouchVerioIQ': serialDevice,
'AbbottFreeStyleLite': serialDevice,
'AbbottFreeStyleFreedomLite': serialDevice,
'AbbottFreeStyleLibre': hidDevice,
'Tandem': serialDevice,
'BayerContourNext': hidDevice,
'BayerContourNextUsb': hidDevice,
Expand Down
61 changes: 61 additions & 0 deletions lib/drivers/abbott/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"extends": "airbnb",
"parser": "babel-eslint",
"plugins": ["lodash"],
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
]
},
"overrides": [
{
"files": [
"abbottFreeStyleLite.js",
"abbottPrecisionXtra.js"
],
"rules": {
"func-names": "warn",
"no-var": "warn",
"vars-on-top": "warn",
"no-unused-vars": "warn",
"object-shorthand": "warn",
"comma-dangle": "warn",
"space-before-function-paren": "warn",
"no-param-reassign": "warn",
"prefer-template": "warn",
"no-useless-escape": "warn",
"keyword-spacing": "warn",
"indent": "warn",
"spaced-comment": "warn",
"eqeqeq": "warn",
"space-infix-ops": "warn",
"prefer-arrow-callback": "warn",
"no-shadow": "warn",
"array-bracket-spacing": "warn",
"no-use-before-define": "warn",
"no-else-return": "warn",
"no-bitwise": "warn",
"consistent-return": "warn",
"no-plusplus": "warn",
"no-continue": "warn",
"no-loop-func": "warn",
"object-curly-spacing": "warn",
"key-spacing": "warn",
"padded-blocks": "warn",
"no-console": "warn",
"no-multi-spaces": "warn",
"no-mixed-operators": "warn",
"max-len": "warn"
}
}
],
"settings": {
"lodash": 3
}
}
Loading

0 comments on commit 82e6869

Please sign in to comment.