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
Changes from all 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
11 changes: 7 additions & 4 deletions lib/drivers/roche/accuChekUSB.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,20 +644,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 @@ -671,6 +668,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