@d4l/collect-lib 1.2.0 → 1.3.0
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/README.md +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -759,7 +759,7 @@ var APPLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS = {
|
|
|
759
759
|
var RECORDING_MODEL_CURRENT_VERSION = "0.0.6";
|
|
760
760
|
|
|
761
761
|
// src/types/recordingSignal.ts
|
|
762
|
-
var RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "0.0
|
|
762
|
+
var RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "1.0.0";
|
|
763
763
|
|
|
764
764
|
// src/donation/keyHandler.ts
|
|
765
765
|
import * as secpUtils from "@noble/curves/abstract/utils";
|
|
@@ -4687,17 +4687,12 @@ function toFHIRBundleEntries(signal) {
|
|
|
4687
4687
|
}
|
|
4688
4688
|
function toFHIRDocumentReference(signal, deviceUrn) {
|
|
4689
4689
|
var _a;
|
|
4690
|
-
const {
|
|
4690
|
+
const { data, annotation, type, deviceKey, deviceFullName, deviceShortName, version } = signal;
|
|
4691
4691
|
const entrySize = annotation.reduce((sum, { size }) => sum + size, 0);
|
|
4692
|
-
if (!
|
|
4693
|
-
console.error("[Recording Signal] Missing data
|
|
4692
|
+
if (!data) {
|
|
4693
|
+
console.error("[Recording Signal] Missing data for document reference");
|
|
4694
4694
|
return void 0;
|
|
4695
4695
|
}
|
|
4696
|
-
const data = items.flatMap((item) => {
|
|
4697
|
-
const dateBuffer = Buffer9.alloc(DEVICE_ANNOTATION_TIMESTAMP_SIZE);
|
|
4698
|
-
dateBuffer.writeUIntLE(item.date.getTime(), 0, DEVICE_ANNOTATION_TIMESTAMP_SIZE);
|
|
4699
|
-
return [...dateBuffer, ...item.value];
|
|
4700
|
-
});
|
|
4701
4696
|
return {
|
|
4702
4697
|
resourceType: "DocumentReference",
|
|
4703
4698
|
status: "current",
|