@ovok/core 0.4.15 → 0.4.17
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 +15 -15
- package/dist/conformance/capability-requirements.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ const client = new OvokClient({
|
|
|
41
41
|
});
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
`baseUrl` is the Ovok API origin. `fhirUrlPath` selects the FHIR version path
|
|
45
|
-
|
|
44
|
+
`baseUrl` is the Ovok API origin. `fhirUrlPath` selects the FHIR version path
|
|
45
|
+
used by the client; `apiUrl` is not a supported client option.
|
|
46
46
|
|
|
47
47
|
## Documentation
|
|
48
48
|
|
|
@@ -110,7 +110,7 @@ The server can return `INVALID_SETTING_VALUE` (422), `APP_URL_NOT_ALLOWED`
|
|
|
110
110
|
(400), or `UNKNOWN_SETTING` (400; the response lists accepted keys). A code-less
|
|
111
111
|
409 means settings changed and the screen should reload before retrying. A 403
|
|
112
112
|
means the caller is not a project admin. `readOvokError(error)` reads the status,
|
|
113
|
-
code, user-facing message, and validation field errors from
|
|
113
|
+
code, user-facing message, and validation field errors from an API error.
|
|
114
114
|
`IOT_ENABLED` is not a supported project setting.
|
|
115
115
|
|
|
116
116
|
The email-template catalog is available to authenticated project practitioners:
|
|
@@ -289,7 +289,7 @@ worklist with `acknowledged: false` rather than `status: "ACTIVE"`. Acknowledgin
|
|
|
289
289
|
alert, and the next breaching reading opens a new one. It is idempotent: an acknowledged alert keeps
|
|
290
290
|
its first `acknowledgedAt` and `acknowledgedActor`.
|
|
291
291
|
|
|
292
|
-
Filters: `status`, `acknowledged`, `patientId` (a
|
|
292
|
+
Filters: `status`, `acknowledged`, `patientId` (a FHIR Patient id), `codes` (LOINC codes), and
|
|
293
293
|
`since` (inclusive) and `until` (exclusive) on `createdAt`, as date-times with `Z` or an offset.
|
|
294
294
|
Pages hold at most 50 alerts. As with episodes, a page can be short or empty and still have a
|
|
295
295
|
`nextCursor`, because alerts of residents the caller can't read are left out; page until
|
|
@@ -331,7 +331,7 @@ and any missing-baseline details. In particular, reload the affected record befo
|
|
|
331
331
|
do not automatically replay a stale assignment. A 409 `signals_project_migrating` should be shown
|
|
332
332
|
as a temporary home-migration conflict, not retried in a loop. Threshold writes can return 422
|
|
333
333
|
validation errors or 424 when the baseline has not been collected. Hooks never replay a write with
|
|
334
|
-
a stale body; transient 503 transport retries
|
|
334
|
+
a stale body; transient 503 transport retries do not clear the session.
|
|
335
335
|
The unconfirmed-limit list and repush routes require project-admin access; a 403 remains an error.
|
|
336
336
|
|
|
337
337
|
`getLegalConsent()` returns the signed-in practitioner's own terms status. If
|
|
@@ -428,9 +428,9 @@ The backend allows three kinds of read:
|
|
|
428
428
|
Signed out, a read rejects with `SignInRequiredError` (`isSignInRequiredError(error)`) before
|
|
429
429
|
any request is sent, unless it passes `allowSignedOut: true` and a `tenantCode`. `getLegalPage`,
|
|
430
430
|
`getTranslations` and their hooks turn `allowSignedOut` on by default; pass it yourself only for
|
|
431
|
-
another collection the backend serves without a key or session.
|
|
432
|
-
|
|
433
|
-
|
|
431
|
+
another collection the backend serves without a key or session. A request that returns 401 can
|
|
432
|
+
clear the session storage and call `onUnauthenticated`. A hook that rendered before sign-in needs
|
|
433
|
+
`reload()` once the session exists.
|
|
434
434
|
|
|
435
435
|
`locale` takes an app language or a CMS locale (`en`, `de`, `fr`, `es`). `toCmsLocale` maps
|
|
436
436
|
`de-CH` to `de`, and a language the CMS does not carry to `en`. The hooks default to the
|
|
@@ -459,13 +459,13 @@ SDK version.
|
|
|
459
459
|
|
|
460
460
|
## Offline measurements
|
|
461
461
|
|
|
462
|
-
Pass a durable
|
|
462
|
+
Pass a durable client storage adapter and opt in to queue measurements while offline:
|
|
463
463
|
|
|
464
464
|
```typescript
|
|
465
465
|
const client = new OvokClient({
|
|
466
466
|
storage,
|
|
467
467
|
offlineQueue: { enabled: true },
|
|
468
|
-
// other
|
|
468
|
+
// other Ovok client configuration
|
|
469
469
|
});
|
|
470
470
|
|
|
471
471
|
const result = await client.saveMeasurement({
|
|
@@ -505,8 +505,8 @@ const sessions = await client.getSessions();
|
|
|
505
505
|
await client.revokeSessions("other");
|
|
506
506
|
```
|
|
507
507
|
|
|
508
|
-
Pass `onUnauthenticated` in the
|
|
509
|
-
|
|
508
|
+
Pass `onUnauthenticated` in the client options to react when a request can no longer refresh its
|
|
509
|
+
session.
|
|
510
510
|
|
|
511
511
|
## Multi-factor authentication
|
|
512
512
|
|
|
@@ -675,7 +675,7 @@ Render accept failures without attempting to distinguish private cases:
|
|
|
675
675
|
|
|
676
676
|
## Large measurements
|
|
677
677
|
|
|
678
|
-
`saveMeasurement` and `saveObservations` use conditional creates for idempotent saves.
|
|
678
|
+
`saveMeasurement` and `saveObservations` use conditional creates for idempotent saves. The API
|
|
679
679
|
limits a serializable transaction with conditional operations to eight entries, so the SDK keeps
|
|
680
680
|
the first observation in a transaction and sends additional observations in a FHIR batch request.
|
|
681
681
|
This supports measurements such as urine strips and long ECG recordings without changing retry
|
|
@@ -684,5 +684,5 @@ behavior. The first observation should remain first when supplying observations
|
|
|
684
684
|
The offline queue applies the same split when it flushes a measurement. A partial retry is safe:
|
|
685
685
|
the first conditional create finds the existing observation and the batch only creates missing
|
|
686
686
|
members. Applications building their own bundles can use the exported
|
|
687
|
-
`MAX_CONDITIONAL_OBSERVATION_ENTRIES` limit. See [FHIR
|
|
688
|
-
for the transaction and batch semantics.
|
|
687
|
+
`MAX_CONDITIONAL_OBSERVATION_ENTRIES` limit. See the [Ovok FHIR documentation](https://docs.ovok.com/api/fhir/r4)
|
|
688
|
+
for the transaction and batch semantics supported by the API.
|
|
@@ -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.17",
|
|
52
52
|
},
|
|
53
53
|
fhirVersion: "4.0.1",
|
|
54
54
|
format: ["json"],
|