@ovok/core 0.4.6 → 0.4.7

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 CHANGED
@@ -16,7 +16,7 @@ Core TypeScript SDK for healthcare applications. Provides authentication, AI-FHI
16
16
  - 📥 Opt-in durable offline measurement queue with idempotent retries
17
17
  - 🧭 Runtime discovery of the backend FHIR and public API capabilities
18
18
  - 🧩 Typed accounts, projects, localization, and patient-observation APIs
19
- - 🏥 Typed CareHub patient, device, telemetry, notification, and monitoring APIs
19
+ - 🏥 Typed Slim patient, device, telemetry, notification, and monitoring APIs
20
20
  - 🚨 Typed Signals thresholds, alerts, and project settings APIs
21
21
 
22
22
  ## Installation
@@ -295,20 +295,20 @@ caller's project and the residents their access policy allows: an alert outside
295
295
  404, and acknowledging needs `signals_alerts:update` and update access to the resident (403 when the
296
296
  caller can only read them).
297
297
 
298
- ## CareHub APIs
298
+ ## Slim APIs
299
299
 
300
- CareHub methods cover the verified `/v1/slim/*` and `/v2/slim/*` application routes for
300
+ Slim methods cover the verified `/v1/slim/*` and `/v2/slim/*` application routes for
301
301
  patients, devices, telemetry, notifications, thresholds, trends, sleep, locations, zones, and
302
- PDF export. These routes require the backend's bearer session and CareHub permissions.
302
+ PDF export. These routes require the backend's bearer session and Slim permissions.
303
303
 
304
304
  ```typescript
305
- const residents = await client.listCarehubPatients({ residentState: "active" });
306
- const devices = await client.listCarehubDevices({ active: true });
307
- const telemetry = await client.getCarehubDeviceTelemetry(deviceId);
308
- const alerts = await client.listCarehubMedicalNotifications({ count: 25 });
305
+ const residents = await client.listSlimPatients({ residentState: "active" });
306
+ const devices = await client.listSlimDevices({ active: true });
307
+ const telemetry = await client.getSlimDeviceTelemetry(deviceId);
308
+ const alerts = await client.listSlimMedicalNotifications({ count: 25 });
309
309
  ```
310
310
 
311
- CareHub is intentionally represented as typed application APIs rather than changing the FHIR
311
+ Slim is intentionally represented as typed application APIs rather than changing the FHIR
312
312
  observation save/offline behavior used by native integrations.
313
313
 
314
314
  ## Application APIs
@@ -338,12 +338,12 @@ download elements; the backend remains responsible for authorization and signed
338
338
  ## React hooks
339
339
 
340
340
  The package exports additive hooks for capability discovery, project configuration, patient profile
341
- and health data, questionnaires, scheduling resources, CareHub lists, telemetry, notifications,
341
+ and health data, questionnaires, scheduling resources, Slim lists, telemetry, notifications,
342
342
  documents, content, video consultations, and localization. Every request hook returns `data`,
343
343
  `loading`, `error`, and `reload`; mutations expose `data`, `loading`, `error`, `mutate`, and `reset`.
344
344
 
