@ovok/core 0.4.0 → 0.4.1
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
|
@@ -153,7 +153,7 @@ const slots = await client.listPatientSlots({
|
|
|
153
153
|
|
|
154
154
|
## CareHub APIs
|
|
155
155
|
|
|
156
|
-
CareHub methods cover the verified `/v1/
|
|
156
|
+
CareHub methods cover the verified `/v1/slim/*` and `/v2/slim/*` application routes for
|
|
157
157
|
patients, devices, telemetry, notifications, thresholds, trends, sleep, locations, zones, and
|
|
158
158
|
PDF export. These routes require the backend's bearer session and CareHub permissions.
|
|
159
159
|
|
|
@@ -60,146 +60,146 @@ const query = (params) => {
|
|
|
60
60
|
};
|
|
61
61
|
const segment = (value) => encodeURIComponent(value);
|
|
62
62
|
async function listCarehubPatients(params = {}) {
|
|
63
|
-
return this.get(`/v1/
|
|
63
|
+
return this.get(`/v1/slim/patient${query(params)}`);
|
|
64
64
|
}
|
|
65
65
|
async function getCarehubPatient(patientId) {
|
|
66
|
-
return this.get(`/v1/
|
|
66
|
+
return this.get(`/v1/slim/patient/${segment(patientId)}`);
|
|
67
67
|
}
|
|
68
68
|
async function getCarehubPatientEverything(patientId) {
|
|
69
|
-
return this.get(`/v1/
|
|
69
|
+
return this.get(`/v1/slim/patient/${segment(patientId)}/$everything`);
|
|
70
70
|
}
|
|
71
71
|
async function getCarehubPatientCurrentVitals(patientId) {
|
|
72
|
-
return this.get(`/v1/
|
|
72
|
+
return this.get(`/v1/slim/patient/${segment(patientId)}/current-vitals`);
|
|
73
73
|
}
|
|
74
74
|
async function createCarehubPatient(body) {
|
|
75
|
-
return this.post("/v1/
|
|
75
|
+
return this.post("/v1/slim/patient", body);
|
|
76
76
|
}
|
|
77
77
|
async function updateCarehubPatient(patientId, body) {
|
|
78
|
-
return (await this.put(`/v1/
|
|
78
|
+
return (await this.put(`/v1/slim/patient/${segment(patientId)}`, body));
|
|
79
79
|
}
|
|
80
80
|
async function deleteCarehubPatient(patientId) {
|
|
81
|
-
await this.delete(`/v1/
|
|
81
|
+
await this.delete(`/v1/slim/patient/${segment(patientId)}`);
|
|
82
82
|
}
|
|
83
83
|
async function listCarehubDevices(params = {}) {
|
|
84
|
-
return this.get(`/v1/
|
|
84
|
+
return this.get(`/v1/slim/device${query(params)}`);
|
|
85
85
|
}
|
|
86
86
|
async function getCarehubDevice(deviceId) {
|
|
87
|
-
return this.get(`/v1/
|
|
87
|
+
return this.get(`/v1/slim/device/${segment(deviceId)}`);
|
|
88
88
|
}
|
|
89
89
|
async function createCarehubDevice(body) {
|
|
90
|
-
return this.post("/v1/
|
|
90
|
+
return this.post("/v1/slim/device", body);
|
|
91
91
|
}
|
|
92
92
|
async function updateCarehubDevice(deviceId, body) {
|
|
93
|
-
return (await this.put(`/v1/
|
|
93
|
+
return (await this.put(`/v1/slim/device/${segment(deviceId)}`, body));
|
|
94
94
|
}
|
|
95
95
|
async function deleteCarehubDevice(deviceId) {
|
|
96
|
-
await this.delete(`/v1/
|
|
96
|
+
await this.delete(`/v1/slim/device/${segment(deviceId)}`);
|
|
97
97
|
}
|
|
98
98
|
async function assignCarehubDeviceToProject(body) {
|
|
99
|
-
return (await this.put("/v1/
|
|
99
|
+
return (await this.put("/v1/slim/device/assign/project", body));
|
|
100
100
|
}
|
|
101
101
|
async function listCarehubLiveDevices(params = {}) {
|
|
102
|
-
return this.get(`/v1/
|
|
102
|
+
return this.get(`/v1/slim/device/live${query(params)}`);
|
|
103
103
|
}
|
|
104
104
|
async function listCarehubLiveTelemetry(params = {}) {
|
|
105
|
-
return this.get(`/v1/
|
|
105
|
+
return this.get(`/v1/slim/device/live/telemetry${query(params)}`);
|
|
106
106
|
}
|
|
107
107
|
async function getCarehubDeviceSleepStatus(deviceId) {
|
|
108
|
-
return this.get(`/v1/
|
|
108
|
+
return this.get(`/v1/slim/device/live/cloudwatch/${segment(deviceId)}`);
|
|
109
109
|
}
|
|
110
110
|
async function getCarehubDeviceTelemetry(deviceId) {
|
|
111
|
-
return this.get(`/v1/
|
|
111
|
+
return this.get(`/v1/slim/telemetry/${segment(deviceId)}`);
|
|
112
112
|
}
|
|
113
113
|
async function listCarehubEffectiveObservationIds() {
|
|
114
|
-
return this.get("/v1/
|
|
114
|
+
return this.get("/v1/slim/telemetry/effectiveIds");
|
|
115
115
|
}
|
|
116
116
|
async function listCarehubLastObservationIds() {
|
|
117
|
-
return this.get("/v1/
|
|
117
|
+
return this.get("/v1/slim/telemetry/lastIds");
|
|
118
118
|
}
|
|
119
119
|
async function getCarehubDeviceEffectiveObservationIds(deviceId) {
|
|
120
|
-
return this.get(`/v1/
|
|
120
|
+
return this.get(`/v1/slim/telemetry/${segment(deviceId)}/effectiveIds`);
|
|
121
121
|
}
|
|
122
122
|
async function getCarehubDeviceLastObservationIds(deviceId) {
|
|
123
|
-
return this.get(`/v1/
|
|
123
|
+
return this.get(`/v1/slim/telemetry/${segment(deviceId)}/lastIds`);
|
|
124
124
|
}
|
|
125
125
|
async function listCarehubNotifications(params = {}) {
|
|
126
|
-
return this.get(`/v1/
|
|
126
|
+
return this.get(`/v1/slim/notifications${query(params)}`);
|
|
127
127
|
}
|
|
128
128
|
async function getRecentCarehubNotifications(count) {
|
|
129
|
-
return this.get(`/v1/
|
|
129
|
+
return this.get(`/v1/slim/notifications/recent${query({ count })}`);
|
|
130
130
|
}
|
|
131
131
|
async function listCarehubOutOfBedNotifications(params = {}) {
|
|
132
|
-
return this.get(`/v1/
|
|
132
|
+
return this.get(`/v1/slim/notifications/oob${query(params)}`);
|
|
133
133
|
}
|
|
134
134
|
async function listCarehubMedicalNotifications(params = {}) {
|
|
135
|
-
return this.get(`/v1/
|
|
135
|
+
return this.get(`/v1/slim/notifications/medical${query(params)}`);
|
|
136
136
|
}
|
|
137
137
|
async function getRecentCarehubMedicalNotifications(count) {
|
|
138
|
-
return this.get(`/v1/
|
|
138
|
+
return this.get(`/v1/slim/notifications/recent/medical${query({ count })}`);
|
|
139
139
|
}
|
|
140
140
|
async function getCarehubMedicalNotification(episodeId) {
|
|
141
|
-
return this.get(`/v1/
|
|
141
|
+
return this.get(`/v1/slim/notifications/medical/${segment(episodeId)}`);
|
|
142
142
|
}
|
|
143
143
|
async function acknowledgeCarehubMedicalNotification(episodeId) {
|
|
144
|
-
return this.post(`/v1/
|
|
144
|
+
return this.post(`/v1/slim/notifications/medical/${segment(episodeId)}/ack`);
|
|
145
145
|
}
|
|
146
146
|
async function acknowledgeCarehubNotification(notificationId) {
|
|
147
|
-
return (await this.patch(`/v1/
|
|
147
|
+
return (await this.patch(`/v1/slim/notifications/${segment(notificationId)}/ack`, []));
|
|
148
148
|
}
|
|
149
149
|
async function getCarehubThreshold() {
|
|
150
|
-
return this.get("/v1/
|
|
150
|
+
return this.get("/v1/slim/threshold");
|
|
151
151
|
}
|
|
152
152
|
async function updateCarehubThreshold(body) {
|
|
153
|
-
return (await this.put("/v1/
|
|
153
|
+
return (await this.put("/v1/slim/threshold", body));
|
|
154
154
|
}
|
|
155
155
|
async function getCarehubPatientThreshold(patientId) {
|
|
156
|
-
return this.get(`/v1/
|
|
156
|
+
return this.get(`/v1/slim/threshold/patient/${segment(patientId)}`);
|
|
157
157
|
}
|
|
158
158
|
async function updateCarehubPatientThreshold(patientId, body) {
|
|
159
|
-
return (await this.put(`/v1/
|
|
159
|
+
return (await this.put(`/v1/slim/threshold/patient/${segment(patientId)}`, body));
|
|
160
160
|
}
|
|
161
161
|
async function getCarehubThresholdV2() {
|
|
162
|
-
return this.get("/v2/
|
|
162
|
+
return this.get("/v2/slim/threshold");
|
|
163
163
|
}
|
|
164
164
|
async function updateCarehubThresholdV2(body) {
|
|
165
|
-
return (await this.put("/v2/
|
|
165
|
+
return (await this.put("/v2/slim/threshold", body));
|
|
166
166
|
}
|
|
167
167
|
async function getCarehubPatientThresholdV2(patientId) {
|
|
168
|
-
return this.get(`/v2/
|
|
168
|
+
return this.get(`/v2/slim/threshold/patient/${segment(patientId)}`);
|
|
169
169
|
}
|
|
170
170
|
async function updateCarehubPatientThresholdV2(patientId, body) {
|
|
171
|
-
return (await this.put(`/v2/
|
|
171
|
+
return (await this.put(`/v2/slim/threshold/patient/${segment(patientId)}`, body));
|
|
172
172
|
}
|
|
173
173
|
async function getCarehubTrends(params) {
|
|
174
|
-
return this.get(`/v1/
|
|
174
|
+
return this.get(`/v1/slim/trends/graphs${query(params)}`);
|
|
175
175
|
}
|
|
176
176
|
async function getCarehubSleepStatistics(params) {
|
|
177
|
-
return this.get(`/v1/
|
|
177
|
+
return this.get(`/v1/slim/sleep/statistics${query(params)}`);
|
|
178
178
|
}
|
|
179
179
|
async function listCarehubLocations(params = {}) {
|
|
180
|
-
return this.get(`/v1/
|
|
180
|
+
return this.get(`/v1/slim/location${query(params)}`);
|
|
181
181
|
}
|
|
182
182
|
async function getCarehubLocation(locationId) {
|
|
183
|
-
return this.get(`/v1/
|
|
183
|
+
return this.get(`/v1/slim/location/${segment(locationId)}`);
|
|
184
184
|
}
|
|
185
185
|
async function createCarehubLocation(body) {
|
|
186
|
-
return this.post("/v1/
|
|
186
|
+
return this.post("/v1/slim/location", body);
|
|
187
187
|
}
|
|
188
188
|
async function updateCarehubLocation(locationId, body) {
|
|
189
|
-
return (await this.put(`/v1/
|
|
189
|
+
return (await this.put(`/v1/slim/location/${segment(locationId)}`, body));
|
|
190
190
|
}
|
|
191
191
|
async function deleteCarehubLocation(locationId) {
|
|
192
|
-
await this.delete(`/v1/
|
|
192
|
+
await this.delete(`/v1/slim/location/${segment(locationId)}`);
|
|
193
193
|
}
|
|
194
194
|
async function listCarehubZones(params = {}) {
|
|
195
|
-
return this.get(`/v1/
|
|
195
|
+
return this.get(`/v1/slim/zones${query(params)}`);
|
|
196
196
|
}
|
|
197
197
|
async function getCarehubZone(zoneId) {
|
|
198
|
-
return this.get(`/v1/
|
|
198
|
+
return this.get(`/v1/slim/zones/${segment(zoneId)}`);
|
|
199
199
|
}
|
|
200
200
|
async function getCarehubZoneDeviceCounts(params = {}) {
|
|
201
|
-
return this.get(`/v1/
|
|
201
|
+
return this.get(`/v1/slim/zones/device-counts${query(params)}`);
|
|
202
202
|
}
|
|
203
203
|
async function exportCarehubPatientPdf(body) {
|
|
204
|
-
return this.post("/v1/
|
|
204
|
+
return this.post("/v1/slim/export/pdf", body);
|
|
205
205
|
}
|
|
@@ -93,53 +93,53 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
|
|
|
93
93
|
{ method: "GET", path: "/fhir/Device/:id/telemetry/history", group: "Patient" },
|
|
94
94
|
{ method: "POST", path: "/fhir/Questionnaire/:id/$populate", group: "Questionnaire" },
|
|
95
95
|
{ method: "POST", path: "/fhir/QuestionnaireResponse/:id/$extract", group: "Questionnaire" },
|
|
96
|
-
{ method: "GET", path: "/v1/
|
|
97
|
-
{ method: "GET", path: "/v1/
|
|
98
|
-
{ method: "GET", path: "/v1/
|
|
99
|
-
{ method: "GET", path: "/v1/
|
|
100
|
-
{ method: "POST", path: "/v1/
|
|
101
|
-
{ method: "PUT", path: "/v1/
|
|
102
|
-
{ method: "DELETE", path: "/v1/
|
|
103
|
-
{ method: "GET", path: "/v1/
|
|
104
|
-
{ method: "GET", path: "/v1/
|
|
105
|
-
{ method: "POST", path: "/v1/
|
|
106
|
-
{ method: "PUT", path: "/v1/
|
|
107
|
-
{ method: "DELETE", path: "/v1/
|
|
108
|
-
{ method: "PUT", path: "/v1/
|
|
109
|
-
{ method: "GET", path: "/v1/
|
|
110
|
-
{ method: "GET", path: "/v1/
|
|
111
|
-
{ method: "GET", path: "/v1/
|
|
112
|
-
{ method: "GET", path: "/v1/
|
|
113
|
-
{ method: "GET", path: "/v1/
|
|
114
|
-
{ method: "GET", path: "/v1/
|
|
115
|
-
{ method: "GET", path: "/v1/
|
|
116
|
-
{ method: "GET", path: "/v1/
|
|
117
|
-
{ method: "GET", path: "/v1/
|
|
118
|
-
{ method: "GET", path: "/v1/
|
|
119
|
-
{ method: "GET", path: "/v1/
|
|
120
|
-
{ method: "GET", path: "/v1/
|
|
121
|
-
{ method: "GET", path: "/v1/
|
|
122
|
-
{ method: "GET", path: "/v1/
|
|
123
|
-
{ method: "POST", path: "/v1/
|
|
124
|
-
{ method: "PATCH", path: "/v1/
|
|
125
|
-
{ method: "GET", path: "/v1/
|
|
126
|
-
{ method: "PUT", path: "/v1/
|
|
127
|
-
{ method: "GET", path: "/v1/
|
|
128
|
-
{ method: "PUT", path: "/v1/
|
|
129
|
-
{ method: "GET", path: "/v2/
|
|
130
|
-
{ method: "PUT", path: "/v2/
|
|
131
|
-
{ method: "GET", path: "/v2/
|
|
132
|
-
{ method: "PUT", path: "/v2/
|
|
133
|
-
{ method: "GET", path: "/v1/
|
|
134
|
-
{ method: "GET", path: "/v1/
|
|
135
|
-
{ method: "GET", path: "/v1/
|
|
136
|
-
{ method: "GET", path: "/v1/
|
|
137
|
-
{ method: "POST", path: "/v1/
|
|
138
|
-
{ method: "PUT", path: "/v1/
|
|
139
|
-
{ method: "DELETE", path: "/v1/
|
|
140
|
-
{ method: "GET", path: "/v1/
|
|
141
|
-
{ method: "GET", path: "/v1/
|
|
142
|
-
{ method: "GET", path: "/v1/
|
|
143
|
-
{ method: "POST", path: "/v1/
|
|
96
|
+
{ method: "GET", path: "/v1/slim/patient", group: "Slim/Patient" },
|
|
97
|
+
{ method: "GET", path: "/v1/slim/patient/:id", group: "Slim/Patient" },
|
|
98
|
+
{ method: "GET", path: "/v1/slim/patient/:id/$everything", group: "Slim/Patient" },
|
|
99
|
+
{ method: "GET", path: "/v1/slim/patient/:id/current-vitals", group: "Slim/Patient" },
|
|
100
|
+
{ method: "POST", path: "/v1/slim/patient", group: "Slim/Patient" },
|
|
101
|
+
{ method: "PUT", path: "/v1/slim/patient/:id", group: "Slim/Patient" },
|
|
102
|
+
{ method: "DELETE", path: "/v1/slim/patient/:id", group: "Slim/Patient" },
|
|
103
|
+
{ method: "GET", path: "/v1/slim/device", group: "Slim/Device" },
|
|
104
|
+
{ method: "GET", path: "/v1/slim/device/:id", group: "Slim/Device" },
|
|
105
|
+
{ method: "POST", path: "/v1/slim/device", group: "Slim/Device" },
|
|
106
|
+
{ method: "PUT", path: "/v1/slim/device/:id", group: "Slim/Device" },
|
|
107
|
+
{ method: "DELETE", path: "/v1/slim/device/:id", group: "Slim/Device" },
|
|
108
|
+
{ method: "PUT", path: "/v1/slim/device/assign/project", group: "Slim/Device" },
|
|
109
|
+
{ method: "GET", path: "/v1/slim/device/live", group: "Slim/Device" },
|
|
110
|
+
{ method: "GET", path: "/v1/slim/device/live/telemetry", group: "Slim/Device" },
|
|
111
|
+
{ method: "GET", path: "/v1/slim/device/live/cloudwatch/:deviceId", group: "Slim/Device" },
|
|
112
|
+
{ method: "GET", path: "/v1/slim/telemetry/:deviceId", group: "Slim/Telemetry" },
|
|
113
|
+
{ method: "GET", path: "/v1/slim/telemetry/effectiveIds", group: "Slim/Telemetry" },
|
|
114
|
+
{ method: "GET", path: "/v1/slim/telemetry/lastIds", group: "Slim/Telemetry" },
|
|
115
|
+
{ method: "GET", path: "/v1/slim/telemetry/:deviceId/effectiveIds", group: "Slim/Telemetry" },
|
|
116
|
+
{ method: "GET", path: "/v1/slim/telemetry/:deviceId/lastIds", group: "Slim/Telemetry" },
|
|
117
|
+
{ method: "GET", path: "/v1/slim/notifications", group: "Slim/Notifications" },
|
|
118
|
+
{ method: "GET", path: "/v1/slim/notifications/recent", group: "Slim/Notifications" },
|
|
119
|
+
{ method: "GET", path: "/v1/slim/notifications/oob", group: "Slim/Notifications" },
|
|
120
|
+
{ method: "GET", path: "/v1/slim/notifications/medical", group: "Slim/Notifications" },
|
|
121
|
+
{ method: "GET", path: "/v1/slim/notifications/recent/medical", group: "Slim/Notifications" },
|
|
122
|
+
{ method: "GET", path: "/v1/slim/notifications/medical/:episodeId", group: "Slim/Notifications" },
|
|
123
|
+
{ method: "POST", path: "/v1/slim/notifications/medical/:episodeId/ack", group: "Slim/Notifications" },
|
|
124
|
+
{ method: "PATCH", path: "/v1/slim/notifications/:id/ack", group: "Slim/Notifications" },
|
|
125
|
+
{ method: "GET", path: "/v1/slim/threshold", group: "Slim/Threshold" },
|
|
126
|
+
{ method: "PUT", path: "/v1/slim/threshold", group: "Slim/Threshold" },
|
|
127
|
+
{ method: "GET", path: "/v1/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
|
|
128
|
+
{ method: "PUT", path: "/v1/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
|
|
129
|
+
{ method: "GET", path: "/v2/slim/threshold", group: "Slim/Threshold" },
|
|
130
|
+
{ method: "PUT", path: "/v2/slim/threshold", group: "Slim/Threshold" },
|
|
131
|
+
{ method: "GET", path: "/v2/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
|
|
132
|
+
{ method: "PUT", path: "/v2/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
|
|
133
|
+
{ method: "GET", path: "/v1/slim/trends/graphs", group: "Slim/Trends" },
|
|
134
|
+
{ method: "GET", path: "/v1/slim/sleep/statistics", group: "Slim/Sleep" },
|
|
135
|
+
{ method: "GET", path: "/v1/slim/location", group: "Slim/Location" },
|
|
136
|
+
{ method: "GET", path: "/v1/slim/location/:id", group: "Slim/Location" },
|
|
137
|
+
{ method: "POST", path: "/v1/slim/location", group: "Slim/Location" },
|
|
138
|
+
{ method: "PUT", path: "/v1/slim/location/:id", group: "Slim/Location" },
|
|
139
|
+
{ method: "DELETE", path: "/v1/slim/location/:id", group: "Slim/Location" },
|
|
140
|
+
{ method: "GET", path: "/v1/slim/zones", group: "Slim/Zones" },
|
|
141
|
+
{ method: "GET", path: "/v1/slim/zones/:zoneId", group: "Slim/Zones" },
|
|
142
|
+
{ method: "GET", path: "/v1/slim/zones/device-counts", group: "Slim/Zones" },
|
|
143
|
+
{ method: "POST", path: "/v1/slim/export/pdf", group: "Slim/Export" },
|
|
144
144
|
],
|
|
145
145
|
};
|
|
@@ -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.1",
|
|
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.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -79,7 +79,9 @@
|
|
|
79
79
|
},
|
|
80
80
|
"plugins": {
|
|
81
81
|
"@release-it/conventional-changelog": {
|
|
82
|
-
"preset": "angular"
|
|
82
|
+
"preset": "angular",
|
|
83
|
+
"infile": "CHANGELOG.md",
|
|
84
|
+
"header": "# Changelog"
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
}
|