@ovok/native 1.17.0-dev.2245 → 1.17.0-dev.2249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-reading-sink.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-reading-sink.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/urine-measurements.js +40 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/urine-measurements.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/families/built-in.js +3 -2
- package/lib/commonjs/modules/next/bluetooth/families/built-in.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/families/contec-bt/models.js +1 -1
- package/lib/commonjs/modules/next/bluetooth/families/contec-bt/models.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/contec-urine.js +17 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/contec-urine.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/frame.js +66 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/frame.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/models.js +11 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/models.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/protocol.js +106 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/protocol.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/session.js +58 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/session.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/strip-result.js +123 -0
- package/lib/commonjs/modules/next/bluetooth/families/contec-urine/strip-result.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-reading-sink.js +2 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-reading-sink.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/urine-measurements.js +37 -0
- package/lib/module/modules/next/bluetooth/adapters/urine-measurements.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/measurement-type.js.map +1 -1
- package/lib/module/modules/next/bluetooth/families/built-in.js +3 -2
- package/lib/module/modules/next/bluetooth/families/built-in.js.map +1 -1
- package/lib/module/modules/next/bluetooth/families/contec-bt/models.js +1 -1
- package/lib/module/modules/next/bluetooth/families/contec-bt/models.js.map +1 -1
- package/lib/module/modules/next/bluetooth/families/contec-urine/contec-urine.js +9 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/contec-urine.js.map +1 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/frame.js +60 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/frame.js.map +1 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/models.js +9 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/models.js.map +1 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/protocol.js +103 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/protocol.js.map +1 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/session.js +55 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/session.js.map +1 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/strip-result.js +120 -0
- package/lib/module/modules/next/bluetooth/families/contec-urine/strip-result.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/urine-measurements.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/urine-measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/measurement-type.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/measurement-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/built-in.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-bt/models.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/frame.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/models.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/models.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/session.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/strip-result.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/strip-result.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/urine-measurements.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/urine-measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/measurement-type.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/measurement-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/families/built-in.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-bt/models.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/frame.d.ts +33 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/frame.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/models.d.ts +5 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/models.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/session.d.ts +17 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/strip-result.d.ts +5 -0
- package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/strip-result.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DeviceError } from "../../core/errors.js";
|
|
4
|
+
import { listenToFrames, writeFrame } from "../frame-tools/frame-link.js";
|
|
5
|
+
import { Inbox } from "../sig/waiting.js";
|
|
6
|
+
import { COMMAND_CHARACTERISTIC, commandFrame, REPLY_CHARACTERISTIC, REPLY_FRAMING, URINE_SERVICE } from "./frame.js";
|
|
7
|
+
|
|
8
|
+
/** PHMS gives up on the analyzer after 5 s without a reply. */
|
|
9
|
+
const REPLY_TIMEOUT_MS = 5_000;
|
|
10
|
+
|
|
11
|
+
/** One open link: commands out, and the analyzer's frames in the order they arrive. */
|
|
12
|
+
|
|
13
|
+
/** Listens to the analyzer, which answers one command at a time. */
|
|
14
|
+
const openSession = async ({
|
|
15
|
+
link
|
|
16
|
+
}) => {
|
|
17
|
+
const frames = new Inbox();
|
|
18
|
+
let dropped = false;
|
|
19
|
+
const stopListening = await listenToFrames(link, [{
|
|
20
|
+
service: URINE_SERVICE,
|
|
21
|
+
characteristic: REPLY_CHARACTERISTIC,
|
|
22
|
+
framing: REPLY_FRAMING
|
|
23
|
+
}], {
|
|
24
|
+
onFrame: frame => frames.push(frame),
|
|
25
|
+
onDisconnect: () => {
|
|
26
|
+
dropped = true;
|
|
27
|
+
frames.close();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const send = command => writeFrame(link, URINE_SERVICE, COMMAND_CHARACTERISTIC, commandFrame(command));
|
|
31
|
+
const next = async (...headers) => {
|
|
32
|
+
const frame = await frames.take(REPLY_TIMEOUT_MS);
|
|
33
|
+
if (frame === undefined) {
|
|
34
|
+
throw dropped ? new DeviceError("disconnected", "The urine analyzer dropped the link") : new DeviceError("timeout", "The urine analyzer did not answer");
|
|
35
|
+
}
|
|
36
|
+
if (!headers.includes(frame[0] ?? 0)) {
|
|
37
|
+
throw new DeviceError("protocol", "The urine analyzer answered out of turn");
|
|
38
|
+
}
|
|
39
|
+
return frame;
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
send,
|
|
43
|
+
next,
|
|
44
|
+
request: async (command, ...headers) => {
|
|
45
|
+
await send(command);
|
|
46
|
+
return next(...headers);
|
|
47
|
+
},
|
|
48
|
+
stop: () => {
|
|
49
|
+
stopListening();
|
|
50
|
+
frames.close();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export { openSession };
|
|
55
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DeviceError","listenToFrames","writeFrame","Inbox","COMMAND_CHARACTERISTIC","commandFrame","REPLY_CHARACTERISTIC","REPLY_FRAMING","URINE_SERVICE","REPLY_TIMEOUT_MS","openSession","link","frames","dropped","stopListening","service","characteristic","framing","onFrame","frame","push","onDisconnect","close","send","command","next","headers","take","undefined","includes","request","stop"],"sourceRoot":"../../../../../../../src","sources":["modules/next/bluetooth/families/contec-urine/session.ts"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AAQ,CAACV,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;MACpC,MAAM,IAAInB,WAAW,CAAC,UAAU,EAAE,yCAAyC,CAAC;IAC9E;IAEA,OAAOmB,KAAK;EACd,CAAC;EAED,OAAO;IACLI,IAAI;IACJE,IAAI;IACJK,OAAO,EAAE,MAAAA,CAAON,OAAO,EAAE,GAAGE,OAAO,KAAK;MACtC,MAAMH,IAAI,CAACC,OAAO,CAAC;MAEnB,OAAOC,IAAI,CAAC,GAAGC,OAAO,CAAC;IACzB,CAAC;IACDK,IAAI,EAAEA,CAAA,KAAM;MACVjB,aAAa,CAAC,CAAC;MACfF,MAAM,CAACU,KAAK,CAAC,CAAC;IAChB;EACF,CAAC;AACH,CAAC;AAED,SAASZ,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hex } from "../../codec/bytes.js";
|
|
4
|
+
import { YEAR_BASE } from "./frame.js";
|
|
5
|
+
|
|
6
|
+
/** Where a result keeps the time the strip was read: year, month, day, hour, minute and second, a byte each. */
|
|
7
|
+
const TIME_AT = 2;
|
|
8
|
+
const TIME_MASKS = [0x7f, 0x0f, 0x1f, 0x1f, 0x3f, 0x3f];
|
|
9
|
+
|
|
10
|
+
/** Where the grades start: two 3-bit grade indexes a byte, low bits first; the byte after them is the sum. */
|
|
11
|
+
const GRADES_AT = 8;
|
|
12
|
+
const GRADE_BITS = 3;
|
|
13
|
+
const GRADE_MASK = 0x07;
|
|
14
|
+
const GRADES_PER_BYTE = 2;
|
|
15
|
+
const GRADES_END = 15;
|
|
16
|
+
|
|
17
|
+
/** The grade index of an analyte the strip has no pad for. */
|
|
18
|
+
const NOT_TESTED = 7;
|
|
19
|
+
/** Each analyte in the result's order, with the conventional value of each grade as the device's tables give it. */
|
|
20
|
+
const ANALYTES = [{
|
|
21
|
+
metric: "urine_urobilinogen",
|
|
22
|
+
unit: "mg/dL",
|
|
23
|
+
valueByGrade: [0.2, 2, 4, 8]
|
|
24
|
+
}, {
|
|
25
|
+
metric: "urine_blood",
|
|
26
|
+
unit: "/uL",
|
|
27
|
+
valueByGrade: [0, 10, 25, 50, 250]
|
|
28
|
+
}, {
|
|
29
|
+
metric: "urine_bilirubin",
|
|
30
|
+
unit: "mg/dL",
|
|
31
|
+
valueByGrade: [0, 1, 3, 6]
|
|
32
|
+
}, {
|
|
33
|
+
metric: "urine_ketones",
|
|
34
|
+
unit: "mg/dL",
|
|
35
|
+
valueByGrade: [0, 15, 40, 80]
|
|
36
|
+
}, {
|
|
37
|
+
metric: "urine_glucose",
|
|
38
|
+
unit: "mg/dL",
|
|
39
|
+
valueByGrade: [0, 50, 100, 250, 500, 1000]
|
|
40
|
+
}, {
|
|
41
|
+
metric: "urine_protein",
|
|
42
|
+
unit: "mg/dL",
|
|
43
|
+
valueByGrade: [0, 15, 30, 100, 300]
|
|
44
|
+
}, {
|
|
45
|
+
metric: "urine_ph",
|
|
46
|
+
unit: "[pH]",
|
|
47
|
+
valueByGrade: [5, 6, 7, 8, 9]
|
|
48
|
+
}, {
|
|
49
|
+
metric: "urine_nitrite",
|
|
50
|
+
unit: "mg/dL",
|
|
51
|
+
valueByGrade: [0, 0.12]
|
|
52
|
+
}, {
|
|
53
|
+
metric: "urine_leukocytes",
|
|
54
|
+
unit: "/uL",
|
|
55
|
+
valueByGrade: [0, 15, 70, 125, 500]
|
|
56
|
+
}, {
|
|
57
|
+
metric: "urine_specific_gravity",
|
|
58
|
+
unit: "1",
|
|
59
|
+
valueByGrade: [1.005, 1.01, 1.015, 1.02, 1.025, 1.03]
|
|
60
|
+
}, {
|
|
61
|
+
metric: "urine_ascorbic_acid",
|
|
62
|
+
unit: "mg/dL",
|
|
63
|
+
valueByGrade: [0, 10, 25, 50, 100]
|
|
64
|
+
}, {
|
|
65
|
+
metric: "urine_microalbumin",
|
|
66
|
+
unit: "mg/dL",
|
|
67
|
+
valueByGrade: [1, 3, 8, 15]
|
|
68
|
+
}, {
|
|
69
|
+
metric: "urine_creatinine",
|
|
70
|
+
unit: "mg/dL",
|
|
71
|
+
valueByGrade: [10, 50, 100, 200, 300]
|
|
72
|
+
}, {
|
|
73
|
+
metric: "urine_calcium",
|
|
74
|
+
unit: "mg/dL",
|
|
75
|
+
valueByGrade: [2, 5, 15, 50]
|
|
76
|
+
}];
|
|
77
|
+
const gradeOf = (frame, index) => {
|
|
78
|
+
const byte = frame[GRADES_AT + Math.floor(index / GRADES_PER_BYTE)] ?? 0;
|
|
79
|
+
return byte >> index % GRADES_PER_BYTE * GRADE_BITS & GRADE_MASK;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** The measured analytes; one without a pad, or with a grade past its table, is left out. */
|
|
83
|
+
const valuesOf = frame => Object.fromEntries(ANALYTES.flatMap(({
|
|
84
|
+
metric,
|
|
85
|
+
unit,
|
|
86
|
+
valueByGrade
|
|
87
|
+
}, index) => {
|
|
88
|
+
const grade = gradeOf(frame, index);
|
|
89
|
+
const value = grade === NOT_TESTED ? undefined : valueByGrade[grade];
|
|
90
|
+
return value === undefined ? [] : [[metric, {
|
|
91
|
+
value,
|
|
92
|
+
unit
|
|
93
|
+
}]];
|
|
94
|
+
}));
|
|
95
|
+
|
|
96
|
+
/** The time the strip was read by the analyzer's clock; `null` when that clock held no real date. */
|
|
97
|
+
const takenAtOf = frame => {
|
|
98
|
+
const fields = TIME_MASKS.map((mask, at) => (frame[TIME_AT + at] ?? 0) & mask);
|
|
99
|
+
const [year = 0, month = 0, day = 0, hour = 0, minute = 0, second = 0] = fields;
|
|
100
|
+
const date = new Date(YEAR_BASE + year, month - 1, day, hour, minute, second);
|
|
101
|
+
const kept = [date.getFullYear() - YEAR_BASE, date.getMonth() + 1, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()];
|
|
102
|
+
return kept.every((field, at) => field === fields[at]) ? date : null;
|
|
103
|
+
};
|
|
104
|
+
const readingOf = frame => ({
|
|
105
|
+
type: "urine_test",
|
|
106
|
+
takenAt: takenAtOf(frame),
|
|
107
|
+
values: valuesOf(frame),
|
|
108
|
+
deviceFlags: []
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** The analyzer numbers a result only by its place in one transfer: its time and grades name it. */
|
|
112
|
+
const idOf = frame => hex(frame.subarray(TIME_AT, GRADES_END));
|
|
113
|
+
|
|
114
|
+
/** One stored strip result, from the frame that carries it. */
|
|
115
|
+
const stripResultOf = frame => ({
|
|
116
|
+
id: idOf(frame),
|
|
117
|
+
reading: readingOf(frame)
|
|
118
|
+
});
|
|
119
|
+
export { stripResultOf };
|
|
120
|
+
//# sourceMappingURL=strip-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hex","YEAR_BASE","TIME_AT","TIME_MASKS","GRADES_AT","GRADE_BITS","GRADE_MASK","GRADES_PER_BYTE","GRADES_END","NOT_TESTED","ANALYTES","metric","unit","valueByGrade","gradeOf","frame","index","byte","Math","floor","valuesOf","Object","fromEntries","flatMap","grade","value","undefined","takenAtOf","fields","map","mask","at","year","month","day","hour","minute","second","date","Date","kept","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","every","field","readingOf","type","takenAt","values","deviceFlags","idOf","subarray","stripResultOf","id","reading"],"sourceRoot":"../../../../../../../src","sources":["modules/next/bluetooth/families/contec-urine/strip-result.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,sBAAmB;AAKvC,SAASC,SAAS,QAAQ,YAAS;;AAEnC;AACA,MAAMC,OAAO,GAAG,CAAC;AACjB,MAAMC,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU;;AAEhE;AACA,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,UAAU,GAAG,CAAC;AACpB,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,eAAe,GAAG,CAAC;AACzB,MAAMC,UAAU,GAAG,EAAE;;AAErB;A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C,KAAK,EAAEjB,EAAE,KAAKiB,KAAK,KAAKpB,MAAM,CAACG,EAAE,CAAC,CAAC,GAAGO,IAAI,GAAG,IAAI;AACtE,CAAC;AAED,MAAMW,SAAS,GAAIlC,KAAiB,KAAsB;EACxDmC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAExB,SAAS,CAACZ,KAAK,CAAC;EACzBqC,MAAM,EAAEhC,QAAQ,CAACL,KAAK,CAAC;EACvBsC,WAAW,EAAE;AACf,CAAC,CAAC;;AAEF;AACA,MAAMC,IAAI,GAAIvC,KAAiB,IAAaf,GAAG,CAACe,KAAK,CAACwC,QAAQ,CAACrD,OAAO,EAAEM,UAAU,CAAC,CAAC;;AAEpF;AACA,MAAMgD,aAAa,GAAIzC,KAAiB,KAAqB;EAAE0C,EAAE,EAAEH,IAAI,CAACvC,KAAK,CAAC;EAAE2C,OAAO,EAAET,SAAS,CAAClC,KAAK;AAAE,CAAC,CAAC;AAE5G,SAASyC,aAAa","ignoreList":[]}
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ovok-reading-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-reading-sink.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAmB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAyB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ovok-reading-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-reading-sink.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAmB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAyB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AA0IhF,uHAAuH;AACvH,KAAK,cAAc,GAAG,kBAAkB,CAAC;AA6CzC;;;;GAIG;AACH,QAAA,MAAM,eAAe,GAAI,QAAQ,cAAc,EAAE,WAAW,QAAQ,KAAG,WAsBrE,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UrineAnalyzeMeasurement } from "@ovok/core/next";
|
|
2
|
+
import { Reading } from "../core/reading";
|
|
3
|
+
/** A strip result already comes in Ovok's units; one without any analyte Ovok keeps cannot be saved. */
|
|
4
|
+
declare const urineAnalysis: (reading: Reading) => UrineAnalyzeMeasurement | undefined;
|
|
5
|
+
export { urineAnalysis };
|
|
6
|
+
//# sourceMappingURL=urine-measurements.d.ts.map
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/urine-measurements.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urine-measurements.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/urine-measurements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG9E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAqB1C,wGAAwG;AACxG,QAAA,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,uBAAuB,GAAG,SAenE,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ declare const MEASUREMENT_TYPES: readonly ["activity", "alcohol_content", "auscu
|
|
|
2
2
|
/** What a device measures. */
|
|
3
3
|
type MeasurementType = (typeof MEASUREMENT_TYPES)[number];
|
|
4
4
|
/** What one value in a reading is. */
|
|
5
|
-
type MetricCode = "systolic" | "diastolic" | "mean_arterial_pressure" | "cuff_pressure" | "pulse_rate" | "heart_rate" | "fetal_heart_rate" | "ecg_qrs_duration" | "ecg_qtc_interval" | "pvc_count" | "energy_expended" | "blood_glucose" | "blood_ketone" | "blood_uric_acid" | "blood_cholesterol" | "hdl_cholesterol" | "ldl_cholesterol" | "triglycerides" | "blood_lactate" | "hemoglobin" | "hematocrit" | "body_weight" | "body_height" | "bmi" | "body_fat_percent" | "body_water_percent" | "muscle_percent" | "muscle_mass" | "fat_free_mass" | "soft_lean_mass" | "body_water_mass" | "bone_mass" | "visceral_fat" | "basal_metabolic_rate" | "metabolic_age" | "impedance" | "body_temperature" | "spo2" | "perfusion_index" | "pulse_amplitude_index" | "respiration_rate" | "fvc" | "fev1" | "fev1_fvc_ratio" | "pef" | "fef25_75" | "steps" | "distance" | "active_energy";
|
|
5
|
+
type MetricCode = "systolic" | "diastolic" | "mean_arterial_pressure" | "cuff_pressure" | "pulse_rate" | "heart_rate" | "fetal_heart_rate" | "ecg_qrs_duration" | "ecg_qtc_interval" | "pvc_count" | "energy_expended" | "blood_glucose" | "blood_ketone" | "blood_uric_acid" | "blood_cholesterol" | "hdl_cholesterol" | "ldl_cholesterol" | "triglycerides" | "blood_lactate" | "hemoglobin" | "hematocrit" | "body_weight" | "body_height" | "bmi" | "body_fat_percent" | "body_water_percent" | "muscle_percent" | "muscle_mass" | "fat_free_mass" | "soft_lean_mass" | "body_water_mass" | "bone_mass" | "visceral_fat" | "basal_metabolic_rate" | "metabolic_age" | "impedance" | "body_temperature" | "spo2" | "perfusion_index" | "pulse_amplitude_index" | "respiration_rate" | "fvc" | "fev1" | "fev1_fvc_ratio" | "pef" | "fef25_75" | "steps" | "distance" | "active_energy" | "urine_urobilinogen" | "urine_blood" | "urine_bilirubin" | "urine_ketones" | "urine_glucose" | "urine_protein" | "urine_ph" | "urine_nitrite" | "urine_leukocytes" | "urine_specific_gravity" | "urine_ascorbic_acid" | "urine_microalbumin" | "urine_creatinine" | "urine_calcium";
|
|
6
6
|
export { MEASUREMENT_TYPES };
|
|
7
7
|
export type { MeasurementType, MetricCode };
|
|
8
8
|
//# sourceMappingURL=measurement-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measurement-type.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/measurement-type.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,0kBAqCb,CAAC;AAEX,8BAA8B;AAC9B,KAAK,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,sCAAsC;AACtC,KAAK,UAAU,GACX,UAAU,GACV,WAAW,GACX,wBAAwB,GACxB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,KAAK,GACL,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,cAAc,GACd,sBAAsB,GACtB,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,KAAK,GACL,UAAU,GACV,OAAO,GACP,UAAU,GACV,eAAe,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"measurement-type.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/measurement-type.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,0kBAqCb,CAAC;AAEX,8BAA8B;AAC9B,KAAK,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,sCAAsC;AACtC,KAAK,UAAU,GACX,UAAU,GACV,WAAW,GACX,wBAAwB,GACxB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,KAAK,GACL,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,cAAc,GACd,sBAAsB,GACtB,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,KAAK,GACL,UAAU,GACV,OAAO,GACP,UAAU,GACV,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,eAAe,GACf,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,wBAAwB,GACxB,qBAAqB,GACrB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqFlD,6FAA6F;AAC7F,QAAA,MAAM,eAAe,EAAE,SAAS,WAAW,EAkFzC,CAAC;AAEH,6CAA6C;AAC7C,QAAA,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAkFhD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-bt/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-bt/models.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAkBjD,mHAAmH;AACnH,QAAA,MAAM,gBAAgB,EAAE,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-bt/models.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAkBjD,mHAAmH;AACnH,QAAA,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAS3C,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DeviceProtocol } from "../../core/protocol";
|
|
2
|
+
import { CONTEC_URINE_MODELS } from "./models";
|
|
3
|
+
/** The protocols of Contec's urine analyzers. */
|
|
4
|
+
declare const CONTEC_URINE_PROTOCOLS: readonly DeviceProtocol[];
|
|
5
|
+
export { CONTEC_URINE_MODELS, CONTEC_URINE_PROTOCOLS };
|
|
6
|
+
//# sourceMappingURL=contec-urine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contec-urine.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/contec-urine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,iDAAiD;AACjD,QAAA,MAAM,sBAAsB,EAAE,SAAS,cAAc,EAAqB,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Framing } from "../frame-tools/frame-stream";
|
|
2
|
+
declare const URINE_SERVICE: string;
|
|
3
|
+
declare const COMMAND_CHARACTERISTIC: string;
|
|
4
|
+
declare const REPLY_CHARACTERISTIC: string;
|
|
5
|
+
/** The analyzer counts its years from 2000. */
|
|
6
|
+
declare const YEAR_BASE = 2000;
|
|
7
|
+
/** The commands without their sum; setting the clock adds the time to `setTime`. */
|
|
8
|
+
declare const COMMAND: {
|
|
9
|
+
readonly reset: readonly [128];
|
|
10
|
+
readonly version: readonly [130];
|
|
11
|
+
readonly setTime: readonly [131];
|
|
12
|
+
readonly counts: readonly [144, 0];
|
|
13
|
+
readonly records: readonly [146, 0];
|
|
14
|
+
readonly nextGroup: readonly [146, 1];
|
|
15
|
+
readonly uploaded: readonly [146, 126];
|
|
16
|
+
};
|
|
17
|
+
/** The header of each reply in use; a stored result comes alone (`record`) or in a group of up to ten (`groupRecord`). */
|
|
18
|
+
declare const REPLY: {
|
|
19
|
+
readonly reset: 240;
|
|
20
|
+
readonly version: 242;
|
|
21
|
+
readonly setTime: 243;
|
|
22
|
+
readonly counts: 224;
|
|
23
|
+
readonly record: 225;
|
|
24
|
+
readonly groupRecord: 226;
|
|
25
|
+
};
|
|
26
|
+
/** A command frame: its bytes and their 7-bit sum. */
|
|
27
|
+
declare const commandFrame: (bytes: readonly number[]) => Uint8Array;
|
|
28
|
+
/** The 14-bit word at `at`: two 7-bit bytes, low first. */
|
|
29
|
+
declare const wordAt: (bytes: Uint8Array, at: number) => number;
|
|
30
|
+
/** Cuts a reply by its header's size and sum; any other byte, such as the version text firmware 1.0.0 trails, is dropped. */
|
|
31
|
+
declare const REPLY_FRAMING: Framing;
|
|
32
|
+
export { COMMAND, COMMAND_CHARACTERISTIC, commandFrame, REPLY, REPLY_CHARACTERISTIC, REPLY_FRAMING, URINE_SERVICE, wordAt, YEAR_BASE };
|
|
33
|
+
//# sourceMappingURL=frame.d.ts.map
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/frame.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/frame.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,OAAO,EAAgB,MAAM,6BAA6B,CAAC;AAG7E,QAAA,MAAM,aAAa,QAAmB,CAAC;AACvC,QAAA,MAAM,sBAAsB,QAAmB,CAAC;AAChD,QAAA,MAAM,oBAAoB,QAAmB,CAAC;AAK9C,+CAA+C;AAC/C,QAAA,MAAM,SAAS,OAAO,CAAC;AAEvB,oFAAoF;AACpF,QAAA,MAAM,OAAO;;;;;;;;CAQH,CAAC;AAEX,0HAA0H;AAC1H,QAAA,MAAM,KAAK;;;;;;;CAAwG,CAAC;AAepH,sDAAsD;AACtD,QAAA,MAAM,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,UAAsD,CAAC;AAExG,2DAA2D;AAC3D,QAAA,MAAM,MAAM,GAAI,OAAO,UAAU,EAAE,IAAI,MAAM,KAAG,MAC+C,CAAC;AAEhG,6HAA6H;AAC7H,QAAA,MAAM,aAAa,EAAE,OAWpB,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/models.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,4DAA4D;AAC5D,QAAA,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAAmF,CAAC;AAEnI,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DeviceProtocol } from "../../core/protocol";
|
|
2
|
+
import { UrineConnection } from "./session";
|
|
3
|
+
/** The Contec BC401BT urine analyzer: firmware, a clock, and the strip results stored in it. */
|
|
4
|
+
declare const BC401_PROTOCOL: DeviceProtocol<UrineConnection>;
|
|
5
|
+
export { BC401_PROTOCOL };
|
|
6
|
+
//# sourceMappingURL=protocol.d.ts.map
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/protocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAkC,MAAM,qBAAqB,CAAC;AAGrF,OAAO,EAAe,eAAe,EAAE,MAAM,WAAW,CAAC;AAyGzD,gGAAgG;AAChG,QAAA,MAAM,cAAc,EAAE,cAAc,CAAC,eAAe,CAQnD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProtocolContext } from "../../core/protocol";
|
|
2
|
+
/** One open link: commands out, and the analyzer's frames in the order they arrive. */
|
|
3
|
+
type UrineConnection = {
|
|
4
|
+
/** Sends a command; its sum is added. */
|
|
5
|
+
send: (command: readonly number[]) => Promise<void>;
|
|
6
|
+
/** The next frame, which must carry one of `headers`; the analyzer pushes a group's results without being asked. */
|
|
7
|
+
next: (...headers: readonly number[]) => Promise<Uint8Array>;
|
|
8
|
+
/** Sends a command and resolves with its reply, which must carry one of `headers`. */
|
|
9
|
+
request: (command: readonly number[], ...headers: readonly number[]) => Promise<Uint8Array>;
|
|
10
|
+
/** Stops listening. */
|
|
11
|
+
stop: () => void;
|
|
12
|
+
};
|
|
13
|
+
/** Listens to the analyzer, which answers one command at a time. */
|
|
14
|
+
declare const openSession: ({ link }: ProtocolContext) => Promise<UrineConnection>;
|
|
15
|
+
export { openSession };
|
|
16
|
+
export type { UrineConnection };
|
|
17
|
+
//# sourceMappingURL=session.d.ts.map
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/families/contec-urine/session.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAStD,uFAAuF;AACvF,KAAK,eAAe,GAAG;IAErB,yCAAyC;IACzC,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD,oHAAoH;IACpH,IAAI,EAAE,CAAC,GAAG,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7D,sFAAsF;IACtF,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAE5F,uBAAuB;IACvB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,oEAAoE;AACpE,QAAA,MAAM,WAAW,GAAU,UAAU,eAAe,KAAG,OAAO,CAAC,eAAe,CA+C7E,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-result.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/strip-result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4EpD,+DAA+D;AAC/D,QAAA,MAAM,aAAa,GAAI,OAAO,UAAU,KAAG,aAAiE,CAAC;AAE7G,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ovok-reading-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-reading-sink.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAmB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAyB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ovok-reading-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-reading-sink.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAmB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAyB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AA0IhF,uHAAuH;AACvH,KAAK,cAAc,GAAG,kBAAkB,CAAC;AA6CzC;;;;GAIG;AACH,QAAA,MAAM,eAAe,GAAI,QAAQ,cAAc,EAAE,WAAW,QAAQ,KAAG,WAsBrE,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UrineAnalyzeMeasurement } from "@ovok/core/next";
|
|
2
|
+
import { Reading } from "../core/reading";
|
|
3
|
+
/** A strip result already comes in Ovok's units; one without any analyte Ovok keeps cannot be saved. */
|
|
4
|
+
declare const urineAnalysis: (reading: Reading) => UrineAnalyzeMeasurement | undefined;
|
|
5
|
+
export { urineAnalysis };
|
|
6
|
+
//# sourceMappingURL=urine-measurements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urine-measurements.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/urine-measurements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG9E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAqB1C,wGAAwG;AACxG,QAAA,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,uBAAuB,GAAG,SAenE,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ declare const MEASUREMENT_TYPES: readonly ["activity", "alcohol_content", "auscu
|
|
|
2
2
|
/** What a device measures. */
|
|
3
3
|
type MeasurementType = (typeof MEASUREMENT_TYPES)[number];
|
|
4
4
|
/** What one value in a reading is. */
|
|
5
|
-
type MetricCode = "systolic" | "diastolic" | "mean_arterial_pressure" | "cuff_pressure" | "pulse_rate" | "heart_rate" | "fetal_heart_rate" | "ecg_qrs_duration" | "ecg_qtc_interval" | "pvc_count" | "energy_expended" | "blood_glucose" | "blood_ketone" | "blood_uric_acid" | "blood_cholesterol" | "hdl_cholesterol" | "ldl_cholesterol" | "triglycerides" | "blood_lactate" | "hemoglobin" | "hematocrit" | "body_weight" | "body_height" | "bmi" | "body_fat_percent" | "body_water_percent" | "muscle_percent" | "muscle_mass" | "fat_free_mass" | "soft_lean_mass" | "body_water_mass" | "bone_mass" | "visceral_fat" | "basal_metabolic_rate" | "metabolic_age" | "impedance" | "body_temperature" | "spo2" | "perfusion_index" | "pulse_amplitude_index" | "respiration_rate" | "fvc" | "fev1" | "fev1_fvc_ratio" | "pef" | "fef25_75" | "steps" | "distance" | "active_energy";
|
|
5
|
+
type MetricCode = "systolic" | "diastolic" | "mean_arterial_pressure" | "cuff_pressure" | "pulse_rate" | "heart_rate" | "fetal_heart_rate" | "ecg_qrs_duration" | "ecg_qtc_interval" | "pvc_count" | "energy_expended" | "blood_glucose" | "blood_ketone" | "blood_uric_acid" | "blood_cholesterol" | "hdl_cholesterol" | "ldl_cholesterol" | "triglycerides" | "blood_lactate" | "hemoglobin" | "hematocrit" | "body_weight" | "body_height" | "bmi" | "body_fat_percent" | "body_water_percent" | "muscle_percent" | "muscle_mass" | "fat_free_mass" | "soft_lean_mass" | "body_water_mass" | "bone_mass" | "visceral_fat" | "basal_metabolic_rate" | "metabolic_age" | "impedance" | "body_temperature" | "spo2" | "perfusion_index" | "pulse_amplitude_index" | "respiration_rate" | "fvc" | "fev1" | "fev1_fvc_ratio" | "pef" | "fef25_75" | "steps" | "distance" | "active_energy" | "urine_urobilinogen" | "urine_blood" | "urine_bilirubin" | "urine_ketones" | "urine_glucose" | "urine_protein" | "urine_ph" | "urine_nitrite" | "urine_leukocytes" | "urine_specific_gravity" | "urine_ascorbic_acid" | "urine_microalbumin" | "urine_creatinine" | "urine_calcium";
|
|
6
6
|
export { MEASUREMENT_TYPES };
|
|
7
7
|
export type { MeasurementType, MetricCode };
|
|
8
8
|
//# sourceMappingURL=measurement-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measurement-type.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/measurement-type.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,0kBAqCb,CAAC;AAEX,8BAA8B;AAC9B,KAAK,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,sCAAsC;AACtC,KAAK,UAAU,GACX,UAAU,GACV,WAAW,GACX,wBAAwB,GACxB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,KAAK,GACL,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,cAAc,GACd,sBAAsB,GACtB,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,KAAK,GACL,UAAU,GACV,OAAO,GACP,UAAU,GACV,eAAe,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"measurement-type.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/measurement-type.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,0kBAqCb,CAAC;AAEX,8BAA8B;AAC9B,KAAK,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,sCAAsC;AACtC,KAAK,UAAU,GACX,UAAU,GACV,WAAW,GACX,wBAAwB,GACxB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,KAAK,GACL,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,cAAc,GACd,sBAAsB,GACtB,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,KAAK,GACL,UAAU,GACV,OAAO,GACP,UAAU,GACV,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,eAAe,GACf,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,wBAAwB,GACxB,qBAAqB,GACrB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqFlD,6FAA6F;AAC7F,QAAA,MAAM,eAAe,EAAE,SAAS,WAAW,EAkFzC,CAAC;AAEH,6CAA6C;AAC7C,QAAA,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAkFhD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-bt/models.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAkBjD,mHAAmH;AACnH,QAAA,MAAM,gBAAgB,EAAE,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-bt/models.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAkBjD,mHAAmH;AACnH,QAAA,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAS3C,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DeviceProtocol } from "../../core/protocol";
|
|
2
|
+
import { CONTEC_URINE_MODELS } from "./models";
|
|
3
|
+
/** The protocols of Contec's urine analyzers. */
|
|
4
|
+
declare const CONTEC_URINE_PROTOCOLS: readonly DeviceProtocol[];
|
|
5
|
+
export { CONTEC_URINE_MODELS, CONTEC_URINE_PROTOCOLS };
|
|
6
|
+
//# sourceMappingURL=contec-urine.d.ts.map
|
package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/contec-urine.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contec-urine.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/contec-urine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,iDAAiD;AACjD,QAAA,MAAM,sBAAsB,EAAE,SAAS,cAAc,EAAqB,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Framing } from "../frame-tools/frame-stream";
|
|
2
|
+
declare const URINE_SERVICE: string;
|
|
3
|
+
declare const COMMAND_CHARACTERISTIC: string;
|
|
4
|
+
declare const REPLY_CHARACTERISTIC: string;
|
|
5
|
+
/** The analyzer counts its years from 2000. */
|
|
6
|
+
declare const YEAR_BASE = 2000;
|
|
7
|
+
/** The commands without their sum; setting the clock adds the time to `setTime`. */
|
|
8
|
+
declare const COMMAND: {
|
|
9
|
+
readonly reset: readonly [128];
|
|
10
|
+
readonly version: readonly [130];
|
|
11
|
+
readonly setTime: readonly [131];
|
|
12
|
+
readonly counts: readonly [144, 0];
|
|
13
|
+
readonly records: readonly [146, 0];
|
|
14
|
+
readonly nextGroup: readonly [146, 1];
|
|
15
|
+
readonly uploaded: readonly [146, 126];
|
|
16
|
+
};
|
|
17
|
+
/** The header of each reply in use; a stored result comes alone (`record`) or in a group of up to ten (`groupRecord`). */
|
|
18
|
+
declare const REPLY: {
|
|
19
|
+
readonly reset: 240;
|
|
20
|
+
readonly version: 242;
|
|
21
|
+
readonly setTime: 243;
|
|
22
|
+
readonly counts: 224;
|
|
23
|
+
readonly record: 225;
|
|
24
|
+
readonly groupRecord: 226;
|
|
25
|
+
};
|
|
26
|
+
/** A command frame: its bytes and their 7-bit sum. */
|
|
27
|
+
declare const commandFrame: (bytes: readonly number[]) => Uint8Array;
|
|
28
|
+
/** The 14-bit word at `at`: two 7-bit bytes, low first. */
|
|
29
|
+
declare const wordAt: (bytes: Uint8Array, at: number) => number;
|
|
30
|
+
/** Cuts a reply by its header's size and sum; any other byte, such as the version text firmware 1.0.0 trails, is dropped. */
|
|
31
|
+
declare const REPLY_FRAMING: Framing;
|
|
32
|
+
export { COMMAND, COMMAND_CHARACTERISTIC, commandFrame, REPLY, REPLY_CHARACTERISTIC, REPLY_FRAMING, URINE_SERVICE, wordAt, YEAR_BASE };
|
|
33
|
+
//# sourceMappingURL=frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/frame.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,OAAO,EAAgB,MAAM,6BAA6B,CAAC;AAG7E,QAAA,MAAM,aAAa,QAAmB,CAAC;AACvC,QAAA,MAAM,sBAAsB,QAAmB,CAAC;AAChD,QAAA,MAAM,oBAAoB,QAAmB,CAAC;AAK9C,+CAA+C;AAC/C,QAAA,MAAM,SAAS,OAAO,CAAC;AAEvB,oFAAoF;AACpF,QAAA,MAAM,OAAO;;;;;;;;CAQH,CAAC;AAEX,0HAA0H;AAC1H,QAAA,MAAM,KAAK;;;;;;;CAAwG,CAAC;AAepH,sDAAsD;AACtD,QAAA,MAAM,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,UAAsD,CAAC;AAExG,2DAA2D;AAC3D,QAAA,MAAM,MAAM,GAAI,OAAO,UAAU,EAAE,IAAI,MAAM,KAAG,MAC+C,CAAC;AAEhG,6HAA6H;AAC7H,QAAA,MAAM,aAAa,EAAE,OAWpB,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/models.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,4DAA4D;AAC5D,QAAA,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAAmF,CAAC;AAEnI,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DeviceProtocol } from "../../core/protocol";
|
|
2
|
+
import { UrineConnection } from "./session";
|
|
3
|
+
/** The Contec BC401BT urine analyzer: firmware, a clock, and the strip results stored in it. */
|
|
4
|
+
declare const BC401_PROTOCOL: DeviceProtocol<UrineConnection>;
|
|
5
|
+
export { BC401_PROTOCOL };
|
|
6
|
+
//# sourceMappingURL=protocol.d.ts.map
|
package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/protocol.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/protocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAkC,MAAM,qBAAqB,CAAC;AAGrF,OAAO,EAAe,eAAe,EAAE,MAAM,WAAW,CAAC;AAyGzD,gGAAgG;AAChG,QAAA,MAAM,cAAc,EAAE,cAAc,CAAC,eAAe,CAQnD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProtocolContext } from "../../core/protocol";
|
|
2
|
+
/** One open link: commands out, and the analyzer's frames in the order they arrive. */
|
|
3
|
+
type UrineConnection = {
|
|
4
|
+
/** Sends a command; its sum is added. */
|
|
5
|
+
send: (command: readonly number[]) => Promise<void>;
|
|
6
|
+
/** The next frame, which must carry one of `headers`; the analyzer pushes a group's results without being asked. */
|
|
7
|
+
next: (...headers: readonly number[]) => Promise<Uint8Array>;
|
|
8
|
+
/** Sends a command and resolves with its reply, which must carry one of `headers`. */
|
|
9
|
+
request: (command: readonly number[], ...headers: readonly number[]) => Promise<Uint8Array>;
|
|
10
|
+
/** Stops listening. */
|
|
11
|
+
stop: () => void;
|
|
12
|
+
};
|
|
13
|
+
/** Listens to the analyzer, which answers one command at a time. */
|
|
14
|
+
declare const openSession: ({ link }: ProtocolContext) => Promise<UrineConnection>;
|
|
15
|
+
export { openSession };
|
|
16
|
+
export type { UrineConnection };
|
|
17
|
+
//# sourceMappingURL=session.d.ts.map
|
package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/session.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAStD,uFAAuF;AACvF,KAAK,eAAe,GAAG;IAErB,yCAAyC;IACzC,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD,oHAAoH;IACpH,IAAI,EAAE,CAAC,GAAG,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7D,sFAAsF;IACtF,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAE5F,uBAAuB;IACvB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,oEAAoE;AACpE,QAAA,MAAM,WAAW,GAAU,UAAU,eAAe,KAAG,OAAO,CAAC,eAAe,CA+C7E,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/families/contec-urine/strip-result.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-result.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/contec-urine/strip-result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4EpD,+DAA+D;AAC/D,QAAA,MAAM,aAAa,GAAI,OAAO,UAAU,KAAG,aAAiE,CAAC;AAE7G,OAAO,EAAE,aAAa,EAAE,CAAC"}
|