@extrahorizon/javascript-sdk 8.2.0 → 8.2.1-dev-48-41fd1f1
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/CHANGELOG.md +1177 -1161
- package/README.md +108 -119
- package/build/index.cjs.js +1 -1
- package/build/index.mjs +1 -1
- package/build/types/btoa.d.ts +6 -6
- package/build/types/client.d.ts +136 -136
- package/build/types/constants.d.ts +15 -15
- package/build/types/errorHandler.d.ts +2 -2
- package/build/types/errors.d.ts +332 -332
- package/build/types/http/client.d.ts +2 -2
- package/build/types/http/index.d.ts +4 -4
- package/build/types/http/interceptors.d.ts +9 -9
- package/build/types/http/oAuth1Signature.d.ts +14 -14
- package/build/types/http/oauth1.d.ts +3 -3
- package/build/types/http/oauth2.d.ts +3 -3
- package/build/types/http/proxy.d.ts +3 -3
- package/build/types/http/types.d.ts +331 -331
- package/build/types/http/utils.d.ts +21 -21
- package/build/types/index.d.ts +9 -9
- package/build/types/mock.d.ts +43 -43
- package/build/types/mockType.d.ts +1547 -1511
- package/build/types/parseStoredCredentials.d.ts +11 -11
- package/build/types/rql/index.d.ts +16 -16
- package/build/types/rql/parser.d.ts +1 -1
- package/build/types/rql/types.d.ts +168 -168
- package/build/types/services/auth/applications/index.d.ts +5 -5
- package/build/types/services/auth/applications/types.d.ts +260 -190
- package/build/types/services/auth/index.d.ts +3 -3
- package/build/types/services/auth/oauth1/index.d.ts +5 -5
- package/build/types/services/auth/oauth1/types.d.ts +63 -63
- package/build/types/services/auth/oauth2/index.d.ts +5 -5
- package/build/types/services/auth/oauth2/types.d.ts +52 -52
- package/build/types/services/auth/oidc/index.d.ts +5 -5
- package/build/types/services/auth/oidc/loginAttempts/index.d.ts +5 -5
- package/build/types/services/auth/oidc/loginAttempts/types.d.ts +67 -67
- package/build/types/services/auth/oidc/providers/index.d.ts +5 -5
- package/build/types/services/auth/oidc/providers/types.d.ts +144 -144
- package/build/types/services/auth/oidc/types.d.ts +40 -40
- package/build/types/services/auth/types.d.ts +39 -39
- package/build/types/services/auth/users/index.d.ts +5 -5
- package/build/types/services/auth/users/types.d.ts +121 -121
- package/build/types/services/configurations/general.d.ts +5 -5
- package/build/types/services/configurations/groups.d.ts +5 -5
- package/build/types/services/configurations/index.d.ts +10 -10
- package/build/types/services/configurations/patients.d.ts +5 -5
- package/build/types/services/configurations/staff.d.ts +5 -5
- package/build/types/services/configurations/types.d.ts +222 -222
- package/build/types/services/configurations/users.d.ts +5 -5
- package/build/types/services/data/comments.d.ts +5 -5
- package/build/types/services/data/documents.d.ts +5 -5
- package/build/types/services/data/index.d.ts +13 -13
- package/build/types/services/data/indexes.d.ts +5 -5
- package/build/types/services/data/infrastructure.d.ts +10 -10
- package/build/types/services/data/json-schema.d.ts +121 -121
- package/build/types/services/data/properties.d.ts +5 -5
- package/build/types/services/data/schemas.d.ts +5 -5
- package/build/types/services/data/statuses.d.ts +5 -5
- package/build/types/services/data/transitions.d.ts +5 -5
- package/build/types/services/data/types.d.ts +899 -899
- package/build/types/services/dispatchers/actions/index.d.ts +5 -5
- package/build/types/services/dispatchers/actions/types.d.ts +78 -78
- package/build/types/services/dispatchers/dispatchers/index.d.ts +5 -5
- package/build/types/services/dispatchers/dispatchers/types.d.ts +111 -111
- package/build/types/services/dispatchers/index.d.ts +7 -7
- package/build/types/services/dispatchers/types.d.ts +2 -2
- package/build/types/services/events/events.d.ts +5 -5
- package/build/types/services/events/health.d.ts +9 -9
- package/build/types/services/events/index.d.ts +6 -6
- package/build/types/services/events/subscriptions.d.ts +5 -5
- package/build/types/services/events/types.d.ts +90 -90
- package/build/types/services/files/files.d.ts +5 -5
- package/build/types/services/files/formHelpers.d.ts +3 -3
- package/build/types/services/files/index.d.ts +6 -6
- package/build/types/services/files/settings/index.d.ts +5 -5
- package/build/types/services/files/settings/types.d.ts +38 -38
- package/build/types/services/files/tokens.d.ts +5 -5
- package/build/types/services/files/types.d.ts +185 -185
- package/build/types/services/helpers.d.ts +7 -7
- package/build/types/services/http-client.d.ts +22 -22
- package/build/types/services/index.d.ts +15 -15
- package/build/types/services/localizations/countries.d.ts +5 -5
- package/build/types/services/localizations/health.d.ts +9 -9
- package/build/types/services/localizations/index.d.ts +4 -4
- package/build/types/services/localizations/languages.d.ts +5 -5
- package/build/types/services/localizations/localizations.d.ts +5 -5
- package/build/types/services/localizations/types.d.ts +145 -145
- package/build/types/services/logs/access/index.d.ts +5 -5
- package/build/types/services/logs/access/types.d.ts +41 -41
- package/build/types/services/logs/index.d.ts +3 -3
- package/build/types/services/logs/types.d.ts +4 -4
- package/build/types/services/mails/index.d.ts +3 -3
- package/build/types/services/mails/mails.d.ts +5 -5
- package/build/types/services/mails/types.d.ts +141 -141
- package/build/types/services/notifications/health.d.ts +9 -9
- package/build/types/services/notifications/index.d.ts +7 -7
- package/build/types/services/notifications/notifications.d.ts +5 -5
- package/build/types/services/notifications/settings.d.ts +5 -5
- package/build/types/services/notifications/types.d.ts +222 -222
- package/build/types/services/payments/appStore.d.ts +5 -5
- package/build/types/services/payments/appStoreSubscriptions.d.ts +5 -5
- package/build/types/services/payments/health.d.ts +9 -9
- package/build/types/services/payments/index.d.ts +15 -15
- package/build/types/services/payments/orders.d.ts +5 -5
- package/build/types/services/payments/playStore.d.ts +5 -5
- package/build/types/services/payments/playStoreHistory.d.ts +5 -5
- package/build/types/services/payments/playStoreSubscriptions.d.ts +5 -5
- package/build/types/services/payments/products.d.ts +5 -5
- package/build/types/services/payments/stripe.d.ts +5 -5
- package/build/types/services/payments/subscriptions.d.ts +5 -5
- package/build/types/services/payments/types.d.ts +1189 -1189
- package/build/types/services/profiles/groups.d.ts +5 -5
- package/build/types/services/profiles/health.d.ts +9 -9
- package/build/types/services/profiles/index.d.ts +9 -9
- package/build/types/services/profiles/logs.d.ts +5 -5
- package/build/types/services/profiles/profiles.d.ts +5 -5
- package/build/types/services/profiles/types.d.ts +370 -369
- package/build/types/services/tasks/api/index.d.ts +5 -5
- package/build/types/services/tasks/api/types.d.ts +146 -146
- package/build/types/services/tasks/apiRequests/index.d.ts +5 -5
- package/build/types/services/tasks/apiRequests/logs/index.d.ts +5 -5
- package/build/types/services/tasks/apiRequests/logs/types.d.ts +25 -25
- package/build/types/services/tasks/apiRequests/types.d.ts +83 -83
- package/build/types/services/tasks/functions/index.d.ts +5 -5
- package/build/types/services/tasks/functions/types.d.ts +27 -27
- package/build/types/services/tasks/index.d.ts +15 -15
- package/build/types/services/tasks/logs/index.d.ts +5 -5
- package/build/types/services/tasks/logs/types.d.ts +28 -28
- package/build/types/services/tasks/schedules/index.d.ts +5 -5
- package/build/types/services/tasks/schedules/types.d.ts +88 -88
- package/build/types/services/tasks/tasks.d.ts +5 -5
- package/build/types/services/tasks/types.d.ts +107 -107
- package/build/types/services/templates/index.d.ts +3 -3
- package/build/types/services/templates/templates.d.ts +5 -5
- package/build/types/services/templates/types.d.ts +202 -202
- package/build/types/services/types.d.ts +77 -77
- package/build/types/services/users/activationRequests/index.d.ts +4 -4
- package/build/types/services/users/activationRequests/types.d.ts +70 -70
- package/build/types/services/users/forgotPasswordRequests/index.d.ts +4 -4
- package/build/types/services/users/forgotPasswordRequests/types.d.ts +70 -70
- package/build/types/services/users/globalRoles.d.ts +5 -5
- package/build/types/services/users/groupRoles.d.ts +5 -5
- package/build/types/services/users/health.d.ts +9 -9
- package/build/types/services/users/index.d.ts +16 -16
- package/build/types/services/users/settings/index.d.ts +4 -4
- package/build/types/services/users/settings/types.d.ts +47 -47
- package/build/types/services/users/types.d.ts +1116 -1055
- package/build/types/services/users/users.d.ts +5 -5
- package/build/types/sha1.d.ts +11 -11
- package/build/types/types.d.ts +102 -102
- package/build/types/utils.d.ts +4 -4
- package/build/types/version.d.ts +1 -1
- package/package.json +62 -62
|
@@ -1,369 +1,370 @@
|
|
|
1
|
-
import { RQLString } from '../../rql';
|
|
2
|
-
import { FindAllIterator } from '../../services/helpers';
|
|
3
|
-
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult } from '../types';
|
|
4
|
-
export interface Profile {
|
|
5
|
-
id: ObjectId;
|
|
6
|
-
addressLine1?: string;
|
|
7
|
-
addressLine2?: string;
|
|
8
|
-
country: string;
|
|
9
|
-
region?: string;
|
|
10
|
-
city?: string;
|
|
11
|
-
postalCode?: string;
|
|
12
|
-
birthday: string;
|
|
13
|
-
/**
|
|
14
|
-
* See ISO 5218
|
|
15
|
-
*/
|
|
16
|
-
gender: number;
|
|
17
|
-
length?: number;
|
|
18
|
-
weight?: number;
|
|
19
|
-
afHistory?: boolean;
|
|
20
|
-
comorbidities?: Array<Comorbidities>;
|
|
21
|
-
physician?: string;
|
|
22
|
-
smoker?: boolean;
|
|
23
|
-
activity?: ProfileActivity;
|
|
24
|
-
impediments?: Array<Impediments>;
|
|
25
|
-
medication?: Array<Medication>;
|
|
26
|
-
groups?: Array<Group>;
|
|
27
|
-
customFields?: Record<string, string>;
|
|
28
|
-
fibricheckInfo?: {
|
|
29
|
-
app?: {
|
|
30
|
-
version?: string;
|
|
31
|
-
build?: string;
|
|
32
|
-
branch?: string;
|
|
33
|
-
};
|
|
34
|
-
device?: {
|
|
35
|
-
os?: string;
|
|
36
|
-
model?: string;
|
|
37
|
-
type?: 'android' | 'ios';
|
|
38
|
-
manufacturer?: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
creationTimestamp?: Date;
|
|
42
|
-
updateTimestamp?: Date;
|
|
43
|
-
}
|
|
44
|
-
export declare type ProfileCreation = Pick<Profile, 'id' | 'country' | 'region' | 'birthday' | 'gender'>;
|
|
45
|
-
export declare
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* `ADD_PATIENT`
|
|
118
|
-
*
|
|
119
|
-
* @param
|
|
120
|
-
* @
|
|
121
|
-
* @
|
|
122
|
-
* @throws {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* `UPDATE_PROFILES` | `
|
|
132
|
-
*
|
|
133
|
-
* @param
|
|
134
|
-
* @param
|
|
135
|
-
* @
|
|
136
|
-
* @
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* `UPDATE_PROFILES` | `
|
|
147
|
-
*
|
|
148
|
-
* @param
|
|
149
|
-
* @
|
|
150
|
-
* @
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* `UPDATE_PROFILES` | `
|
|
160
|
-
*
|
|
161
|
-
* @param
|
|
162
|
-
* @param
|
|
163
|
-
* @
|
|
164
|
-
* @
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* `CREATE_PROFILE_LOG_ENTRIES` | `
|
|
178
|
-
*
|
|
179
|
-
* @param
|
|
180
|
-
* @param
|
|
181
|
-
* @
|
|
182
|
-
* @
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* `VIEW_PROFILE_LOG_ENTRIES` | `
|
|
192
|
-
*
|
|
193
|
-
* @param
|
|
194
|
-
* @param
|
|
195
|
-
* @
|
|
196
|
-
* @
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* `VIEW_PROFILE_LOG_ENTRIES` | `
|
|
208
|
-
*
|
|
209
|
-
* @param
|
|
210
|
-
* @param
|
|
211
|
-
* @
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* `VIEW_PROFILE_LOG_ENTRIES` | `
|
|
221
|
-
*
|
|
222
|
-
* @param
|
|
223
|
-
* @param
|
|
224
|
-
* @
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* `CREATE_PROFILE_LOG_ENTRIES` | `
|
|
234
|
-
*
|
|
235
|
-
* @param
|
|
236
|
-
* @param
|
|
237
|
-
* @param
|
|
238
|
-
* @
|
|
239
|
-
* @
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* `CREATE_PROFILE_LOG_ENTRIES` | `
|
|
249
|
-
*
|
|
250
|
-
* @param
|
|
251
|
-
* @param
|
|
252
|
-
* @
|
|
253
|
-
* @
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
* none |
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* @
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
* none |
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* @
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
* none |
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* @
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
*
|
|
299
|
-
* @param
|
|
300
|
-
* @
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
*
|
|
306
|
-
* @
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* @
|
|
318
|
-
* @
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* `UPDATE_PROFILES` | `
|
|
329
|
-
*
|
|
330
|
-
* @param
|
|
331
|
-
* @
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* `UPDATE_PROFILES` | `
|
|
343
|
-
*
|
|
344
|
-
* @param
|
|
345
|
-
* @
|
|
346
|
-
* @
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
1
|
+
import { RQLString } from '../../rql';
|
|
2
|
+
import { FindAllIterator } from '../../services/helpers';
|
|
3
|
+
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult } from '../types';
|
|
4
|
+
export interface Profile {
|
|
5
|
+
id: ObjectId;
|
|
6
|
+
addressLine1?: string;
|
|
7
|
+
addressLine2?: string;
|
|
8
|
+
country: string;
|
|
9
|
+
region?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
postalCode?: string;
|
|
12
|
+
birthday: string;
|
|
13
|
+
/**
|
|
14
|
+
* See ISO 5218
|
|
15
|
+
*/
|
|
16
|
+
gender: number;
|
|
17
|
+
length?: number;
|
|
18
|
+
weight?: number;
|
|
19
|
+
afHistory?: boolean;
|
|
20
|
+
comorbidities?: Array<Comorbidities>;
|
|
21
|
+
physician?: string;
|
|
22
|
+
smoker?: boolean;
|
|
23
|
+
activity?: ProfileActivity;
|
|
24
|
+
impediments?: Array<Impediments>;
|
|
25
|
+
medication?: Array<Medication>;
|
|
26
|
+
groups?: Array<Group>;
|
|
27
|
+
customFields?: Record<string, string>;
|
|
28
|
+
fibricheckInfo?: {
|
|
29
|
+
app?: {
|
|
30
|
+
version?: string;
|
|
31
|
+
build?: string;
|
|
32
|
+
branch?: string;
|
|
33
|
+
};
|
|
34
|
+
device?: {
|
|
35
|
+
os?: string;
|
|
36
|
+
model?: string;
|
|
37
|
+
type?: 'android' | 'ios';
|
|
38
|
+
manufacturer?: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
creationTimestamp?: Date;
|
|
42
|
+
updateTimestamp?: Date;
|
|
43
|
+
}
|
|
44
|
+
export declare type ProfileCreation = Pick<Profile, 'id' | 'country' | 'region' | 'birthday' | 'gender'>;
|
|
45
|
+
export declare type ProfileUpdate = Partial<Omit<Profile, 'id' | 'groups' | 'medication' | 'creationTimestamp' | 'updateTimestamp'>>;
|
|
46
|
+
export declare enum ProfileActivity {
|
|
47
|
+
NOT_ACTIVE = "NOT_ACTIVE",
|
|
48
|
+
SLIGHTLY_ACTIVE = "SLIGHTLY_ACTIVE",
|
|
49
|
+
MODERATELY_ACTIVE = "MODERATELY_ACTIVE",
|
|
50
|
+
ACTIVE = "ACTIVE",
|
|
51
|
+
VERY_ACTIVE = "VERY_ACTIVE"
|
|
52
|
+
}
|
|
53
|
+
export declare enum Comorbidities {
|
|
54
|
+
HEART_FAILURE = "HEART_FAILURE",
|
|
55
|
+
DIABETES = "DIABETES",
|
|
56
|
+
COPD = "COPD",
|
|
57
|
+
HYPERTENSION = "HYPERTENSION",
|
|
58
|
+
VASCULAR_DISEASE = "VASCULAR_DISEASE",
|
|
59
|
+
HISTORY_OF_TIA_STROKE = "HISTORY_OF_TIA_STROKE"
|
|
60
|
+
}
|
|
61
|
+
export declare enum Impediments {
|
|
62
|
+
TREMOR = "TREMOR",
|
|
63
|
+
PERNIOSIS = "PERNIOSIS",
|
|
64
|
+
CALLUS = "CALLUS"
|
|
65
|
+
}
|
|
66
|
+
export interface Medication {
|
|
67
|
+
name: string;
|
|
68
|
+
dosis: {
|
|
69
|
+
number?: number;
|
|
70
|
+
unit?: MedicationUnit;
|
|
71
|
+
};
|
|
72
|
+
medicationFrequency?: MedicationFrequency;
|
|
73
|
+
count: number;
|
|
74
|
+
}
|
|
75
|
+
export declare enum MedicationUnit {
|
|
76
|
+
MG = "mg",
|
|
77
|
+
ML = "ml",
|
|
78
|
+
PILL = "pill"
|
|
79
|
+
}
|
|
80
|
+
export declare enum MedicationFrequency {
|
|
81
|
+
AS_NEEDED = "AS_NEEDED",
|
|
82
|
+
EVERY_DAY = "EVERY_DAY",
|
|
83
|
+
EVERY_WEEK = "EVERY_WEEK",
|
|
84
|
+
EVERY_MONTH = "EVERY_MONTH",
|
|
85
|
+
BIRTH_CONTROL = "BIRTH_CONTROL"
|
|
86
|
+
}
|
|
87
|
+
export interface Group {
|
|
88
|
+
groupId: ObjectId;
|
|
89
|
+
reason?: string;
|
|
90
|
+
/**
|
|
91
|
+
* This serves as a field to link a patient to the medical record of a hospital/physician. This field therefor accepts any string, not just an ObjectId.
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
patientId?: string;
|
|
95
|
+
customFields?: Record<string, string>;
|
|
96
|
+
}
|
|
97
|
+
export declare type GroupCreation = Group;
|
|
98
|
+
export interface LogEntry {
|
|
99
|
+
id?: ObjectId;
|
|
100
|
+
profileId?: ObjectId;
|
|
101
|
+
groupId?: ObjectId;
|
|
102
|
+
userId?: ObjectId;
|
|
103
|
+
text?: string;
|
|
104
|
+
creationTimestamp?: Date;
|
|
105
|
+
updateTimestamp?: Date;
|
|
106
|
+
}
|
|
107
|
+
export interface ProfileComment {
|
|
108
|
+
text: string;
|
|
109
|
+
}
|
|
110
|
+
export interface ProfilesGroupsService {
|
|
111
|
+
/**
|
|
112
|
+
* Add a group enlistment to a profile
|
|
113
|
+
*
|
|
114
|
+
* Permission | Scope | Effect
|
|
115
|
+
* - | - | -
|
|
116
|
+
* none | | Add a group enlistment for your profile only
|
|
117
|
+
* `ADD_PATIENT` | `staff enlistment` | Add a group enlistment for any profile of this group
|
|
118
|
+
* `ADD_PATIENT` & `ACTIVATE_PRESCRIPTIONS` | `global` | Add a group enlistment for any profile for any group
|
|
119
|
+
* @param profileId Id of the targeted profile
|
|
120
|
+
* @param requestBody Group data
|
|
121
|
+
* @returns Group
|
|
122
|
+
* @throws {ResourceAlreadyExistsError}
|
|
123
|
+
* @throws {ResourceUnknownError}
|
|
124
|
+
*/
|
|
125
|
+
create(profileId: ObjectId, requestBody: GroupCreation, options?: OptionsBase): Promise<Group>;
|
|
126
|
+
/**
|
|
127
|
+
* Update a group enlistment on a profile
|
|
128
|
+
*
|
|
129
|
+
* Permission | Scope | Effect
|
|
130
|
+
* - | - | -
|
|
131
|
+
* `UPDATE_PROFILES` | `staff enlistment` | Update a group enlistment for any profile for this group
|
|
132
|
+
* `UPDATE_PROFILES` | `global` | Update a group enlistment for any profile for any group
|
|
133
|
+
* @param profileId Id of the targeted profile
|
|
134
|
+
* @param groupId Id of the targeted group
|
|
135
|
+
* @param requestBody Group data to update
|
|
136
|
+
* @returns Group
|
|
137
|
+
* @throws {ResourceUnknownError}
|
|
138
|
+
*/
|
|
139
|
+
update(profileId: ObjectId, groupId: ObjectId, requestBody: Omit<Group, 'groupId'>, options?: OptionsBase): Promise<Group>;
|
|
140
|
+
/**
|
|
141
|
+
* Delete a group from a profile
|
|
142
|
+
*
|
|
143
|
+
* Permission | Scope | Effect
|
|
144
|
+
* - | - | -
|
|
145
|
+
* none | | Delete a group from your profile only
|
|
146
|
+
* `UPDATE_PROFILES` | `staff enlistment` | Delete a group from any profile in this group
|
|
147
|
+
* `UPDATE_PROFILES` | `global` | Delete a group from any profile in any group
|
|
148
|
+
* @param profileId Id of the targeted profile
|
|
149
|
+
* @param groupId Id of the targeted group
|
|
150
|
+
* @returns AffectedRecords
|
|
151
|
+
* @throws {ResourceUnknownError}
|
|
152
|
+
*/
|
|
153
|
+
remove(profileId: ObjectId, groupId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
154
|
+
/**
|
|
155
|
+
* Remove a field on a group enlistment object in a profile
|
|
156
|
+
*
|
|
157
|
+
* Permission | Scope | Effect
|
|
158
|
+
* - | - | -
|
|
159
|
+
* `UPDATE_PROFILES` | `staff enlistment` | Remove a field for this group
|
|
160
|
+
* `UPDATE_PROFILES` | `global` | Remove a field for any group
|
|
161
|
+
* @param profileId Id of the targeted profile
|
|
162
|
+
* @param groupId Id of the targeted group
|
|
163
|
+
* @param requestBody list of fields to remove
|
|
164
|
+
* @returns Group
|
|
165
|
+
* @throws {ResourceUnknownError}
|
|
166
|
+
*/
|
|
167
|
+
removeFields(profileId: ObjectId, groupId: ObjectId, requestBody: {
|
|
168
|
+
fields: Array<string>;
|
|
169
|
+
}, options?: OptionsBase): Promise<Group>;
|
|
170
|
+
}
|
|
171
|
+
export interface ProfilesLogsService {
|
|
172
|
+
/**
|
|
173
|
+
* Create a profile log entry
|
|
174
|
+
*
|
|
175
|
+
* Permission | Scope | Effect
|
|
176
|
+
* - | - | -
|
|
177
|
+
* `CREATE_PROFILE_LOG_ENTRIES` | `staff enlistment` | Create a log entry for any profile of this group
|
|
178
|
+
* `CREATE_PROFILE_LOG_ENTRIES` | `global` | Create a log entry for any profile of any group
|
|
179
|
+
* @param profileId Id of the targeted profile
|
|
180
|
+
* @param groupId Id of the targeted group
|
|
181
|
+
* @param requestBody ProfileComment
|
|
182
|
+
* @returns LogEntry
|
|
183
|
+
* @throws {ResourceUnknownError}
|
|
184
|
+
*/
|
|
185
|
+
create(profileId: ObjectId, groupId: ObjectId, requestBody: ProfileComment, options?: OptionsBase): Promise<LogEntry>;
|
|
186
|
+
/**
|
|
187
|
+
* Retrieve all profile log entries
|
|
188
|
+
*
|
|
189
|
+
* Permission | Scope | Effect
|
|
190
|
+
* - | - | -
|
|
191
|
+
* `VIEW_PROFILE_LOG_ENTRIES` | `staff enlistment` | Retrieve a list of log entries for any profile of this group
|
|
192
|
+
* `VIEW_PROFILE_LOG_ENTRIES` | `global` | Retrieve a list of log entries for any profile of any group
|
|
193
|
+
* @param profileId Id of the targeted profile
|
|
194
|
+
* @param groupId Id of the targeted group
|
|
195
|
+
* @param rql Add filters to the requested list.
|
|
196
|
+
* @returns PagedResult<LogEntry>
|
|
197
|
+
* @throws {ResourceUnknownError}
|
|
198
|
+
*/
|
|
199
|
+
find(profileId: ObjectId, groupId: ObjectId, options?: OptionsWithRql): Promise<PagedResult<LogEntry>>;
|
|
200
|
+
/**
|
|
201
|
+
* Request a list of all profile log entries
|
|
202
|
+
*
|
|
203
|
+
* Do not pass in an rql with limit operator!
|
|
204
|
+
*
|
|
205
|
+
* Permission | Scope | Effect
|
|
206
|
+
* - | - | -
|
|
207
|
+
* `VIEW_PROFILE_LOG_ENTRIES` | `staff enlistment` | Retrieve a list of log entries for any profile of this group
|
|
208
|
+
* `VIEW_PROFILE_LOG_ENTRIES` | `global` | Retrieve a list of log entries for any profile of any group
|
|
209
|
+
* @param profileId Id of the targeted profile
|
|
210
|
+
* @param groupId Id of the targeted group
|
|
211
|
+
* @param rql Add filters to the requested list.
|
|
212
|
+
* @returns LogEntry[]
|
|
213
|
+
*/
|
|
214
|
+
findAll(profileId: ObjectId, groupId: ObjectId, options?: OptionsWithRql): Promise<LogEntry[]>;
|
|
215
|
+
/**
|
|
216
|
+
* Request a list of all profile log entries
|
|
217
|
+
*
|
|
218
|
+
* Permission | Scope | Effect
|
|
219
|
+
* - | - | -
|
|
220
|
+
* `VIEW_PROFILE_LOG_ENTRIES` | `staff enlistment` | Retrieve a list of log entries for any profile of this group
|
|
221
|
+
* `VIEW_PROFILE_LOG_ENTRIES` | `global` | Retrieve a list of log entries for any profile of any group
|
|
222
|
+
* @param profileId Id of the targeted profile
|
|
223
|
+
* @param groupId Id of the targeted group
|
|
224
|
+
* @param rql Add filters to the requested list.
|
|
225
|
+
* @returns LogEntry[]
|
|
226
|
+
*/
|
|
227
|
+
findAllIterator(profileId: ObjectId, groupId: ObjectId, options?: OptionsWithRql): FindAllIterator<LogEntry>;
|
|
228
|
+
/**
|
|
229
|
+
* Update a profile log entry
|
|
230
|
+
*
|
|
231
|
+
* Permission | Scope | Effect
|
|
232
|
+
* - | - | -
|
|
233
|
+
* `CREATE_PROFILE_LOG_ENTRIES` | `staff enlistment` | Update a log entry, created by the current user, for any profile of this group
|
|
234
|
+
* `CREATE_PROFILE_LOG_ENTRIES` | `global` | Update a log entry, created by the current user, for any profile of any group
|
|
235
|
+
* @param profileId Id of the targeted profile
|
|
236
|
+
* @param groupId Id of the targeted group
|
|
237
|
+
* @param entryId Id of the targeted log entry
|
|
238
|
+
* @param requestBody ProfileComment
|
|
239
|
+
* @returns LogEntry
|
|
240
|
+
* @throws {ResourceUnknownError}
|
|
241
|
+
*/
|
|
242
|
+
update(profileId: ObjectId, groupId: ObjectId, entryId: ObjectId, requestBody: ProfileComment, options?: OptionsBase): Promise<LogEntry>;
|
|
243
|
+
/**
|
|
244
|
+
* Delete a profile log entry
|
|
245
|
+
*
|
|
246
|
+
* Permission | Scope | Effect
|
|
247
|
+
* - | - | -
|
|
248
|
+
* `CREATE_PROFILE_LOG_ENTRIES` | `staff enlistment` | Delete a log entry, created by the current user, for any profile of this group
|
|
249
|
+
* `CREATE_PROFILE_LOG_ENTRIES` | `global` | Delete a log entry, created by the current user, for any profile of any group
|
|
250
|
+
* @param profileId Id of the targeted profile
|
|
251
|
+
* @param groupId Id of the targeted group
|
|
252
|
+
* @param entryId Id of the targeted log entry
|
|
253
|
+
* @returns AffectedRecords
|
|
254
|
+
* @throws {ResourceUnknownError}
|
|
255
|
+
*/
|
|
256
|
+
remove(profileId: ObjectId, groupId: ObjectId, entryId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
257
|
+
}
|
|
258
|
+
export interface ProfilesService {
|
|
259
|
+
/**
|
|
260
|
+
* Get a list of profiles
|
|
261
|
+
*
|
|
262
|
+
* Permission | Scope | Effect
|
|
263
|
+
* - | - | -
|
|
264
|
+
* none | | View your profile
|
|
265
|
+
* none | `staff enlistment` | View all the profiles of the group
|
|
266
|
+
* `VIEW_PATIENTS` | `global` | View all profiles
|
|
267
|
+
* @param rql an optional rql string
|
|
268
|
+
* @returns PagedResult<Profile>
|
|
269
|
+
*/
|
|
270
|
+
find(options?: OptionsWithRql): Promise<PagedResult<Profile>>;
|
|
271
|
+
/**
|
|
272
|
+
* Request a list of all profiles
|
|
273
|
+
*
|
|
274
|
+
* Do not pass in an rql with limit operator!
|
|
275
|
+
*
|
|
276
|
+
* Permission | Scope | Effect
|
|
277
|
+
* - | - | -
|
|
278
|
+
* none | | View your profile
|
|
279
|
+
* none | `staff enlistment` | View all the profiles of the group
|
|
280
|
+
* `VIEW_PATIENTS` | `global` | View all profiles
|
|
281
|
+
* @param rql Add filters to the requested list.
|
|
282
|
+
* @returns Profile[]
|
|
283
|
+
*/
|
|
284
|
+
findAll(options?: OptionsWithRql): Promise<Profile[]>;
|
|
285
|
+
/**
|
|
286
|
+
* Request a list of all profiles
|
|
287
|
+
*
|
|
288
|
+
* Permission | Scope | Effect
|
|
289
|
+
* - | - | -
|
|
290
|
+
* none | | View your profile
|
|
291
|
+
* none | `staff enlistment` | View all the profiles of the group
|
|
292
|
+
* `VIEW_PATIENTS` | `global` | View all profiles
|
|
293
|
+
* @param rql Add filters to the requested list.
|
|
294
|
+
* @returns Profile[]
|
|
295
|
+
*/
|
|
296
|
+
findAllIterator(options?: OptionsWithRql): FindAllIterator<Profile>;
|
|
297
|
+
/**
|
|
298
|
+
* Find By Id
|
|
299
|
+
* @param id the Id to search for
|
|
300
|
+
* @param rql an optional rql string
|
|
301
|
+
* @returns the first element found
|
|
302
|
+
*/
|
|
303
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Profile>;
|
|
304
|
+
/**
|
|
305
|
+
* Find First
|
|
306
|
+
* @param rql an optional rql string
|
|
307
|
+
* @returns the first element found
|
|
308
|
+
*/
|
|
309
|
+
findFirst(options?: OptionsWithRql): Promise<Profile>;
|
|
310
|
+
/**
|
|
311
|
+
* Create a new profile
|
|
312
|
+
*
|
|
313
|
+
* Permission | Scope | Effect
|
|
314
|
+
* - | - | -
|
|
315
|
+
* none | | Create a profile for the current user
|
|
316
|
+
* `CREATE_PROFILES` | `global` | Create a profile for any user
|
|
317
|
+
* @param requestBody ProfileCreation
|
|
318
|
+
* @returns Profile
|
|
319
|
+
* @throws {ProfileAlreadyExistsError}
|
|
320
|
+
*/
|
|
321
|
+
create(requestBody: ProfileCreation, options?: OptionsBase): Promise<Profile>;
|
|
322
|
+
/**
|
|
323
|
+
* Update an existing profile
|
|
324
|
+
*
|
|
325
|
+
* Permission | Scope | Effect
|
|
326
|
+
* - | - | -
|
|
327
|
+
* none | | Update your profile
|
|
328
|
+
* `UPDATE_PROFILES` | `staff enlistment` | Update the profile of any group member
|
|
329
|
+
* `UPDATE_PROFILES` | `global` | Update any profile
|
|
330
|
+
* @param rql Add filters to the requested list, **required**.
|
|
331
|
+
* @param requestBody The Profile data to update
|
|
332
|
+
* @returns AffectedRecords
|
|
333
|
+
*/
|
|
334
|
+
update(rql: RQLString, requestBody: ProfileUpdate, options?: OptionsBase): Promise<AffectedRecords>;
|
|
335
|
+
/**
|
|
336
|
+
* Remove a given field from all profile records
|
|
337
|
+
*
|
|
338
|
+
* To make a selection of profiles, use RQL.
|
|
339
|
+
* Permission | Scope | Effect
|
|
340
|
+
* - | - | -
|
|
341
|
+
* none | | Remove a given field from your profile
|
|
342
|
+
* `UPDATE_PROFILES` | `staff enlistment` | Remove a given field from any group member
|
|
343
|
+
* `UPDATE_PROFILES` | `global` | Remove a given field from any profile
|
|
344
|
+
* @param rql Add filters to the requested list, **required**.
|
|
345
|
+
* @param requestBody the list of fields to remove
|
|
346
|
+
* @returns AffectedRecords
|
|
347
|
+
* @throws {RemoveFieldError}
|
|
348
|
+
*/
|
|
349
|
+
removeFields(rql: RQLString, requestBody: {
|
|
350
|
+
fields: Array<string>;
|
|
351
|
+
}, options?: OptionsBase): Promise<AffectedRecords>;
|
|
352
|
+
/**
|
|
353
|
+
* Retrieve a list of all the defined comorbidities
|
|
354
|
+
*
|
|
355
|
+
* Permission | Scope | Effect
|
|
356
|
+
* - | - | -
|
|
357
|
+
* none | | Everyone can use this endpoint
|
|
358
|
+
* @returns PagedResult<Comorbidities>
|
|
359
|
+
*/
|
|
360
|
+
getComorbidities(options?: OptionsBase): Promise<PagedResult<Comorbidities>>;
|
|
361
|
+
/**
|
|
362
|
+
* Retrieve a list of all the defined impediments
|
|
363
|
+
*
|
|
364
|
+
* Permission | Scope | Effect
|
|
365
|
+
* - | - | -
|
|
366
|
+
* none | | Everyone can use this endpoint
|
|
367
|
+
* @returns PagedResult<Impediments>
|
|
368
|
+
*/
|
|
369
|
+
getImpediments(options?: OptionsBase): Promise<PagedResult<Impediments>>;
|
|
370
|
+
}
|