@ovok/core 0.4.11 → 0.4.13
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.
|
@@ -121,7 +121,11 @@ class OfflineMeasurementQueue {
|
|
|
121
121
|
};
|
|
122
122
|
this.writeQueue = (queue) => {
|
|
123
123
|
this.storage.setObject(this.storageKey, queue);
|
|
124
|
-
|
|
124
|
+
const stored = this.storage.getObject(this.storageKey);
|
|
125
|
+
const queueWasPersisted = queue.length === 0
|
|
126
|
+
? stored === undefined || (Array.isArray(stored) && stored.length === 0)
|
|
127
|
+
: Array.isArray(stored);
|
|
128
|
+
if (!queueWasPersisted) {
|
|
125
129
|
throw new Error(`Offline measurement queue could not be persisted at storage key "${this.storageKey}".`);
|
|
126
130
|
}
|
|
127
131
|
};
|
|
@@ -160,7 +160,9 @@ class OvokClient extends core_1.MedplumClient {
|
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
async executeObservationBundle(bundle) {
|
|
163
|
-
|
|
163
|
+
const response = await (0, observation_bundle_utils_1.executeObservationBundle)(bundle, (request) => this.executeBatch(request));
|
|
164
|
+
this.invalidateSearches("Observation");
|
|
165
|
+
return response;
|
|
164
166
|
}
|
|
165
167
|
bindMethods(methods, mapError = (error) => (0, ovok_error_1.mapOvokApiError)((0, rate_limit_error_1.mapRateLimitError)(error))) {
|
|
166
168
|
for (const [name, method] of Object.entries(methods)) {
|
|
@@ -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.4.
|
|
51
|
+
version: "0.4.13",
|
|
52
52
|
},
|
|
53
53
|
fhirVersion: "4.0.1",
|
|
54
54
|
format: ["json"],
|