Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accu-chek threshold is not known (UPLOAD-869) #1624

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tidepool-uploader",
"productName": "tidepool-uploader",
"version": "2.57.0",
"version": "2.57.0-accu-chek-threshold.1",
"description": "Tidepool Project Universal Uploader",
"main": "./main.prod.js",
"author": {
Expand Down
11 changes: 7 additions & 4 deletions lib/drivers/roche/accuChekUSB.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,20 +638,17 @@ module.exports = (config) => {
const record = result;
let annotation = null;

// According to user manual, HI > 600 and LO < 20
if (record.value === 0x07FE) { // +INFINITY
record.value = 601;
annotation = {
code: 'bg/out-of-range',
value: 'high',
threshold: 600,
};
} else if (record.value === 0x0802) { // -INFINITY
record.value = 19;
record.value = 9; // value below known Accu-chek minimum
annotation = {
code: 'bg/out-of-range',
value: 'low',
threshold: 20,
};
}

Expand All @@ -665,6 +662,12 @@ module.exports = (config) => {

if (annotation) {
annotate.annotateEvent(recordBuilder, annotation);
// BG treshold values are not provided, and we know there are meters
// with different thresholds, e.g. Accu-chek Instant range is 10-600mg/dL
// vs 20-600mg/dL for other meters, so we annotate that threshold is unknown
annotate.annotateEvent(recordBuilder, {
code: 'bg/unknown-value',
});
}

const postRecord = recordBuilder.done();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tidepool-uploader",
"version": "2.57.0",
"version": "2.57.0-accu-chek-threshold.1",
"description": "Tidepool Project Universal Uploader",
"private": true,
"main": "main.prod.js",
Expand Down