Skip to content

Commit

Permalink
Merge pull request #58 from tidepool-org/kjq/removeSource
Browse files Browse the repository at this point in the history
Remove source attribute
  • Loading branch information
Kent Quirk committed Jan 28, 2015
2 parents ccd3aae + f0b00fd commit 30ee07d
Show file tree
Hide file tree
Showing 37 changed files with 15 additions and 110 deletions.
7 changes: 3 additions & 4 deletions lib/asanteDriver.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
* == BSD2 LICENSE ==
* Copyright (c) 2014, Tidepool Project
*
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the License for more details.
*
*
* You should have received a copy of the License along with this program; if
* not, you can obtain one from Tidepool Project at tidepool.org.
* == BSD2 LICENSE ==
Expand Down Expand Up @@ -1192,7 +1192,6 @@ module.exports = function (config) {
} else {
cfg.builder.setDefaults({
deviceId: 'Asante ' + result.model + ' ' + result.serialNumber,
source: 'device',
units: 'mg/dL' // everything we report is in this unit
});

Expand Down
5 changes: 1 addition & 4 deletions lib/drivers/abbottFreeStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,7 @@ module.exports = function (config) {
};

var prepBGData = function (progress, data) {
cfg.builder.setDefaults({
deviceId: data.id,
source: 'device'
});
cfg.builder.setDefaults({ deviceId: data.id });
var dataToPost = [];
for (var i = 0; i < data.logEntries.length; ++i) {
var datum = data.logEntries[i];
Expand Down
2 changes: 1 addition & 1 deletion lib/drivers/carelinkDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ module.exports = function(simulatorMaker, api){
device.simulator = simulatorMaker.make(
{
autoGenScheduleds: common.autoGenModels[key] ? true : false,
defaults: { source: 'carelink' }
defaults: { }
});
device.processors = initializeProcessors(cfg.timezone, key);

Expand Down
10 changes: 2 additions & 8 deletions lib/drivers/dexcomDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,7 @@ module.exports = function (config) {
var prepCBGData = function (data) {
dexcomDeviceId = getDeviceId(data);

cfg.builder.setDefaults({
deviceId: dexcomDeviceId,
source: 'device'
});
cfg.builder.setDefaults({ deviceId: dexcomDeviceId });
var dataToPost = [];
for (var i = 0; i < data.cbg_data.length; ++i) {
var datum = data.cbg_data[i];
Expand All @@ -607,10 +604,7 @@ module.exports = function (config) {
var prepMeterData = function (data) {
dexcomDeviceId = getDeviceId(data);

cfg.builder.setDefaults({
deviceId: dexcomDeviceId,
source: 'device'
});
cfg.builder.setDefaults({ deviceId: dexcomDeviceId });
var dataToPost = [];
for (var i = 0; i < data.calibration_data.length; ++i) {
var datum = data.calibration_data[i];
Expand Down
7 changes: 3 additions & 4 deletions lib/drivers/insuletDriver.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
* == BSD2 LICENSE ==
* Copyright (c) 2014, Tidepool Project
*
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the License for more details.
*
*
* You should have received a copy of the License along with this program; if
* not, you can obtain one from Tidepool Project at tidepool.org.
* == BSD2 LICENSE ==
Expand Down Expand Up @@ -996,7 +996,6 @@ module.exports = function (config) {

cfg.builder.setDefaults({
deviceId: insuletDeviceId,
source: 'device',
units: 'mg/dL' // everything the Insulet pump stores is in this unit
});

Expand Down
7 changes: 2 additions & 5 deletions lib/drivers/oneTouchMiniDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,7 @@ module.exports = function (config) {
};

var prepBGData = function (progress, data) {
cfg.builder.setDefaults({
deviceId: 'OneTouch' + data.model + '-' + data.serialNumber,
source: 'device',
units: 'mg/dL' // everything the OneTouch meter stores is in this unit
});
cfg.builder.setDefaults({ deviceId: 'OneTouch' + data.model + '-' + data.serialNumber });
var dataToPost = [];
for (var i = 0; i < data.bgmReadings.length; ++i) {
var datum = data.bgmReadings[i];
Expand All @@ -450,6 +446,7 @@ module.exports = function (config) {
.with_deviceTime(datum.displayTime)
.with_timezoneOffset(TZOFFSET / 60)
.with_time(datum.displayUtc)
.with_units('mg/dL')
.done();
dataToPost.push(smbg);
}
Expand Down
3 changes: 0 additions & 3 deletions test/carelink/basal/scheduled/normal/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"rate": 0.8,
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-13T00:29:03",
"source": "carelink",
"time": "2014-03-13T10:29:03.000Z",
"timezoneOffset": -600,
"type": "basal-scheduled",
Expand All @@ -17,7 +16,6 @@
"rate": 0.9,
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-13T05:27:15",
"source": "carelink",
"time": "2014-03-13T15:27:15.000Z",
"timezoneOffset": -600,
"type": "basal-scheduled",
Expand All @@ -29,7 +27,6 @@
"rate": 0.65,
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-14T02:00:00",
"source": "carelink",
"time": "2014-03-14T12:00:00.000Z",
"timezoneOffset": -600,
"type": "basal-scheduled",
Expand Down
3 changes: 0 additions & 3 deletions test/carelink/basal/scheduled/outOfSeq/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "basal-scheduled",
"source": "carelink",
"deviceTime": "2014-11-24T11:09:57",
"time": "2014-11-24T21:09:57.000Z",
"timezoneOffset": -600,
Expand All @@ -13,7 +12,6 @@
},
{
"type": "basal-scheduled",
"source": "carelink",
"deviceTime": "2014-11-24T11:12:27",
"time": "2014-11-24T21:12:27.000Z",
"timezoneOffset": -600,
Expand All @@ -25,7 +23,6 @@
},
{
"type": "basal-scheduled",
"source": "carelink",
"deviceTime": "2014-11-24T12:00:00",
"time": "2014-11-24T22:00:00.000Z",
"timezoneOffset": -600,
Expand Down
3 changes: 0 additions & 3 deletions test/carelink/basal/temp/percent/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-13T00:00:00",
"scheduleName": "standard",
"source": "carelink",
"timezoneOffset": -600,
"time": "2014-03-13T10:00:00.000Z",
"type": "basal-scheduled",
Expand All @@ -17,7 +16,6 @@
"deviceTime": "2014-03-13T00:28:56",
"duration": 7200000,
"percent": 0.7,
"source": "carelink",
"timezoneOffset": -600,
"time": "2014-03-13T10:28:56.000Z",
"type": "basal-temp"
Expand All @@ -27,7 +25,6 @@
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-13T00:29:03",
"scheduleName": "standard",
"source": "carelink",
"timezoneOffset": -600,
"time": "2014-03-13T10:29:03.000Z",
"type": "basal-scheduled",
Expand Down
3 changes: 0 additions & 3 deletions test/carelink/basal/temp/rate/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-13T00:00:00",
"scheduleName": "standard",
"source": "carelink",
"timezoneOffset": -600,
"time": "2014-03-13T10:00:00.000Z",
"type": "basal-scheduled",
Expand All @@ -17,7 +16,6 @@
"deviceTime": "2014-03-13T00:28:56",
"duration": 7200000,
"rate": 0.55,
"source": "carelink",
"timezoneOffset": -600,
"time": "2014-03-13T10:28:56.000Z",
"type": "basal-temp"
Expand All @@ -27,7 +25,6 @@
"deviceId": "Paradigm Revel - 723-=-53021863",
"deviceTime": "2014-03-13T00:29:03",
"scheduleName": "standard",
"source": "carelink",
"timezoneOffset": -600,
"time": "2014-03-13T10:29:03.000Z",
"type": "basal-scheduled",
Expand Down
2 changes: 0 additions & 2 deletions test/carelink/bolus/22-series/dual/withWizard/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "wizard",
"source": "carelink",
"deviceTime": "2014-05-18T18:24:10",
"time": "2014-05-19T04:24:10.000Z",
"timezoneOffset": -600,
Expand Down Expand Up @@ -36,7 +35,6 @@
},
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-05-18T18:24:10",
"time": "2014-05-19T04:24:10.000Z",
"timezoneOffset": -600,
Expand Down
1 change: 0 additions & 1 deletion test/carelink/bolus/22-series/normal/noWizard/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-05-17T22:15:59",
"time": "2014-05-18T08:15:59.000Z",
"timezoneOffset": -600,
Expand Down
2 changes: 0 additions & 2 deletions test/carelink/bolus/22-series/normal/withWizard/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "wizard",
"source": "carelink",
"deviceTime": "2014-05-17T19:47:58",
"time": "2014-05-18T05:47:58.000Z",
"timezoneOffset": -600,
Expand Down Expand Up @@ -34,7 +33,6 @@
},
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-05-17T19:47:58",
"time": "2014-05-18T05:47:58.000Z",
"timezoneOffset": -600,
Expand Down
2 changes: 0 additions & 2 deletions test/carelink/bolus/22-series/square/withWizard/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "wizard",
"source": "carelink",
"deviceTime": "2014-06-01T18:10:42",
"time": "2014-06-02T04:10:42.000Z",
"timezoneOffset": -600,
Expand Down Expand Up @@ -35,7 +34,6 @@
},
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-06-01T18:10:42",
"time": "2014-06-02T04:10:42.000Z",
"timezoneOffset": -600,
Expand Down
1 change: 0 additions & 1 deletion test/carelink/bolus/dual/noWizard/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-11-14T11:35:29",
"time": "2014-11-14T21:35:29.000Z",
"timezoneOffset": -600,
Expand Down
1 change: 0 additions & 1 deletion test/carelink/bolus/dual/noWizardNoNormal/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-11-14T10:39:03",
"time": "2014-11-14T20:39:03.000Z",
"timezoneOffset": -600,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "wizard",
"source": "carelink",
"deviceTime": "2014-09-18T18:59:37",
"time": "2014-09-19T04:59:37.000Z",
"timezoneOffset": -600,
Expand Down Expand Up @@ -41,7 +40,6 @@
},
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-09-18T18:59:38",
"time": "2014-09-19T04:59:38.000Z",
"timezoneOffset": -600,
Expand All @@ -58,7 +56,6 @@
},
{
"type": "basal-scheduled",
"source": "carelink",
"deviceTime": "2014-09-18T19:00:00",
"time": "2014-09-19T05:00:00.000Z",
"timezoneOffset": -600,
Expand Down
2 changes: 0 additions & 2 deletions test/carelink/bolus/dual/withWizard/output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "wizard",
"source": "carelink",
"deviceTime": "2014-11-14T17:36:13",
"time": "2014-11-15T03:36:13.000Z",
"timezoneOffset": -600,
Expand Down Expand Up @@ -36,7 +35,6 @@
},
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-11-14T17:36:13",
"time": "2014-11-15T03:36:13.000Z",
"timezoneOffset": -600,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"type": "wizard",
"source": "carelink",
"deviceTime": "2014-11-15T10:47:16",
"time": "2014-11-15T20:47:16.000Z",
"timezoneOffset": -600,
Expand Down Expand Up @@ -38,7 +37,6 @@
},
{
"type": "bolus",
"source": "carelink",
"deviceTime": "2014-11-15T10:47:17",
"time": "2014-11-15T20:47:17.000Z",
"timezoneOffset": -600,
Expand All @@ -52,7 +50,6 @@
},
{
"type": "suspend",
"source": "carelink",
"deviceTime": "2014-11-15T11:31:40",
"time": "2014-11-15T21:31:40.000Z",
"timezoneOffset": -600,
Expand All @@ -61,7 +58,6 @@
},
{
"type": "basal-scheduled",
"source": "carelink",
"deviceTime": "2014-11-15T11:41:36",
"time": "2014-11-15T21:41:36.000Z",
"timezoneOffset": -600,
Expand All @@ -73,7 +69,6 @@
},
{
"type": "resume",
"source": "carelink",
"deviceTime": "2014-11-15T11:41:37",
"time": "2014-11-15T21:41:37.000Z",
"timezoneOffset": -600,
Expand All @@ -82,7 +77,6 @@
},
{
"type": "basal-scheduled",
"source": "carelink",
"deviceTime": "2014-11-15T12:00:00",
"time": "2014-11-15T22:00:00.000Z",
"timezoneOffset": -600,
Expand Down
Loading

0 comments on commit 30ee07d

Please sign in to comment.