345
345
  ```tsx
346
- const { data: patients, loading, error } = useCarehubPatients({
346
+ const { data: patients, loading, error } = useSlimPatients({
347
347
  residentState: "active",
348
348
  });
349
349
 
@@ -494,7 +494,7 @@ changing only practitioner sharing, send the current `enabled` value too.
494
494
  turning it off does not revoke existing shares. A project admin can toggle it
495
495
  through `PUT /v1/patient-sharing/settings`; concurrent settings changes return
496
496
  409 and should be reloaded, and non-admins receive 403. Do not enable it for a project
497
- whose practitioners use the Carehub dashboard. Map the email templates
497
+ whose practitioners use the Slim dashboard. Map the email templates
498
498
  `PATIENT_INVITE`, `PATIENT_ASSIGNMENT_REQUEST`,
499
499
  `PRACTITIONER_INVITED_BY_PATIENT`, and `PRACTITIONER_PATIENT_SHARED` before
500
500
  turning the feature on; an unmapped email can still produce the uniform 202
@@ -4,7 +4,6 @@ import { OvokPublicApiEndpoint } from "../conformance/capability";
4
4
  import * as aiFhirMethods from "./ai-fhir/methods";
5
5
  import * as authMethods from "./auth/methods";
6
6
  import * as botMethods from "./bot/methods";
7
- import * as carehubMethods from "./carehub/methods";
8
7
  import * as aiMethods from "./chat/ai/methods";
9
8
  import * as emailMethods from "./email";
10
9
  import * as experienceMethods from "./experience/methods";
@@ -17,6 +16,7 @@ import * as patientSharingMethods from "./patient-sharing/methods";
17
16
  import * as platformMethods from "./platform/methods";
18
17
  import * as questionnaireResponseMethods from "./questionnaire-response/methods";
19
18
  import * as signalsMethods from "./signals/methods";
19
+ import * as slimMethods from "./slim/methods";
20
20
  export declare const MAX_CONDITIONAL_OBSERVATION_ENTRIES = 8;
21
21
  export { MAX_OBSERVATION_BUNDLE_BYTES } from "./observation/observation-bundle-utils";
22
22
  export type SaveObservationsResult = {
@@ -62,7 +62,7 @@ export declare class OvokClient extends MedplumClient {
62
62
  */
63
63
  getSubscriptionManager(): SubscriptionManager;
64
64
  }
65
- type Methods = typeof authMethods & typeof observationMethods & typeof questionnaireResponseMethods & typeof aiMethods & typeof aiFhirMethods & typeof botMethods & typeof carehubMethods & typeof emailMethods & typeof platformMethods & typeof experienceMethods & typeof inviteMethods & typeof patientMethods & typeof patientSharingMethods & typeof signalsMethods;
65
+ type Methods = typeof authMethods & typeof observationMethods & typeof questionnaireResponseMethods & typeof aiMethods & typeof aiFhirMethods & typeof botMethods & typeof slimMethods & typeof emailMethods & typeof platformMethods & typeof experienceMethods & typeof inviteMethods & typeof patientMethods & typeof patientSharingMethods & typeof signalsMethods;
66
66
  type Omitted<T> = Omit<T, "executeBot">;
67
67
  declare module "./ovok-client" {
68
68
  interface OvokClient extends Omitted<Methods> {
@@ -40,7 +40,6 @@ const capability_1 = require("../conformance/capability");
40
40
  const aiFhirMethods = __importStar(require("./ai-fhir/methods"));
41
41
  const authMethods = __importStar(require("./auth/methods"));
42
42
  const botMethods = __importStar(require("./bot/methods"));
43
- const carehubMethods = __importStar(require("./carehub/methods"));
44
43
  const aiMethods = __importStar(require("./chat/ai/methods"));
45
44
  const emailMethods = __importStar(require("./email"));
46
45
  const rate_limit_error_1 = require("./errors/rate-limit-error");
@@ -55,6 +54,7 @@ const platformMethods = __importStar(require("./platform/methods"));
55
54
  const questionnaireResponseMethods = __importStar(require("./questionnaire-response/methods"));
56
55
  const errors_1 = require("./signals/errors");
57
56
  const signalsMethods = __importStar(require("./signals/methods"));
57
+ const slimMethods = __importStar(require("./slim/methods"));
58
58
  exports.MAX_CONDITIONAL_OBSERVATION_ENTRIES = 8;
59
59
  var observation_bundle_utils_2 = require("./observation/observation-bundle-utils");
60
60
  Object.defineProperty(exports, "MAX_OBSERVATION_BUNDLE_BYTES", { enumerable: true, get: function () { return observation_bundle_utils_2.MAX_OBSERVATION_BUNDLE_BYTES; } });
@@ -74,7 +74,7 @@ class OvokClient extends core_1.MedplumClient {
74
74
  this.bindMethods(aiMethods);
75
75
  this.bindMethods(aiFhirMethods);
76
76
  this.bindMethods(botMethods);
77
- this.bindMethods(carehubMethods);
77
+ this.bindMethods(slimMethods);
78
78
  this.bindMethods(emailMethods);
79
79
  this.bindMethods(platformMethods);
80
80
  this.bindMethods(experienceMethods);
@@ -0,0 +1,71 @@
1
+ import { Bundle, Resource } from "@medplum/fhirtypes";
2
+ import { OvokClient } from "../ovok-client";
3
+ import { SlimAssignDevice, SlimCreateDevice, SlimCreateLocation, SlimCreatePatient, SlimDevice, SlimDeviceListItem, SlimDeviceListQuery, SlimDeviceTelemetry, SlimExportPdf, SlimExportPdfRequest, SlimLiveQuery, SlimLiveTelemetry, SlimLocation, SlimLocationQuery, SlimNotification, SlimNotificationsQuery, SlimNotificationsResponse, SlimObservationIds, SlimPage, SlimPatient, SlimPatientListItem, SlimPatientListQuery, SlimRecentNotificationsResponse, SlimSleepStatistics, SlimThreshold, SlimTrends, SlimUpdateDevice, SlimUpdateLocation, SlimUpdatePatient, SlimZone, SlimZoneDetail } from "./types";
4
+ export declare function listSlimPatients(this: OvokClient, params?: SlimPatientListQuery): Promise<SlimPage<SlimPatientListItem>>;
5
+ export declare function getSlimPatient(this: OvokClient, patientId: string): Promise<SlimPatient>;
6
+ export declare function getSlimPatientEverything(this: OvokClient, patientId: string): Promise<Bundle<Resource>>;
7
+ export declare function getSlimPatientCurrentVitals(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
8
+ export declare function createSlimPatient(this: OvokClient, body: SlimCreatePatient): Promise<SlimPatient>;
9
+ export declare function updateSlimPatient(this: OvokClient, patientId: string, body: SlimUpdatePatient): Promise<SlimPatient>;
10
+ export declare function deleteSlimPatient(this: OvokClient, patientId: string): Promise<void>;
11
+ export declare function listSlimDevices(this: OvokClient, params?: SlimDeviceListQuery): Promise<SlimPage<SlimDeviceListItem>>;
12
+ export declare function getSlimDevice(this: OvokClient, deviceId: string): Promise<SlimDevice>;
13
+ export declare function createSlimDevice(this: OvokClient, body: SlimCreateDevice): Promise<SlimDevice>;
14
+ export declare function updateSlimDevice(this: OvokClient, deviceId: string, body: SlimUpdateDevice): Promise<SlimDevice>;
15
+ export declare function deleteSlimDevice(this: OvokClient, deviceId: string): Promise<void>;
16
+ export declare function assignSlimDeviceToProject(this: OvokClient, body: SlimAssignDevice): Promise<SlimDevice>;
17
+ export declare function listSlimLiveDevices(this: OvokClient, params?: SlimLiveQuery): Promise<SlimPage<Record<string, unknown>>>;
18
+ export declare function listSlimLiveTelemetry(this: OvokClient, params?: SlimLiveQuery): Promise<SlimLiveTelemetry>;
19
+ export declare function getSlimDeviceSleepStatus(this: OvokClient, deviceId: string): Promise<Record<string, unknown>>;
20
+ export declare function getSlimDeviceTelemetry(this: OvokClient, deviceId: string): Promise<SlimDeviceTelemetry>;
21
+ export declare function listSlimEffectiveObservationIds(this: OvokClient): Promise<Record<string, SlimObservationIds>>;
22
+ export declare function listSlimLastObservationIds(this: OvokClient): Promise<Record<string, SlimObservationIds>>;
23
+ export declare function getSlimDeviceEffectiveObservationIds(this: OvokClient, deviceId: string): Promise<Omit<SlimObservationIds, "batch">>;
24
+ export declare function getSlimDeviceLastObservationIds(this: OvokClient, deviceId: string): Promise<SlimObservationIds>;
25
+ export declare function listSlimNotifications(this: OvokClient, params?: SlimNotificationsQuery): Promise<SlimNotificationsResponse>;
26
+ export declare function getRecentSlimNotifications(this: OvokClient, count?: number): Promise<SlimRecentNotificationsResponse>;
27
+ export declare function listSlimOutOfBedNotifications(this: OvokClient, params?: Omit<SlimNotificationsQuery, "type">): Promise<SlimNotificationsResponse>;
28
+ export declare function listSlimMedicalNotifications(this: OvokClient, params?: SlimNotificationsQuery): Promise<SlimNotificationsResponse>;
29
+ export declare function getRecentSlimMedicalNotifications(this: OvokClient, count?: number): Promise<SlimRecentNotificationsResponse>;
30
+ export declare function getSlimMedicalNotification(this: OvokClient, episodeId: string): Promise<SlimNotification>;
31
+ export declare function acknowledgeSlimMedicalNotification(this: OvokClient, episodeId: string): Promise<SlimNotification>;
32
+ export declare function acknowledgeSlimNotification(this: OvokClient, notificationId: string): Promise<SlimNotification>;
33
+ export declare function getSlimThreshold(this: OvokClient): Promise<SlimThreshold>;
34
+ export declare function updateSlimThreshold(this: OvokClient, body: Record<string, unknown>): Promise<SlimThreshold>;
35
+ export declare function getSlimPatientThreshold(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
36
+ export declare function updateSlimPatientThreshold(this: OvokClient, patientId: string, body: Record<string, unknown>): Promise<Record<string, unknown>>;
37
+ export declare function getSlimThresholdV2(this: OvokClient): Promise<Record<string, unknown>>;
38
+ export declare function updateSlimThresholdV2(this: OvokClient, body: Record<string, unknown>): Promise<Record<string, unknown>>;
39
+ export declare function getSlimPatientThresholdV2(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
40
+ export declare function updateSlimPatientThresholdV2(this: OvokClient, patientId: string, body: Record<string, unknown>): Promise<Record<string, unknown>>;
41
+ export declare function getSlimTrends(this: OvokClient, params: {
42
+ patientId: string;
43
+ startDate: string;
44
+ endDate: string;
45
+ graphType: string;
46
+ }): Promise<SlimTrends>;
47
+ export declare function getSlimSleepStatistics(this: OvokClient, params: {
48
+ endDate: string;
49
+ lastDayCount?: number;
50
+ patientId: string;
51
+ }): Promise<SlimSleepStatistics>;
52
+ export declare function listSlimLocations(this: OvokClient, params?: SlimLocationQuery): Promise<SlimPage<SlimLocation>>;
53
+ export declare function getSlimLocation(this: OvokClient, locationId: string): Promise<SlimLocation>;
54
+ export declare function createSlimLocation(this: OvokClient, body: SlimCreateLocation): Promise<SlimLocation>;
55
+ export declare function updateSlimLocation(this: OvokClient, locationId: string, body: SlimUpdateLocation): Promise<SlimLocation>;
56
+ export declare function deleteSlimLocation(this: OvokClient, locationId: string): Promise<void>;
57
+ export declare function listSlimZones(this: OvokClient, params?: {
58
+ page?: number;
59
+ count?: number;
60
+ sortBy?: string;
61
+ orderBy?: "ASC" | "DESC";
62
+ search?: string;
63
+ }): Promise<SlimPage<SlimZone>>;
64
+ export declare function getSlimZone(this: OvokClient, zoneId: string): Promise<SlimZoneDetail>;
65
+ export declare function getSlimZoneDeviceCounts(this: OvokClient, params?: {
66
+ all?: boolean;
67
+ effectiveSleepStatus?: string;
68
+ includeUnassigned?: boolean;
69
+ includeEmpty?: boolean;
70
+ }): Promise<Record<string, unknown>>;
71
+ export declare function exportSlimPatientPdf(this: OvokClient, body: SlimExportPdfRequest): Promise<SlimExportPdf>;
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listSlimPatients = listSlimPatients;
4
+ exports.getSlimPatient = getSlimPatient;
5
+ exports.getSlimPatientEverything = getSlimPatientEverything;
6
+ exports.getSlimPatientCurrentVitals = getSlimPatientCurrentVitals;
7
+ exports.createSlimPatient = createSlimPatient;
8
+ exports.updateSlimPatient = updateSlimPatient;
9
+ exports.deleteSlimPatient = deleteSlimPatient;
10
+ exports.listSlimDevices = listSlimDevices;
11
+ exports.getSlimDevice = getSlimDevice;
12
+ exports.createSlimDevice = createSlimDevice;
13
+ exports.updateSlimDevice = updateSlimDevice;
14
+ exports.deleteSlimDevice = deleteSlimDevice;
15
+ exports.assignSlimDeviceToProject = assignSlimDeviceToProject;
16
+ exports.listSlimLiveDevices = listSlimLiveDevices;
17
+ exports.listSlimLiveTelemetry = listSlimLiveTelemetry;
18
+ exports.getSlimDeviceSleepStatus = getSlimDeviceSleepStatus;
19
+ exports.getSlimDeviceTelemetry = getSlimDeviceTelemetry;
20
+ exports.listSlimEffectiveObservationIds = listSlimEffectiveObservationIds;
21
+ exports.listSlimLastObservationIds = listSlimLastObservationIds;
22
+ exports.getSlimDeviceEffectiveObservationIds = getSlimDeviceEffectiveObservationIds;
23
+ exports.getSlimDeviceLastObservationIds = getSlimDeviceLastObservationIds;
24
+ exports.listSlimNotifications = listSlimNotifications;
25
+ exports.getRecentSlimNotifications = getRecentSlimNotifications;
26
+ exports.listSlimOutOfBedNotifications = listSlimOutOfBedNotifications;
27
+ exports.listSlimMedicalNotifications = listSlimMedicalNotifications;
28
+ exports.getRecentSlimMedicalNotifications = getRecentSlimMedicalNotifications;
29
+ exports.getSlimMedicalNotification = getSlimMedicalNotification;
30
+ exports.acknowledgeSlimMedicalNotification = acknowledgeSlimMedicalNotification;
31
+ exports.acknowledgeSlimNotification = acknowledgeSlimNotification;
32
+ exports.getSlimThreshold = getSlimThreshold;
33
+ exports.updateSlimThreshold = updateSlimThreshold;
34
+ exports.getSlimPatientThreshold = getSlimPatientThreshold;
35
+ exports.updateSlimPatientThreshold = updateSlimPatientThreshold;
36
+ exports.getSlimThresholdV2 = getSlimThresholdV2;
37
+ exports.updateSlimThresholdV2 = updateSlimThresholdV2;
38
+ exports.getSlimPatientThresholdV2 = getSlimPatientThresholdV2;
39
+ exports.updateSlimPatientThresholdV2 = updateSlimPatientThresholdV2;
40
+ exports.getSlimTrends = getSlimTrends;
41
+ exports.getSlimSleepStatistics = getSlimSleepStatistics;
42
+ exports.listSlimLocations = listSlimLocations;
43
+ exports.getSlimLocation = getSlimLocation;
44
+ exports.createSlimLocation = createSlimLocation;
45
+ exports.updateSlimLocation = updateSlimLocation;
46
+ exports.deleteSlimLocation = deleteSlimLocation;
47
+ exports.listSlimZones = listSlimZones;
48
+ exports.getSlimZone = getSlimZone;
49
+ exports.getSlimZoneDeviceCounts = getSlimZoneDeviceCounts;
50
+ exports.exportSlimPatientPdf = exportSlimPatientPdf;
51
+ const query = (params) => {
52
+ const values = new URLSearchParams();
53
+ for (const [key, value] of Object.entries(params)) {
54
+ if (value !== undefined) {
55
+ values.set(key, String(value));
56
+ }
57
+ }
58
+ const encoded = values.toString();
59
+ return encoded === "" ? "" : `?${encoded}`;
60
+ };
61
+ const segment = (value) => encodeURIComponent(value);
62
+ async function listSlimPatients(params = {}) {
63
+ return this.get(`/v1/slim/patient${query(params)}`);
64
+ }
65
+ async function getSlimPatient(patientId) {
66
+ return this.get(`/v1/slim/patient/${segment(patientId)}`);
67
+ }
68
+ async function getSlimPatientEverything(patientId) {
69
+ return this.get(`/v1/slim/patient/${segment(patientId)}/$everything`);
70
+ }
71
+ async function getSlimPatientCurrentVitals(patientId) {
72
+ return this.get(`/v1/slim/patient/${segment(patientId)}/current-vitals`);
73
+ }
74
+ async function createSlimPatient(body) {
75
+ return this.post("/v1/slim/patient", body);
76
+ }
77
+ async function updateSlimPatient(patientId, body) {
78
+ return (await this.put(`/v1/slim/patient/${segment(patientId)}`, body));
79
+ }
80
+ async function deleteSlimPatient(patientId) {
81
+ await this.delete(`/v1/slim/patient/${segment(patientId)}`);
82
+ }
83
+ async function listSlimDevices(params = {}) {
84
+ return this.get(`/v1/slim/device${query(params)}`);
85
+ }
86
+ async function getSlimDevice(deviceId) {
87
+ return this.get(`/v1/slim/device/${segment(deviceId)}`);
88
+ }
89
+ async function createSlimDevice(body) {
90
+ return this.post("/v1/slim/device", body);
91
+ }
92
+ async function updateSlimDevice(deviceId, body) {
93
+ return (await this.put(`/v1/slim/device/${segment(deviceId)}`, body));
94
+ }
95
+ async function deleteSlimDevice(deviceId) {
96
+ await this.delete(`/v1/slim/device/${segment(deviceId)}`);
97
+ }
98
+ async function assignSlimDeviceToProject(body) {
99
+ return (await this.put("/v1/slim/device/assign/project", body));
100
+ }
101
+ async function listSlimLiveDevices(params = {}) {
102
+ return this.get(`/v1/slim/device/live${query(params)}`);
103
+ }
104
+ async function listSlimLiveTelemetry(params = {}) {
105
+ return this.get(`/v1/slim/device/live/telemetry${query(params)}`);
106
+ }
107
+ async function getSlimDeviceSleepStatus(deviceId) {
108
+ return this.get(`/v1/slim/device/live/cloudwatch/${segment(deviceId)}`);
109
+ }
110
+ async function getSlimDeviceTelemetry(deviceId) {
111
+ return this.get(`/v1/slim/telemetry/${segment(deviceId)}`);
112
+ }
113
+ async function listSlimEffectiveObservationIds() {
114
+ return this.get("/v1/slim/telemetry/effectiveIds");
115
+ }
116
+ async function listSlimLastObservationIds() {
117
+ return this.get("/v1/slim/telemetry/lastIds");
118
+ }
119
+ async function getSlimDeviceEffectiveObservationIds(deviceId) {
120
+ return this.get(`/v1/slim/telemetry/${segment(deviceId)}/effectiveIds`);
121
+ }
122
+ async function getSlimDeviceLastObservationIds(deviceId) {
123
+ return this.get(`/v1/slim/telemetry/${segment(deviceId)}/lastIds`);
124
+ }
125
+ async function listSlimNotifications(params = {}) {
126
+ return this.get(`/v1/slim/notifications${query(params)}`);
127
+ }
128
+ async function getRecentSlimNotifications(count) {
129
+ return this.get(`/v1/slim/notifications/recent${query({ count })}`);
130
+ }
131
+ async function listSlimOutOfBedNotifications(params = {}) {
132
+ return this.get(`/v1/slim/notifications/oob${query(params)}`);
133
+ }
134
+ async function listSlimMedicalNotifications(params = {}) {
135
+ return this.get(`/v1/slim/notifications/medical${query(params)}`);
136
+ }
137
+ async function getRecentSlimMedicalNotifications(count) {
138
+ return this.get(`/v1/slim/notifications/recent/medical${query({ count })}`);
139
+ }
140
+ async function getSlimMedicalNotification(episodeId) {
141
+ return this.get(`/v1/slim/notifications/medical/${segment(episodeId)}`);
142
+ }
143
+ async function acknowledgeSlimMedicalNotification(episodeId) {
144
+ return this.post(`/v1/slim/notifications/medical/${segment(episodeId)}/ack`);
145
+ }
146
+ async function acknowledgeSlimNotification(notificationId) {
147
+ return (await this.patch(`/v1/slim/notifications/${segment(notificationId)}/ack`, []));
148
+ }
149
+ async function getSlimThreshold() {
150
+ return this.get("/v1/slim/threshold");
151
+ }
152
+ async function updateSlimThreshold(body) {
153
+ return (await this.put("/v1/slim/threshold", body));
154
+ }
155
+ async function getSlimPatientThreshold(patientId) {
156
+ return this.get(`/v1/slim/threshold/patient/${segment(patientId)}`);
157
+ }
158
+ async function updateSlimPatientThreshold(patientId, body) {
159
+ return (await this.put(`/v1/slim/threshold/patient/${segment(patientId)}`, body));
160
+ }
161
+ async function getSlimThresholdV2() {
162
+ return this.get("/v2/slim/threshold");
163
+ }
164
+ async function updateSlimThresholdV2(body) {
165
+ return (await this.put("/v2/slim/threshold", body));
166
+ }
167
+ async function getSlimPatientThresholdV2(patientId) {
168
+ return this.get(`/v2/slim/threshold/patient/${segment(patientId)}`);
169
+ }
170
+ async function updateSlimPatientThresholdV2(patientId, body) {
171
+ return (await this.put(`/v2/slim/threshold/patient/${segment(patientId)}`, body));
172
+ }
173
+ async function getSlimTrends(params) {
174
+ return this.get(`/v1/slim/trends/graphs${query(params)}`);
175
+ }
176
+ async function getSlimSleepStatistics(params) {
177
+ return this.get(`/v1/slim/sleep/statistics${query(params)}`);
178
+ }
179
+ async function listSlimLocations(params = {}) {
180
+ return this.get(`/v1/slim/location${query(params)}`);
181
+ }
182
+ async function getSlimLocation(locationId) {
183
+ return this.get(`/v1/slim/location/${segment(locationId)}`);
184
+ }
185
+ async function createSlimLocation(body) {
186
+ return this.post("/v1/slim/location", body);
187
+ }
188
+ async function updateSlimLocation(locationId, body) {
189
+ return (await this.put(`/v1/slim/location/${segment(locationId)}`, body));
190
+ }
191
+ async function deleteSlimLocation(locationId) {
192
+ await this.delete(`/v1/slim/location/${segment(locationId)}`);
193
+ }
194
+ async function listSlimZones(params = {}) {
195
+ return this.get(`/v1/slim/zones${query(params)}`);
196
+ }
197
+ async function getSlimZone(zoneId) {
198
+ return this.get(`/v1/slim/zones/${segment(zoneId)}`);
199
+ }
200
+ async function getSlimZoneDeviceCounts(params = {}) {
201
+ return this.get(`/v1/slim/zones/device-counts${query(params)}`);
202
+ }
203
+ async function exportSlimPatientPdf(body) {
204
+ return this.post("/v1/slim/export/pdf", body);
205
+ }
@@ -1,18 +1,18 @@
1
- export type CarehubPage<T> = {
1
+ export type SlimPage<T> = {
2
2
  total: number;
3
3
  page: number;
4
4
  count: number;
5
5
  resources: T[];
6
6
  };
7
- export type CarehubResidentState = "active" | "archived" | "discharged" | "discharged-recent";
8
- export type CarehubHumanName = {
7
+ export type SlimResidentState = "active" | "archived" | "discharged" | "discharged-recent";
8
+ export type SlimHumanName = {
9
9
  use: "official" | "nickname" | "maiden";
10
10
  given?: string[];
11
11
  family?: string;
12
12
  };
13
- export type CarehubPatient = {
13
+ export type SlimPatient = {
14
14
  id: string;
15
- name: CarehubHumanName[];
15
+ name: SlimHumanName[];
16
16
  gender?: "male" | "female" | "other" | "unknown";
17
17
  birthDate?: string;
18
18
  deviceId: string | null;
@@ -21,15 +21,15 @@ export type CarehubPatient = {
21
21
  floor?: string;
22
22
  room?: string;
23
23
  bed?: string;
24
- residentState: CarehubResidentState;
24
+ residentState: SlimResidentState;
25
25
  admissionDate?: string;
26
26
  dischargeDate?: string;
27
27
  };
28
- export type CarehubPatientListItem = {
28
+ export type SlimPatientListItem = {
29
29
  id: string;
30
30
  name: string;
31
31
  nickname: string | null;
32
- residentState: CarehubResidentState;
32
+ residentState: SlimResidentState;
33
33
  admissionDate: string | null;
34
34
  dischargeDate: string | null;
35
35
  organizationId: string | null;
@@ -41,21 +41,21 @@ export type CarehubPatientListItem = {
41
41
  medicalSettings: string | null;
42
42
  bedActivitySettings: string | null;
43
43
  };
44
- export type CarehubPatientListQuery = {
44
+ export type SlimPatientListQuery = {
45
45
  page?: number;
46
46
  count?: number;
47
47
  sortBy?: string;
48
48
  orderBy?: "ASC" | "DESC";
49
49
  search?: string;
50
- residentState?: CarehubResidentState | "all";
50
+ residentState?: SlimResidentState | "all";
51
51
  includeDischargedRecent?: boolean;
52
52
  organizationId?: string;
53
53
  hasDevice?: boolean;
54
54
  medicalSettings?: string;
55
55
  bedActivitySettings?: string;
56
56
  };
57
- export type CarehubCreatePatient = {
58
- name: CarehubHumanName[];
57
+ export type SlimCreatePatient = {
58
+ name: SlimHumanName[];
59
59
  gender?: "male" | "female" | "other" | "unknown";
60
60
  birthDate?: string;
61
61
  deviceId?: string | null;
@@ -63,11 +63,11 @@ export type CarehubCreatePatient = {
63
63
  locationId?: string;
64
64
  admissionDate?: string;
65
65
  };
66
- export type CarehubUpdatePatient = Partial<CarehubCreatePatient> & {
67
- residentState?: CarehubResidentState;
66
+ export type SlimUpdatePatient = Partial<SlimCreatePatient> & {
67
+ residentState?: SlimResidentState;
68
68
  dischargeDate?: string;
69
69
  };
70
- export type CarehubDevice = {
70
+ export type SlimDevice = {
71
71
  name: string;
72
72
  status?: "active" | "inactive" | "entered-in-error" | "unknown";
73
73
  statusReason: Array<{
@@ -85,7 +85,7 @@ export type CarehubDevice = {
85
85
  room?: string;
86
86
  bed?: string;
87
87
  };
88
- export type CarehubDeviceListItem = {
88
+ export type SlimDeviceListItem = {
89
89
  id: string;
90
90
  name: string;
91
91
  thingsboardId?: string;
@@ -99,7 +99,7 @@ export type CarehubDeviceListItem = {
99
99
  lastActivityTime?: string | null;
100
100
  createdAt?: string | null;
101
101
  };
102
- export type CarehubDeviceListQuery = {
102
+ export type SlimDeviceListQuery = {
103
103
  page?: number;
104
104
  count?: number;
105
105
  sortBy?: string;
@@ -111,32 +111,32 @@ export type CarehubDeviceListQuery = {
111
111
  patientId?: string;
112
112
  active?: boolean;
113
113
  };
114
- export type CarehubCreateDevice = {
114
+ export type SlimCreateDevice = {
115
115
  name: string;
116
116
  thingsboardId?: string;
117
117
  organizationId?: string;
118
118
  locationId?: string;
119
119
  patientId?: string;
120
120
  };
121
- export type CarehubUpdateDevice = {
121
+ export type SlimUpdateDevice = {
122
122
  name: string;
123
123
  thingsboardId?: string;
124
124
  organizationId?: string | null;
125
125
  locationId?: string | null;
126
126
  patientId?: string | null;
127
127
  };
128
- export type CarehubAssignDevice = {
128
+ export type SlimAssignDevice = {
129
129
  deviceId: string;
130
130
  projectId: string;
131
131
  locationId?: string;
132
132
  };
133
- export type CarehubTelemetryValue = {
133
+ export type SlimTelemetryValue = {
134
134
  value: string | number | boolean | null;
135
135
  ts: number | null;
136
136
  };
137
- export type CarehubTelemetrySummary = Record<string, CarehubTelemetryValue>;
138
- export type CarehubAlertSummary = Record<string, unknown>;
139
- export type CarehubLiveQuery = {
137
+ export type SlimTelemetrySummary = Record<string, SlimTelemetryValue>;
138
+ export type SlimAlertSummary = Record<string, unknown>;
139
+ export type SlimLiveQuery = {
140
140
  page?: number;
141
141
  count?: number;
142
142
  sortBy?: string;
@@ -145,36 +145,36 @@ export type CarehubLiveQuery = {
145
145
  deviceId?: string;
146
146
  organizationId?: string;
147
147
  effectiveSleepStatus?: string;
148
- residentState?: CarehubResidentState;
148
+ residentState?: SlimResidentState;
149
149
  includeUnassigned?: boolean;
150
150
  };
151
- export type CarehubLiveTelemetry = {
151
+ export type SlimLiveTelemetry = {
152
152
  total: number;
153
153
  page: number;
154
154
  count: number;
155
- telemetry: Record<string, CarehubTelemetrySummary>;
156
- alerts: Record<string, CarehubAlertSummary>;
155
+ telemetry: Record<string, SlimTelemetrySummary>;
156
+ alerts: Record<string, SlimAlertSummary>;
157
157
  };
158
- export type CarehubDeviceTelemetry = {
158
+ export type SlimDeviceTelemetry = {
159
159
  deviceId: string;
160
- telemetry?: CarehubTelemetrySummary;
161
- alerts?: CarehubAlertSummary;
160
+ telemetry?: SlimTelemetrySummary;
161
+ alerts?: SlimAlertSummary;
162
162
  };
163
- export type CarehubObservationIds = {
163
+ export type SlimObservationIds = {
164
164
  heartRate: string | null;
165
165
  respiratoryRate: string | null;
166
166
  sleepStatus: string | null;
167
167
  presenceStatus: string | null;
168
168
  batch?: string | null;
169
169
  };
170
- export type CarehubNotification = {
170
+ export type SlimNotification = {
171
171
  commId: string;
172
172
  status: string;
173
173
  authoredOn: string;
174
174
  type: string;
175
175
  [key: string]: unknown;
176
176
  };
177
- export type CarehubNotificationsQuery = {
177
+ export type SlimNotificationsQuery = {
178
178
  patient?: string;
179
179
  device?: string;
180
180
  status?: string;
@@ -185,26 +185,26 @@ export type CarehubNotificationsQuery = {
185
185
  page?: number;
186
186
  count?: number;
187
187
  };
188
- export type CarehubNotificationsResponse = CarehubPage<CarehubNotification> & {
188
+ export type SlimNotificationsResponse = SlimPage<SlimNotification> & {
189
189
  truncated: {
190
190
  reason: "result-cap" | "scan-budget";
191
191
  limit: number;
192
192
  } | null;
193
193
  };
194
- export type CarehubRecentNotificationsResponse = {
195
- recent: CarehubNotification[];
194
+ export type SlimRecentNotificationsResponse = {
195
+ recent: SlimNotification[];
196
196
  total: number;
197
197
  warm: boolean;
198
198
  source: "redis" | "medplum";
199
199
  };
200
- export type CarehubThreshold = {
200
+ export type SlimThreshold = {
201
201
  id?: string;
202
202
  projectId?: string;
203
203
  status: "active" | "retired";
204
204
  date?: string;
205
205
  settings: Record<string, unknown>;
206
206
  };
207
- export type CarehubTrendPoint = {
207
+ export type SlimTrendPoint = {
208
208
  timestamp: string;
209
209
  timestampMs: number;
210
210
  data: number | null;
@@ -221,17 +221,17 @@ export type CarehubTrendPoint = {
221
221
  deviceModel?: string;
222
222
  deviceId?: string;
223
223
  };
224
- export type CarehubTrends = {
225
- heartRate?: Record<string, CarehubTrendPoint[]>;
226
- respiratoryRate?: Record<string, CarehubTrendPoint[]>;
224
+ export type SlimTrends = {
225
+ heartRate?: Record<string, SlimTrendPoint[]>;
226
+ respiratoryRate?: Record<string, SlimTrendPoint[]>;
227
227
  };
228
- export type CarehubSleepMetric = {
228
+ export type SlimSleepMetric = {
229
229
  current: number | string | null;
230
230
  average: number | string | null;
231
231
  diff: number | null;
232
232
  };
233
- export type CarehubSleepStatistics = Record<string, Record<string, CarehubSleepMetric>>;
234
- export type CarehubLocation = {
233
+ export type SlimSleepStatistics = Record<string, Record<string, SlimSleepMetric>>;
234
+ export type SlimLocation = {
235
235
  id: string;
236
236
  name: string;
237
237
  floor?: string;
@@ -244,7 +244,7 @@ export type CarehubLocation = {
244
244
  deviceId?: string;
245
245
  patientId?: string;
246
246
  };
247
- export type CarehubLocationQuery = {
247
+ export type SlimLocationQuery = {
248
248
  search?: string;
249
249
  floor?: string;
250
250
  room?: string;
@@ -254,19 +254,19 @@ export type CarehubLocationQuery = {
254
254
  page?: number;
255
255
  count?: number;
256
256
  };
257
- export type CarehubCreateLocation = {
257
+ export type SlimCreateLocation = {
258
258
  name: string;
259
259
  floor?: string;
260
260
  room?: string;
261
261
  bed?: string;
262
262
  organizationId?: string;
263
263
  };
264
- export type CarehubUpdateLocation = CarehubCreateLocation & {
264
+ export type SlimUpdateLocation = SlimCreateLocation & {
265
265
  organizationId?: string | null;
266
266
  deviceId?: string | null;
267
267
  patientId?: string;
268
268
  };
269
- export type CarehubZone = {
269
+ export type SlimZone = {
270
270
  zoneId: string;
271
271
  zoneName: string;
272
272
  deviceCount: number;
@@ -274,7 +274,7 @@ export type CarehubZone = {
274
274
  activeDeviceCount: number;
275
275
  inactiveDeviceCount: number;
276
276
  };
277
- export type CarehubZoneDetail = {
277
+ export type SlimZoneDetail = {
278
278
  id: string;
279
279
  name: string;
280
280
  locations: Array<{
@@ -293,13 +293,13 @@ export type CarehubZoneDetail = {
293
293
  }>;
294
294
  }>;
295
295
  };
296
- export type CarehubExportPdf = {
296
+ export type SlimExportPdf = {
297
297
  documentReference: Record<string, unknown>;
298
298
  binary: Record<string, unknown>;
299
299
  downloadUrl: string;
300
300
  expiresAt?: string;
301
301
  };
302
- export type CarehubExportPdfRequest = {
302
+ export type SlimExportPdfRequest = {
303
303
  code: string;
304
304
  mailTo?: string[];
305
305
  timeZone?: string;
@@ -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.6",
51
+ version: "0.4.7",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
@@ -1,7 +1,7 @@
1
1
  import { CapabilityStatement } from "@medplum/fhirtypes";
2
- import { CarehubDeviceListItem, CarehubDeviceListQuery, CarehubDeviceTelemetry, CarehubNotificationsQuery, CarehubNotificationsResponse, CarehubPage, CarehubPatientListItem, CarehubPatientListQuery, CarehubRecentNotificationsResponse } from "../client/carehub/types";
3
2
  import { OvokClient, OvokFhirVersion } from "../client/ovok-client";
4
3
  import { OvokAdministeredProject, OvokProjectFeatures, OvokProjectSettings } from "../client/platform/types";
4
+ import { SlimDeviceListItem, SlimDeviceListQuery, SlimDeviceTelemetry, SlimNotificationsQuery, SlimNotificationsResponse, SlimPage, SlimPatientListItem, SlimPatientListQuery, SlimRecentNotificationsResponse } from "../client/slim/types";
5
5
  import { OvokPublicApiEndpoint } from "../conformance/capability";
6
6
  export type OvokRequestState<T> = {
7
7
  data: T | undefined;
@@ -29,11 +29,11 @@ export declare const usePublicApiEndpoints: (version?: OvokFhirVersion) => OvokR
29
29
  export declare const useAdministeredProjects: (params?: {
30
30
  page?: number;
31
31
  count?: number;
32
- }) => OvokRequestState<CarehubPage<OvokAdministeredProject>>;
32
+ }) => OvokRequestState<SlimPage<OvokAdministeredProject>>;
33
33
  export declare const useProjectSettings: () => OvokRequestState<OvokProjectSettings>;
34
34
  export declare const useProjectFeatures: () => OvokRequestState<OvokProjectFeatures>;
35
- export declare const useCarehubPatients: (params?: CarehubPatientListQuery) => OvokRequestState<CarehubPage<CarehubPatientListItem>>;
36
- export declare const useCarehubDevices: (params?: CarehubDeviceListQuery) => OvokRequestState<CarehubPage<CarehubDeviceListItem>>;
37
- export declare const useCarehubDeviceTelemetry: (deviceId?: string) => OvokRequestState<CarehubDeviceTelemetry>;
38
- export declare const useCarehubNotifications: (params?: CarehubNotificationsQuery) => OvokRequestState<CarehubNotificationsResponse>;
39
- export declare const useRecentCarehubNotifications: (count?: number) => OvokRequestState<CarehubRecentNotificationsResponse>;
35
+ export declare const useSlimPatients: (params?: SlimPatientListQuery) => OvokRequestState<SlimPage<SlimPatientListItem>>;
36
+ export declare const useSlimDevices: (params?: SlimDeviceListQuery) => OvokRequestState<SlimPage<SlimDeviceListItem>>;
37
+ export declare const useSlimDeviceTelemetry: (deviceId?: string) => OvokRequestState<SlimDeviceTelemetry>;
38
+ export declare const useSlimNotifications: (params?: SlimNotificationsQuery) => OvokRequestState<SlimNotificationsResponse>;
39
+ export declare const useRecentSlimNotifications: (count?: number) => OvokRequestState<SlimRecentNotificationsResponse>;
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  };
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.useRecentCarehubNotifications = exports.useCarehubNotifications = exports.useCarehubDeviceTelemetry = exports.useCarehubDevices = exports.useCarehubPatients = exports.useProjectFeatures = exports.useProjectSettings = exports.useAdministeredProjects = exports.usePublicApiEndpoints = exports.useCapabilityStatement = void 0;
37
+ exports.useRecentSlimNotifications = exports.useSlimNotifications = exports.useSlimDeviceTelemetry = exports.useSlimDevices = exports.useSlimPatients = exports.useProjectFeatures = exports.useProjectSettings = exports.useAdministeredProjects = exports.usePublicApiEndpoints = exports.useCapabilityStatement = void 0;
38
38
  exports.useOvokRequest = useOvokRequest;
39
39
  exports.useOvokMutation = useOvokMutation;
40
40
  const React = __importStar(require("react"));
@@ -142,38 +142,38 @@ const useProjectFeatures = () => {
142
142
  return useOvokRequest(load);
143
143
  };
144
144
  exports.useProjectFeatures = useProjectFeatures;
145
- const useCarehubPatients = (params = {}) => {
145
+ const useSlimPatients = (params = {}) => {
146
146
  const client = (0, index_1.useClient)();
147
147
  const serialized = JSON.stringify(params);
148
- const load = React.useCallback(() => client.listCarehubPatients(params), [client, serialized]);
148
+ const load = React.useCallback(() => client.listSlimPatients(params), [client, serialized]);
149
149
  return useOvokRequest(load);
150
150
  };
151
- exports.useCarehubPatients = useCarehubPatients;
152
- const useCarehubDevices = (params = {}) => {
151
+ exports.useSlimPatients = useSlimPatients;
152
+ const useSlimDevices = (params = {}) => {
153
153
  const client = (0, index_1.useClient)();
154
154
  const serialized = JSON.stringify(params);
155
- const load = React.useCallback(() => client.listCarehubDevices(params), [client, serialized]);
155
+ const load = React.useCallback(() => client.listSlimDevices(params), [client, serialized]);
156
156
  return useOvokRequest(load);
157
157
  };
158
- exports.useCarehubDevices = useCarehubDevices;
159
- const useCarehubDeviceTelemetry = (deviceId) => {
158
+ exports.useSlimDevices = useSlimDevices;
159
+ const useSlimDeviceTelemetry = (deviceId) => {
160
160
  const client = (0, index_1.useClient)();
161
161
  const load = React.useCallback(() => deviceId
162
- ? client.getCarehubDeviceTelemetry(deviceId)
162
+ ? client.getSlimDeviceTelemetry(deviceId)
163
163
  : Promise.reject(new Error("deviceId is required")), [client, deviceId]);
164
164
  return useOvokRequest(load, deviceId !== undefined);
165
165
  };
166
- exports.useCarehubDeviceTelemetry = useCarehubDeviceTelemetry;
167
- const useCarehubNotifications = (params = {}) => {
166
+ exports.useSlimDeviceTelemetry = useSlimDeviceTelemetry;
167
+ const useSlimNotifications = (params = {}) => {
168
168
  const client = (0, index_1.useClient)();
169
169
  const serialized = JSON.stringify(params);
170
- const load = React.useCallback(() => client.listCarehubNotifications(params), [client, serialized]);
170
+ const load = React.useCallback(() => client.listSlimNotifications(params), [client, serialized]);
171
171
  return useOvokRequest(load);
172
172
  };
173
- exports.useCarehubNotifications = useCarehubNotifications;
174
- const useRecentCarehubNotifications = (count) => {
173
+ exports.useSlimNotifications = useSlimNotifications;
174
+ const useRecentSlimNotifications = (count) => {
175
175
  const client = (0, index_1.useClient)();
176
- const load = React.useCallback(() => client.getRecentCarehubNotifications(count), [client, count]);
176
+ const load = React.useCallback(() => client.getRecentSlimNotifications(count), [client, count]);
177
177
  return useOvokRequest(load);
178
178
  };
179
- exports.useRecentCarehubNotifications = useRecentCarehubNotifications;
179
+ exports.useRecentSlimNotifications = useRecentSlimNotifications;
@@ -6,7 +6,7 @@ export declare const OvokProvider: (props: React.PropsWithChildren<{
6
6
  client: OvokClient;
7
7
  }>) => React.JSX.Element;
8
8
  export { observationsToMeasurements, useEcgRecording, useObservations, useSaveMeasurement, useUrineTests, } from "./observation-hooks";
9
- export { useAdministeredProjects, useCarehubDeviceTelemetry, useCarehubDevices, useCarehubNotifications, useCarehubPatients, useCapabilityStatement, useOvokMutation, useOvokRequest, useProjectFeatures, useProjectSettings, usePublicApiEndpoints, useRecentCarehubNotifications, } from "./api-hooks";
9
+ export { useAdministeredProjects, useSlimDeviceTelemetry, useSlimDevices, useSlimNotifications, useSlimPatients, useCapabilityStatement, useOvokMutation, useOvokRequest, useProjectFeatures, useProjectSettings, usePublicApiEndpoints, useRecentSlimNotifications, } from "./api-hooks";
10
10
  export { useConsentSignature, useContent, useCreateVideoCallAppointment, useCreateVideoCallUserAccess, useDocuments, useVideoCallAccess, useVideoCallAppointments, } from "./experience-hooks";
11
11
  export { useI18nextDocument, useLocales, useLocalizations, useUpdateI18nextDocument, useUpdateLocalization, useUpdateProjectTextSetting, } from "./platform-hooks";
12
12
  export { useEmailTemplates } from "./email-hooks";
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  };
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.usePatientAppointments = exports.useExtractQuestionnaireObservations = exports.useCurrentPatientProfile = exports.useInvitePractitioner = exports.useInvitePatient = exports.useAcceptInvite = exports.useEmailTemplates = exports.useUpdateProjectTextSetting = exports.useUpdateLocalization = exports.useUpdateI18nextDocument = exports.useLocalizations = exports.useLocales = exports.useI18nextDocument = exports.useVideoCallAppointments = exports.useVideoCallAccess = exports.useDocuments = exports.useCreateVideoCallUserAccess = exports.useCreateVideoCallAppointment = exports.useContent = exports.useConsentSignature = exports.useRecentCarehubNotifications = exports.usePublicApiEndpoints = exports.useProjectSettings = exports.useProjectFeatures = exports.useOvokRequest = exports.useOvokMutation = exports.useCapabilityStatement = exports.useCarehubPatients = exports.useCarehubNotifications = exports.useCarehubDevices = exports.useCarehubDeviceTelemetry = exports.useAdministeredProjects = exports.useUrineTests = exports.useSaveMeasurement = exports.useObservations = exports.useEcgRecording = exports.observationsToMeasurements = exports.OvokProvider = exports.useClient = exports.useCachedBinaryUrl = exports.reactContext = exports.useSubscription = exports.useSearchResources = exports.useSearchOne = exports.useSearch = exports.useResource = exports.usePrevious = exports.useMedplumProfile = exports.useMedplumNavigate = exports.useMedplumContext = void 0;
37
+ exports.usePatientAppointments = exports.useExtractQuestionnaireObservations = exports.useCurrentPatientProfile = exports.useInvitePractitioner = exports.useInvitePatient = exports.useAcceptInvite = exports.useEmailTemplates = exports.useUpdateProjectTextSetting = exports.useUpdateLocalization = exports.useUpdateI18nextDocument = exports.useLocalizations = exports.useLocales = exports.useI18nextDocument = exports.useVideoCallAppointments = exports.useVideoCallAccess = exports.useDocuments = exports.useCreateVideoCallUserAccess = exports.useCreateVideoCallAppointment = exports.useContent = exports.useConsentSignature = exports.useRecentSlimNotifications = exports.usePublicApiEndpoints = exports.useProjectSettings = exports.useProjectFeatures = exports.useOvokRequest = exports.useOvokMutation = exports.useCapabilityStatement = exports.useSlimPatients = exports.useSlimNotifications = exports.useSlimDevices = exports.useSlimDeviceTelemetry = exports.useAdministeredProjects = exports.useUrineTests = exports.useSaveMeasurement = exports.useObservations = exports.useEcgRecording = exports.observationsToMeasurements = exports.OvokProvider = exports.useClient = exports.useCachedBinaryUrl = exports.reactContext = exports.useSubscription = exports.useSearchResources = exports.useSearchOne = exports.useSearch = exports.useResource = exports.usePrevious = exports.useMedplumProfile = exports.useMedplumNavigate = exports.useMedplumContext = void 0;
38
38
  exports.useUpdateSignalsSettings = exports.useSignalsThresholds = exports.useSignalsSettings = exports.useSignalsAlerts = exports.useSignalsAlert = exports.useSetSignalsThreshold = exports.useRemoveSignalsThreshold = exports.useEnableSignalsForPatient = exports.useAcknowledgeSignalsAlert = exports.useUpdatePatientSharingSettings = exports.useRevokePatientSharing = exports.useRedeemPatientSharingInvite = exports.usePatientSharingSettings = exports.usePatientSharing = exports.useCreatePatientSharingInvite = exports.useSubmitQuestionnaireResponse = exports.usePopulateQuestionnaire = exports.usePatientSlots = exports.usePatientSchedules = exports.usePatientQuestionnaires = exports.usePatientQuestionnaireResponses = exports.usePatientNotifications = exports.usePatientLatestObservations = exports.usePatientDashboard = exports.usePatientMeasurementHistory = exports.usePatientMeasurement = exports.usePatientDeviceTelemetryHistory = exports.usePatientDeviceTelemetry = exports.usePatientDevices = exports.usePatientCarePlans = void 0;
39
39
  /*
40
40
  * The only React-dependent module in the package.
@@ -79,17 +79,17 @@ Object.defineProperty(exports, "useSaveMeasurement", { enumerable: true, get: fu
79
79
  Object.defineProperty(exports, "useUrineTests", { enumerable: true, get: function () { return observation_hooks_1.useUrineTests; } });
80
80
  var api_hooks_1 = require("./api-hooks");
81
81
  Object.defineProperty(exports, "useAdministeredProjects", { enumerable: true, get: function () { return api_hooks_1.useAdministeredProjects; } });
82
- Object.defineProperty(exports, "useCarehubDeviceTelemetry", { enumerable: true, get: function () { return api_hooks_1.useCarehubDeviceTelemetry; } });
83
- Object.defineProperty(exports, "useCarehubDevices", { enumerable: true, get: function () { return api_hooks_1.useCarehubDevices; } });
84
- Object.defineProperty(exports, "useCarehubNotifications", { enumerable: true, get: function () { return api_hooks_1.useCarehubNotifications; } });
85
- Object.defineProperty(exports, "useCarehubPatients", { enumerable: true, get: function () { return api_hooks_1.useCarehubPatients; } });
82
+ Object.defineProperty(exports, "useSlimDeviceTelemetry", { enumerable: true, get: function () { return api_hooks_1.useSlimDeviceTelemetry; } });
83
+ Object.defineProperty(exports, "useSlimDevices", { enumerable: true, get: function () { return api_hooks_1.useSlimDevices; } });
84
+ Object.defineProperty(exports, "useSlimNotifications", { enumerable: true, get: function () { return api_hooks_1.useSlimNotifications; } });
85
+ Object.defineProperty(exports, "useSlimPatients", { enumerable: true, get: function () { return api_hooks_1.useSlimPatients; } });
86
86
  Object.defineProperty(exports, "useCapabilityStatement", { enumerable: true, get: function () { return api_hooks_1.useCapabilityStatement; } });
87
87
  Object.defineProperty(exports, "useOvokMutation", { enumerable: true, get: function () { return api_hooks_1.useOvokMutation; } });
88
88
  Object.defineProperty(exports, "useOvokRequest", { enumerable: true, get: function () { return api_hooks_1.useOvokRequest; } });
89
89
  Object.defineProperty(exports, "useProjectFeatures", { enumerable: true, get: function () { return api_hooks_1.useProjectFeatures; } });
90
90
  Object.defineProperty(exports, "useProjectSettings", { enumerable: true, get: function () { return api_hooks_1.useProjectSettings; } });
91
91
  Object.defineProperty(exports, "usePublicApiEndpoints", { enumerable: true, get: function () { return api_hooks_1.usePublicApiEndpoints; } });
92
- Object.defineProperty(exports, "useRecentCarehubNotifications", { enumerable: true, get: function () { return api_hooks_1.useRecentCarehubNotifications; } });
92
+ Object.defineProperty(exports, "useRecentSlimNotifications", { enumerable: true, get: function () { return api_hooks_1.useRecentSlimNotifications; } });
93
93
  var experience_hooks_1 = require("./experience-hooks");
94
94
  Object.defineProperty(exports, "useConsentSignature", { enumerable: true, get: function () { return experience_hooks_1.useConsentSignature; } });
95
95
  Object.defineProperty(exports, "useContent", { enumerable: true, get: function () { return experience_hooks_1.useContent; } });
package/dist/index.d.ts CHANGED
@@ -942,7 +942,7 @@ export * from "./conformance/capability";
942
942
  export * from "./client/platform/types";
943
943
  export * from "./client/email";
944
944
  export * from "./client/invites";
945
- export * from "./client/carehub/types";
945
+ export * from "./client/slim/types";
946
946
  export * from "./client/experience/types";
947
947
  export * from "./client/patient/types";
948
948
  export * from "./client/patient-sharing";
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ __exportStar(require("./conformance/capability"), exports);
63
63
  __exportStar(require("./client/platform/types"), exports);
64
64
  __exportStar(require("./client/email"), exports);
65
65
  __exportStar(require("./client/invites"), exports);
66
- __exportStar(require("./client/carehub/types"), exports);
66
+ __exportStar(require("./client/slim/types"), exports);
67
67
  __exportStar(require("./client/experience/types"), exports);
68
68
  __exportStar(require("./client/patient/types"), exports);
69
69
  __exportStar(require("./client/patient-sharing"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,71 +0,0 @@
1
- import { Bundle, Resource } from "@medplum/fhirtypes";
2
- import { OvokClient } from "../ovok-client";
3
- import { CarehubAssignDevice, CarehubCreateDevice, CarehubCreateLocation, CarehubCreatePatient, CarehubDevice, CarehubDeviceListItem, CarehubDeviceListQuery, CarehubDeviceTelemetry, CarehubExportPdf, CarehubExportPdfRequest, CarehubLiveQuery, CarehubLiveTelemetry, CarehubLocation, CarehubLocationQuery, CarehubNotification, CarehubNotificationsQuery, CarehubNotificationsResponse, CarehubObservationIds, CarehubPage, CarehubPatient, CarehubPatientListItem, CarehubPatientListQuery, CarehubRecentNotificationsResponse, CarehubSleepStatistics, CarehubThreshold, CarehubTrends, CarehubUpdateDevice, CarehubUpdateLocation, CarehubUpdatePatient, CarehubZone, CarehubZoneDetail } from "./types";
4
- export declare function listCarehubPatients(this: OvokClient, params?: CarehubPatientListQuery): Promise<CarehubPage<CarehubPatientListItem>>;
5
- export declare function getCarehubPatient(this: OvokClient, patientId: string): Promise<CarehubPatient>;
6
- export declare function getCarehubPatientEverything(this: OvokClient, patientId: string): Promise<Bundle<Resource>>;
7
- export declare function getCarehubPatientCurrentVitals(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
8
- export declare function createCarehubPatient(this: OvokClient, body: CarehubCreatePatient): Promise<CarehubPatient>;
9
- export declare function updateCarehubPatient(this: OvokClient, patientId: string, body: CarehubUpdatePatient): Promise<CarehubPatient>;
10
- export declare function deleteCarehubPatient(this: OvokClient, patientId: string): Promise<void>;
11
- export declare function listCarehubDevices(this: OvokClient, params?: CarehubDeviceListQuery): Promise<CarehubPage<CarehubDeviceListItem>>;
12
- export declare function getCarehubDevice(this: OvokClient, deviceId: string): Promise<CarehubDevice>;
13
- export declare function createCarehubDevice(this: OvokClient, body: CarehubCreateDevice): Promise<CarehubDevice>;
14
- export declare function updateCarehubDevice(this: OvokClient, deviceId: string, body: CarehubUpdateDevice): Promise<CarehubDevice>;
15
- export declare function deleteCarehubDevice(this: OvokClient, deviceId: string): Promise<void>;
16
- export declare function assignCarehubDeviceToProject(this: OvokClient, body: CarehubAssignDevice): Promise<CarehubDevice>;
17
- export declare function listCarehubLiveDevices(this: OvokClient, params?: CarehubLiveQuery): Promise<CarehubPage<Record<string, unknown>>>;
18
- export declare function listCarehubLiveTelemetry(this: OvokClient, params?: CarehubLiveQuery): Promise<CarehubLiveTelemetry>;
19
- export declare function getCarehubDeviceSleepStatus(this: OvokClient, deviceId: string): Promise<Record<string, unknown>>;
20
- export declare function getCarehubDeviceTelemetry(this: OvokClient, deviceId: string): Promise<CarehubDeviceTelemetry>;
21
- export declare function listCarehubEffectiveObservationIds(this: OvokClient): Promise<Record<string, CarehubObservationIds>>;
22
- export declare function listCarehubLastObservationIds(this: OvokClient): Promise<Record<string, CarehubObservationIds>>;
23
- export declare function getCarehubDeviceEffectiveObservationIds(this: OvokClient, deviceId: string): Promise<Omit<CarehubObservationIds, "batch">>;
24
- export declare function getCarehubDeviceLastObservationIds(this: OvokClient, deviceId: string): Promise<CarehubObservationIds>;
25
- export declare function listCarehubNotifications(this: OvokClient, params?: CarehubNotificationsQuery): Promise<CarehubNotificationsResponse>;
26
- export declare function getRecentCarehubNotifications(this: OvokClient, count?: number): Promise<CarehubRecentNotificationsResponse>;
27
- export declare function listCarehubOutOfBedNotifications(this: OvokClient, params?: Omit<CarehubNotificationsQuery, "type">): Promise<CarehubNotificationsResponse>;
28
- export declare function listCarehubMedicalNotifications(this: OvokClient, params?: CarehubNotificationsQuery): Promise<CarehubNotificationsResponse>;
29
- export declare function getRecentCarehubMedicalNotifications(this: OvokClient, count?: number): Promise<CarehubRecentNotificationsResponse>;
30
- export declare function getCarehubMedicalNotification(this: OvokClient, episodeId: string): Promise<CarehubNotification>;
31
- export declare function acknowledgeCarehubMedicalNotification(this: OvokClient, episodeId: string): Promise<CarehubNotification>;
32
- export declare function acknowledgeCarehubNotification(this: OvokClient, notificationId: string): Promise<CarehubNotification>;
33
- export declare function getCarehubThreshold(this: OvokClient): Promise<CarehubThreshold>;
34
- export declare function updateCarehubThreshold(this: OvokClient, body: Record<string, unknown>): Promise<CarehubThreshold>;
35
- export declare function getCarehubPatientThreshold(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
36
- export declare function updateCarehubPatientThreshold(this: OvokClient, patientId: string, body: Record<string, unknown>): Promise<Record<string, unknown>>;
37
- export declare function getCarehubThresholdV2(this: OvokClient): Promise<Record<string, unknown>>;
38
- export declare function updateCarehubThresholdV2(this: OvokClient, body: Record<string, unknown>): Promise<Record<string, unknown>>;
39
- export declare function getCarehubPatientThresholdV2(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
40
- export declare function updateCarehubPatientThresholdV2(this: OvokClient, patientId: string, body: Record<string, unknown>): Promise<Record<string, unknown>>;
41
- export declare function getCarehubTrends(this: OvokClient, params: {
42
- patientId: string;
43
- startDate: string;
44
- endDate: string;
45
- graphType: string;
46
- }): Promise<CarehubTrends>;
47
- export declare function getCarehubSleepStatistics(this: OvokClient, params: {
48
- endDate: string;
49
- lastDayCount?: number;
50
- patientId: string;
51
- }): Promise<CarehubSleepStatistics>;
52
- export declare function listCarehubLocations(this: OvokClient, params?: CarehubLocationQuery): Promise<CarehubPage<CarehubLocation>>;
53
- export declare function getCarehubLocation(this: OvokClient, locationId: string): Promise<CarehubLocation>;
54
- export declare function createCarehubLocation(this: OvokClient, body: CarehubCreateLocation): Promise<CarehubLocation>;
55
- export declare function updateCarehubLocation(this: OvokClient, locationId: string, body: CarehubUpdateLocation): Promise<CarehubLocation>;
56
- export declare function deleteCarehubLocation(this: OvokClient, locationId: string): Promise<void>;
57
- export declare function listCarehubZones(this: OvokClient, params?: {
58
- page?: number;
59
- count?: number;
60
- sortBy?: string;
61
- orderBy?: "ASC" | "DESC";
62
- search?: string;
63
- }): Promise<CarehubPage<CarehubZone>>;
64
- export declare function getCarehubZone(this: OvokClient, zoneId: string): Promise<CarehubZoneDetail>;
65
- export declare function getCarehubZoneDeviceCounts(this: OvokClient, params?: {
66
- all?: boolean;
67
- effectiveSleepStatus?: string;
68
- includeUnassigned?: boolean;
69
- includeEmpty?: boolean;
70
- }): Promise<Record<string, unknown>>;
71
- export declare function exportCarehubPatientPdf(this: OvokClient, body: CarehubExportPdfRequest): Promise<CarehubExportPdf>;
@@ -1,205 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listCarehubPatients = listCarehubPatients;
4
- exports.getCarehubPatient = getCarehubPatient;
5
- exports.getCarehubPatientEverything = getCarehubPatientEverything;
6
- exports.getCarehubPatientCurrentVitals = getCarehubPatientCurrentVitals;
7
- exports.createCarehubPatient = createCarehubPatient;
8
- exports.updateCarehubPatient = updateCarehubPatient;
9
- exports.deleteCarehubPatient = deleteCarehubPatient;
10
- exports.listCarehubDevices = listCarehubDevices;
11
- exports.getCarehubDevice = getCarehubDevice;
12
- exports.createCarehubDevice = createCarehubDevice;
13
- exports.updateCarehubDevice = updateCarehubDevice;
14
- exports.deleteCarehubDevice = deleteCarehubDevice;
15
- exports.assignCarehubDeviceToProject = assignCarehubDeviceToProject;
16
- exports.listCarehubLiveDevices = listCarehubLiveDevices;
17
- exports.listCarehubLiveTelemetry = listCarehubLiveTelemetry;
18
- exports.getCarehubDeviceSleepStatus = getCarehubDeviceSleepStatus;
19
- exports.getCarehubDeviceTelemetry = getCarehubDeviceTelemetry;
20
- exports.listCarehubEffectiveObservationIds = listCarehubEffectiveObservationIds;
21
- exports.listCarehubLastObservationIds = listCarehubLastObservationIds;
22
- exports.getCarehubDeviceEffectiveObservationIds = getCarehubDeviceEffectiveObservationIds;
23
- exports.getCarehubDeviceLastObservationIds = getCarehubDeviceLastObservationIds;
24
- exports.listCarehubNotifications = listCarehubNotifications;
25
- exports.getRecentCarehubNotifications = getRecentCarehubNotifications;
26
- exports.listCarehubOutOfBedNotifications = listCarehubOutOfBedNotifications;
27
- exports.listCarehubMedicalNotifications = listCarehubMedicalNotifications;
28
- exports.getRecentCarehubMedicalNotifications = getRecentCarehubMedicalNotifications;
29
- exports.getCarehubMedicalNotification = getCarehubMedicalNotification;
30
- exports.acknowledgeCarehubMedicalNotification = acknowledgeCarehubMedicalNotification;
31
- exports.acknowledgeCarehubNotification = acknowledgeCarehubNotification;
32
- exports.getCarehubThreshold = getCarehubThreshold;
33
- exports.updateCarehubThreshold = updateCarehubThreshold;
34
- exports.getCarehubPatientThreshold = getCarehubPatientThreshold;
35
- exports.updateCarehubPatientThreshold = updateCarehubPatientThreshold;
36
- exports.getCarehubThresholdV2 = getCarehubThresholdV2;
37
- exports.updateCarehubThresholdV2 = updateCarehubThresholdV2;
38
- exports.getCarehubPatientThresholdV2 = getCarehubPatientThresholdV2;
39
- exports.updateCarehubPatientThresholdV2 = updateCarehubPatientThresholdV2;
40
- exports.getCarehubTrends = getCarehubTrends;
41
- exports.getCarehubSleepStatistics = getCarehubSleepStatistics;
42
- exports.listCarehubLocations = listCarehubLocations;
43
- exports.getCarehubLocation = getCarehubLocation;
44
- exports.createCarehubLocation = createCarehubLocation;
45
- exports.updateCarehubLocation = updateCarehubLocation;
46
- exports.deleteCarehubLocation = deleteCarehubLocation;
47
- exports.listCarehubZones = listCarehubZones;
48
- exports.getCarehubZone = getCarehubZone;
49
- exports.getCarehubZoneDeviceCounts = getCarehubZoneDeviceCounts;
50
- exports.exportCarehubPatientPdf = exportCarehubPatientPdf;
51
- const query = (params) => {
52
- const values = new URLSearchParams();
53
- for (const [key, value] of Object.entries(params)) {
54
- if (value !== undefined) {
55
- values.set(key, String(value));
56
- }
57
- }
58
- const encoded = values.toString();
59
- return encoded === "" ? "" : `?${encoded}`;
60
- };
61
- const segment = (value) => encodeURIComponent(value);
62
- async function listCarehubPatients(params = {}) {
63
- return this.get(`/v1/slim/patient${query(params)}`);
64
- }
65
- async function getCarehubPatient(patientId) {
66
- return this.get(`/v1/slim/patient/${segment(patientId)}`);
67
- }
68
- async function getCarehubPatientEverything(patientId) {
69
- return this.get(`/v1/slim/patient/${segment(patientId)}/$everything`);
70
- }
71
- async function getCarehubPatientCurrentVitals(patientId) {
72
- return this.get(`/v1/slim/patient/${segment(patientId)}/current-vitals`);
73
- }
74
- async function createCarehubPatient(body) {
75
- return this.post("/v1/slim/patient", body);
76
- }
77
- async function updateCarehubPatient(patientId, body) {
78
- return (await this.put(`/v1/slim/patient/${segment(patientId)}`, body));
79
- }
80
- async function deleteCarehubPatient(patientId) {
81
- await this.delete(`/v1/slim/patient/${segment(patientId)}`);
82
- }
83
- async function listCarehubDevices(params = {}) {
84
- return this.get(`/v1/slim/device${query(params)}`);
85
- }
86
- async function getCarehubDevice(deviceId) {
87
- return this.get(`/v1/slim/device/${segment(deviceId)}`);
88
- }
89
- async function createCarehubDevice(body) {
90
- return this.post("/v1/slim/device", body);
91
- }
92
- async function updateCarehubDevice(deviceId, body) {
93
- return (await this.put(`/v1/slim/device/${segment(deviceId)}`, body));
94
- }
95
- async function deleteCarehubDevice(deviceId) {
96
- await this.delete(`/v1/slim/device/${segment(deviceId)}`);
97
- }
98
- async function assignCarehubDeviceToProject(body) {
99
- return (await this.put("/v1/slim/device/assign/project", body));
100
- }
101
- async function listCarehubLiveDevices(params = {}) {
102
- return this.get(`/v1/slim/device/live${query(params)}`);
103
- }
104
- async function listCarehubLiveTelemetry(params = {}) {
105
- return this.get(`/v1/slim/device/live/telemetry${query(params)}`);
106
- }
107
- async function getCarehubDeviceSleepStatus(deviceId) {
108
- return this.get(`/v1/slim/device/live/cloudwatch/${segment(deviceId)}`);
109
- }
110
- async function getCarehubDeviceTelemetry(deviceId) {
111
- return this.get(`/v1/slim/telemetry/${segment(deviceId)}`);
112
- }
113
- async function listCarehubEffectiveObservationIds() {
114
- return this.get("/v1/slim/telemetry/effectiveIds");
115
- }
116
- async function listCarehubLastObservationIds() {
117
- return this.get("/v1/slim/telemetry/lastIds");
118
- }
119
- async function getCarehubDeviceEffectiveObservationIds(deviceId) {
120
- return this.get(`/v1/slim/telemetry/${segment(deviceId)}/effectiveIds`);
121
- }
122
- async function getCarehubDeviceLastObservationIds(deviceId) {
123
- return this.get(`/v1/slim/telemetry/${segment(deviceId)}/lastIds`);
124
- }
125
- async function listCarehubNotifications(params = {}) {
126
- return this.get(`/v1/slim/notifications${query(params)}`);
127
- }
128
- async function getRecentCarehubNotifications(count) {
129
- return this.get(`/v1/slim/notifications/recent${query({ count })}`);
130
- }
131
- async function listCarehubOutOfBedNotifications(params = {}) {
132
- return this.get(`/v1/slim/notifications/oob${query(params)}`);
133
- }
134
- async function listCarehubMedicalNotifications(params = {}) {
135
- return this.get(`/v1/slim/notifications/medical${query(params)}`);
136
- }
137
- async function getRecentCarehubMedicalNotifications(count) {
138
- return this.get(`/v1/slim/notifications/recent/medical${query({ count })}`);
139
- }
140
- async function getCarehubMedicalNotification(episodeId) {
141
- return this.get(`/v1/slim/notifications/medical/${segment(episodeId)}`);
142
- }
143
- async function acknowledgeCarehubMedicalNotification(episodeId) {
144
- return this.post(`/v1/slim/notifications/medical/${segment(episodeId)}/ack`);
145
- }
146
- async function acknowledgeCarehubNotification(notificationId) {
147
- return (await this.patch(`/v1/slim/notifications/${segment(notificationId)}/ack`, []));
148
- }
149
- async function getCarehubThreshold() {
150
- return this.get("/v1/slim/threshold");
151
- }
152
- async function updateCarehubThreshold(body) {
153
- return (await this.put("/v1/slim/threshold", body));
154
- }
155
- async function getCarehubPatientThreshold(patientId) {
156
- return this.get(`/v1/slim/threshold/patient/${segment(patientId)}`);
157
- }
158
- async function updateCarehubPatientThreshold(patientId, body) {
159
- return (await this.put(`/v1/slim/threshold/patient/${segment(patientId)}`, body));
160
- }
161
- async function getCarehubThresholdV2() {
162
- return this.get("/v2/slim/threshold");
163
- }
164
- async function updateCarehubThresholdV2(body) {
165
- return (await this.put("/v2/slim/threshold", body));
166
- }
167
- async function getCarehubPatientThresholdV2(patientId) {
168
- return this.get(`/v2/slim/threshold/patient/${segment(patientId)}`);
169
- }
170
- async function updateCarehubPatientThresholdV2(patientId, body) {
171
- return (await this.put(`/v2/slim/threshold/patient/${segment(patientId)}`, body));
172
- }
173
- async function getCarehubTrends(params) {
174
- return this.get(`/v1/slim/trends/graphs${query(params)}`);
175
- }
176
- async function getCarehubSleepStatistics(params) {
177
- return this.get(`/v1/slim/sleep/statistics${query(params)}`);
178
- }
179
- async function listCarehubLocations(params = {}) {
180
- return this.get(`/v1/slim/location${query(params)}`);
181
- }
182
- async function getCarehubLocation(locationId) {
183
- return this.get(`/v1/slim/location/${segment(locationId)}`);
184
- }
185
- async function createCarehubLocation(body) {
186
- return this.post("/v1/slim/location", body);
187
- }
188
- async function updateCarehubLocation(locationId, body) {
189
- return (await this.put(`/v1/slim/location/${segment(locationId)}`, body));
190
- }
191
- async function deleteCarehubLocation(locationId) {
192
- await this.delete(`/v1/slim/location/${segment(locationId)}`);
193
- }
194
- async function listCarehubZones(params = {}) {
195
- return this.get(`/v1/slim/zones${query(params)}`);
196
- }
197
- async function getCarehubZone(zoneId) {
198
- return this.get(`/v1/slim/zones/${segment(zoneId)}`);
199
- }
200
- async function getCarehubZoneDeviceCounts(params = {}) {
201
- return this.get(`/v1/slim/zones/device-counts${query(params)}`);
202
- }
203
- async function exportCarehubPatientPdf(body) {
204
- return this.post("/v1/slim/export/pdf", body);
205
- }
File without changes