@ovok/core 0.3.19 → 0.3.21

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.
@@ -9,4 +9,6 @@ export type BloodPressureMeasurement = Measurement & {
9
9
  meanArterialPressure?: number;
10
10
  heartRate?: number;
11
11
  status?: BloodPressureStates;
12
+ /** Whether the device detected an irregular heartbeat during the reading. */
13
+ irregularHeartbeat?: boolean;
12
14
  };
@@ -1,6 +1,6 @@
1
1
  import { IClientStorage } from "@medplum/core";
2
2
  import { Bundle, BundleEntry, Observation } from "@medplum/fhirtypes";
3
- declare const DEFAULT_STORAGE_KEY = "@ovok/core/offline-measurements";
3
+ declare const DEFAULT_STORAGE_KEY = "ovok.core.offline-measurements";
4
4
  declare const IDENTIFIER_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/offline-measurement-id";
5
5
  export type OfflineMeasurementQueueOptions = {
6
6
  enabled?: boolean;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.stableMeasurementId = exports.entryForObservation = exports.OFFLINE_MEASUREMENT_IDENTIFIER_SYSTEM = exports.DEFAULT_OFFLINE_MEASUREMENT_QUEUE_KEY = exports.OfflineMeasurementQueue = void 0;
4
- const DEFAULT_STORAGE_KEY = "@ovok/core/offline-measurements";
4
+ const DEFAULT_STORAGE_KEY = "ovok.core.offline-measurements";
5
5
  exports.DEFAULT_OFFLINE_MEASUREMENT_QUEUE_KEY = DEFAULT_STORAGE_KEY;
6
6
  const DEFAULT_MAX_RETRIES = 8;
7
7
  const DEFAULT_RETRY_BACKOFF_MS = 5000;
@@ -121,6 +121,9 @@ class OfflineMeasurementQueue {
121
121
  };
122
122
  this.writeQueue = (queue) => {
123
123
  this.storage.setObject(this.storageKey, queue);
124
+ if (!Array.isArray(this.storage.getObject(this.storageKey))) {
125
+ throw new Error(`Offline measurement queue could not be persisted at storage key "${this.storageKey}".`);
126
+ }
124
127
  };
125
128
  this.flushQueue = async (queue, options = {}) => {
126
129
  const result = {
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
48
48
  description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
49
49
  software: {
50
50
  name: "@ovok/core",
51
- version: "0.3.19",
51
+ version: "0.3.21",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.3.19",
3
+ "version": "0.3.21",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",