@persei/perseed-api 4.34.5 → 4.34.6
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/dist/index.d.ts +2541 -0
- package/dist/perseed-api.mjs +340 -28
- package/dist/perseed-api.umd.js +1 -1
- package/package.json +1 -1
- package/dist/schemas/authentication_security/index.d.ts +0 -1
- package/dist/schemas/authentication_security/types.d.ts +0 -29
- package/dist/schemas/dashboard/data_loaders/Outcomes.d.ts +0 -6
- package/dist/schemas/dashboard/data_loaders/index.d.ts +0 -1
- package/dist/schemas/dashboard/i18n.d.ts +0 -5
- package/dist/schemas/dashboard/index.d.ts +0 -5
- package/dist/schemas/dashboard/types.d.ts +0 -49
- package/dist/schemas/dashboard/widgets/PatientListProps.d.ts +0 -16
- package/dist/schemas/dashboard/widgets/SectionCardProps.d.ts +0 -9
- package/dist/schemas/dashboard/widgets/ValueCardProps.d.ts +0 -13
- package/dist/schemas/dashboard/widgets/index.d.ts +0 -3
- package/dist/schemas/index.d.ts +0 -6
- package/dist/schemas/notification_configuration/index.d.ts +0 -2
- package/dist/schemas/notification_configuration/introspectionShema.d.ts +0 -3
- package/dist/schemas/notification_configuration/types.d.ts +0 -97
- package/dist/schemas/outcomes/index.d.ts +0 -1
- package/dist/schemas/outcomes/types.d.ts +0 -34
- package/dist/schemas/questionnaire/index.d.ts +0 -1
- package/dist/schemas/questionnaire/types.d.ts +0 -7
- package/dist/schemas/user_settings/index.d.ts +0 -1
- package/dist/schemas/user_settings/types.d.ts +0 -5
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2541 @@
|
|
|
1
|
+
import { AjvValidator } from 'objection';
|
|
2
|
+
import { default as default_2 } from 'objection';
|
|
3
|
+
import { i18n } from 'i18next';
|
|
4
|
+
import { Knex } from 'knex';
|
|
5
|
+
import { Model } from 'objection';
|
|
6
|
+
import { NumberQueryBuilder } from 'objection';
|
|
7
|
+
import { QueryBuilder } from 'objection';
|
|
8
|
+
import { RelationType } from 'objection';
|
|
9
|
+
import { Request as Request_2 } from 'express';
|
|
10
|
+
import { TFunction } from 'i18next';
|
|
11
|
+
import { Transaction } from 'objection';
|
|
12
|
+
|
|
13
|
+
declare class AbstractDisplayer extends BaseModel {
|
|
14
|
+
reference?: SubformReference;
|
|
15
|
+
crf_name: string;
|
|
16
|
+
user_ip?: string;
|
|
17
|
+
creation_user?: number;
|
|
18
|
+
creation_time: string;
|
|
19
|
+
mod_user: number;
|
|
20
|
+
mod_time: string;
|
|
21
|
+
static getModel(ctx: RequestContext): typeof AbstractDisplayer;
|
|
22
|
+
static get QueryBuilder(): typeof CustomQueryBuilder;
|
|
23
|
+
static get uidRefProp(): null;
|
|
24
|
+
static get dbRefProp(): null;
|
|
25
|
+
getString(value: any): any;
|
|
26
|
+
getNumber(value: any): any;
|
|
27
|
+
$beforeDelete(queryContext: any): Promise<void>;
|
|
28
|
+
$afterInsert(queryContext: any): Promise<void>;
|
|
29
|
+
$afterUpdate(opt: any, queryContext: any): Promise<void>;
|
|
30
|
+
$afterSave(queryContext: any, inserting: any, old: any): Promise<any>;
|
|
31
|
+
toIdRefResponse(): IdRefForm;
|
|
32
|
+
getPatientId(): number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export declare type AggFunction = 'avg' | 'count' | 'max' | 'min' | 'sum';
|
|
36
|
+
|
|
37
|
+
export declare enum ApiAction {
|
|
38
|
+
QUESTIONNAIRE_CREATE = "questionnaire.create",
|
|
39
|
+
CRF_CREATE = "crf.create",
|
|
40
|
+
CRF_UPDATE = "crf.update",
|
|
41
|
+
CRF_DELETE = "crf.delete",
|
|
42
|
+
EXTERNAL_API_CALL = "external_api_call"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare interface ApiActionContextData {
|
|
46
|
+
ctx?: RequestContext;
|
|
47
|
+
requestContextData?: RequestContextData;
|
|
48
|
+
current: Record<string, unknown>;
|
|
49
|
+
old?: Record<string, unknown> | null;
|
|
50
|
+
patient?: AbstractDisplayer;
|
|
51
|
+
projectId?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* App font factor
|
|
56
|
+
*/
|
|
57
|
+
export declare type AppFontFactor = number;
|
|
58
|
+
|
|
59
|
+
export declare const AUDIT_FLAGS: {
|
|
60
|
+
added: string;
|
|
61
|
+
edited: string;
|
|
62
|
+
deleted: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Global authentication security definition
|
|
67
|
+
*/
|
|
68
|
+
export declare interface AuthenticationSecurityDefinition {
|
|
69
|
+
mfaMethods?: MFAMethod[];
|
|
70
|
+
required?: boolean;
|
|
71
|
+
default?: MFAMethodCode;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare type BaseApiServicePayload = {
|
|
75
|
+
ctx?: RequestContext;
|
|
76
|
+
} & Partial<ApiActionContextData>;
|
|
77
|
+
|
|
78
|
+
declare class BaseModel extends Model {
|
|
79
|
+
id: number;
|
|
80
|
+
static createValidator(): AjvValidator;
|
|
81
|
+
static get modelPaths(): string[];
|
|
82
|
+
$parseJson(json: any, _opt: any): any;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare interface BaseWidget {
|
|
86
|
+
size?: number | ColProps;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare interface CacheOptions {
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
requestDependent: boolean;
|
|
92
|
+
serializable: boolean;
|
|
93
|
+
ecosystemDependent: boolean;
|
|
94
|
+
projectDependent: boolean;
|
|
95
|
+
userDependent: boolean;
|
|
96
|
+
patientDependent: boolean;
|
|
97
|
+
tags: Record<string, any>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare class Clinic extends BaseModel {
|
|
101
|
+
name: string;
|
|
102
|
+
country: string;
|
|
103
|
+
city: string;
|
|
104
|
+
address: string;
|
|
105
|
+
contact: string;
|
|
106
|
+
owner_id: number | null;
|
|
107
|
+
location_data: string;
|
|
108
|
+
zip_code: string;
|
|
109
|
+
logo: string;
|
|
110
|
+
userClinic?: UserClinic[];
|
|
111
|
+
static get tableName(): string;
|
|
112
|
+
static get jsonSchema(): {
|
|
113
|
+
type: string;
|
|
114
|
+
properties: {
|
|
115
|
+
id: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
name: {
|
|
119
|
+
type: string;
|
|
120
|
+
maxLength: number;
|
|
121
|
+
};
|
|
122
|
+
country: {
|
|
123
|
+
type: string;
|
|
124
|
+
maxLength: number;
|
|
125
|
+
};
|
|
126
|
+
city: {
|
|
127
|
+
type: string;
|
|
128
|
+
maxLength: number;
|
|
129
|
+
};
|
|
130
|
+
address: {
|
|
131
|
+
type: string;
|
|
132
|
+
maxLength: number;
|
|
133
|
+
};
|
|
134
|
+
contact: {
|
|
135
|
+
type: string;
|
|
136
|
+
maxLength: number;
|
|
137
|
+
};
|
|
138
|
+
owner_id: {
|
|
139
|
+
oneOf: {
|
|
140
|
+
type: string;
|
|
141
|
+
}[];
|
|
142
|
+
};
|
|
143
|
+
location_data: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
zip_code: {
|
|
147
|
+
type: string;
|
|
148
|
+
maxLength: number;
|
|
149
|
+
};
|
|
150
|
+
logo: {
|
|
151
|
+
type: string;
|
|
152
|
+
maxLength: number;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
static get relationMappings(): {
|
|
157
|
+
userClinic: {
|
|
158
|
+
relation: default_2.RelationType;
|
|
159
|
+
modelClass: string;
|
|
160
|
+
join: {
|
|
161
|
+
from: string;
|
|
162
|
+
to: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
static getModel(ctx: NoUserRequestContext): typeof Clinic;
|
|
167
|
+
static getAll(ctx: RequestContext, valuesToSelect?: ClinicQuery['select'], whereStatement?: ClinicQuery['where']): Promise<ClinicQuery>;
|
|
168
|
+
static insert(ctx: RequestContext, data: default_2.PartialModelObject<Clinic>): Promise<number>;
|
|
169
|
+
static checkIfClinicExists(ctx: RequestContext, clinicId: number): Promise<boolean>;
|
|
170
|
+
static getClinicsMap(ctx: RequestContext): Promise<{}>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
declare type ClinicQuery = default_2.QueryBuilder<Clinic, Clinic[]>;
|
|
174
|
+
|
|
175
|
+
export declare interface ColProps {
|
|
176
|
+
flex?: FlexType;
|
|
177
|
+
span?: ColSpanType;
|
|
178
|
+
order?: ColSpanType;
|
|
179
|
+
offset?: ColSpanType;
|
|
180
|
+
push?: ColSpanType;
|
|
181
|
+
pull?: ColSpanType;
|
|
182
|
+
xs?: ColSpanType | ColSize;
|
|
183
|
+
sm?: ColSpanType | ColSize;
|
|
184
|
+
md?: ColSpanType | ColSize;
|
|
185
|
+
lg?: ColSpanType | ColSize;
|
|
186
|
+
xl?: ColSpanType | ColSize;
|
|
187
|
+
xxl?: ColSpanType | ColSize;
|
|
188
|
+
prefixCls?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export declare interface ColSize {
|
|
192
|
+
flex?: FlexType;
|
|
193
|
+
span?: ColSpanType;
|
|
194
|
+
order?: ColSpanType;
|
|
195
|
+
offset?: ColSpanType;
|
|
196
|
+
push?: ColSpanType;
|
|
197
|
+
pull?: ColSpanType;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export declare type ColSpanType = number | string;
|
|
201
|
+
|
|
202
|
+
export declare interface ConditionExpression {
|
|
203
|
+
[field: string]: ConditionValue;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export declare interface ConditionOperator {
|
|
207
|
+
AND?: Conditions[];
|
|
208
|
+
OR?: Conditions[];
|
|
209
|
+
NOT?: Conditions[];
|
|
210
|
+
JQ?: string;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export declare type Conditions = ConditionExpression | ConditionOperator;
|
|
214
|
+
|
|
215
|
+
export declare enum ConditionsFormat {
|
|
216
|
+
JSON_LOGIC = "jsonLogic",
|
|
217
|
+
CUSTOM = "custom"
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Importing the types from json-logic-js makes the process of generating schema.json fails so we use any instead
|
|
222
|
+
*/
|
|
223
|
+
export declare type ConditionsRules = Conditions | any;
|
|
224
|
+
|
|
225
|
+
export declare interface ConditionValue {
|
|
226
|
+
equal?: string | number | boolean;
|
|
227
|
+
not_equal?: string | number | boolean;
|
|
228
|
+
contains?: string;
|
|
229
|
+
not_contains?: string;
|
|
230
|
+
greater_than?: string | number;
|
|
231
|
+
less_than?: string | number;
|
|
232
|
+
empty?: string | number | boolean;
|
|
233
|
+
not_empty?: string | number | boolean;
|
|
234
|
+
parseValue?: boolean;
|
|
235
|
+
operator?: 'AND' | 'OR';
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
declare class ConsentGeneral extends BaseModel {
|
|
239
|
+
name: string;
|
|
240
|
+
project_id: number;
|
|
241
|
+
clinic_id: number | null;
|
|
242
|
+
title: string;
|
|
243
|
+
subtitle: string;
|
|
244
|
+
consent_text_title: string;
|
|
245
|
+
consent_text: string;
|
|
246
|
+
timestamp: string;
|
|
247
|
+
group_meta: ConsentGroupMeta[];
|
|
248
|
+
static get tableName(): string;
|
|
249
|
+
static get jsonSchema(): {
|
|
250
|
+
type: string;
|
|
251
|
+
properties: {
|
|
252
|
+
id: {
|
|
253
|
+
type: string;
|
|
254
|
+
maxLength: number;
|
|
255
|
+
};
|
|
256
|
+
name: {
|
|
257
|
+
type: string;
|
|
258
|
+
maxLength: number;
|
|
259
|
+
};
|
|
260
|
+
project_id: {
|
|
261
|
+
type: string;
|
|
262
|
+
maxLength: number;
|
|
263
|
+
};
|
|
264
|
+
clinic_id: {
|
|
265
|
+
oneOf: {
|
|
266
|
+
type: string;
|
|
267
|
+
}[];
|
|
268
|
+
maxLength: number;
|
|
269
|
+
};
|
|
270
|
+
title: {
|
|
271
|
+
type: string;
|
|
272
|
+
};
|
|
273
|
+
subtitle: {
|
|
274
|
+
type: string;
|
|
275
|
+
};
|
|
276
|
+
consent_text_title: {
|
|
277
|
+
type: string;
|
|
278
|
+
};
|
|
279
|
+
consent_text: {
|
|
280
|
+
type: string;
|
|
281
|
+
};
|
|
282
|
+
timestamp: {
|
|
283
|
+
type: string;
|
|
284
|
+
format: string;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
additionalProperties: boolean;
|
|
288
|
+
};
|
|
289
|
+
static get relationMappings(): {
|
|
290
|
+
group_meta: {
|
|
291
|
+
relation: RelationType;
|
|
292
|
+
modelClass: string;
|
|
293
|
+
join: {
|
|
294
|
+
from: string;
|
|
295
|
+
to: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
orderConsent(): void;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
declare class ConsentGroupMeta extends BaseModel {
|
|
303
|
+
consent_general_id: number;
|
|
304
|
+
header: string;
|
|
305
|
+
footer: string;
|
|
306
|
+
order: number;
|
|
307
|
+
timestamp: string;
|
|
308
|
+
meta: ConsentMeta[];
|
|
309
|
+
static get tableName(): string;
|
|
310
|
+
static get jsonSchema(): {
|
|
311
|
+
type: string;
|
|
312
|
+
properties: {
|
|
313
|
+
id: {
|
|
314
|
+
type: string;
|
|
315
|
+
maxLength: number;
|
|
316
|
+
};
|
|
317
|
+
consent_general_id: {
|
|
318
|
+
type: string;
|
|
319
|
+
maxLength: number;
|
|
320
|
+
};
|
|
321
|
+
header: {
|
|
322
|
+
type: string;
|
|
323
|
+
};
|
|
324
|
+
footer: {
|
|
325
|
+
type: string;
|
|
326
|
+
};
|
|
327
|
+
order: {
|
|
328
|
+
type: string;
|
|
329
|
+
maxLength: number;
|
|
330
|
+
};
|
|
331
|
+
timestamp: {
|
|
332
|
+
type: string;
|
|
333
|
+
format: string;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
additionalProperties: boolean;
|
|
337
|
+
};
|
|
338
|
+
static get relationMappings(): {
|
|
339
|
+
meta: {
|
|
340
|
+
relation: RelationType;
|
|
341
|
+
modelClass: string;
|
|
342
|
+
join: {
|
|
343
|
+
from: string;
|
|
344
|
+
to: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
declare class ConsentMeta extends BaseModel {
|
|
351
|
+
consent_group_meta_id: number;
|
|
352
|
+
specific_consent: string;
|
|
353
|
+
order: number;
|
|
354
|
+
required: number;
|
|
355
|
+
timestamp: string;
|
|
356
|
+
static get tableName(): string;
|
|
357
|
+
static get jsonSchema(): {
|
|
358
|
+
type: string;
|
|
359
|
+
properties: {
|
|
360
|
+
id: {
|
|
361
|
+
type: string;
|
|
362
|
+
maxLength: number;
|
|
363
|
+
};
|
|
364
|
+
consent_group_meta_id: {
|
|
365
|
+
type: string;
|
|
366
|
+
maxLength: number;
|
|
367
|
+
};
|
|
368
|
+
specific_consent: {
|
|
369
|
+
type: string;
|
|
370
|
+
};
|
|
371
|
+
order: {
|
|
372
|
+
type: string;
|
|
373
|
+
maxLength: number;
|
|
374
|
+
};
|
|
375
|
+
required: {
|
|
376
|
+
type: string;
|
|
377
|
+
maxLength: number;
|
|
378
|
+
};
|
|
379
|
+
timestamp: {
|
|
380
|
+
type: string;
|
|
381
|
+
format: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
additionalProperties: boolean;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export declare const CORE: {
|
|
389
|
+
CREATION_TIME: string;
|
|
390
|
+
CREATION_USER: string;
|
|
391
|
+
CRF_NAME: string;
|
|
392
|
+
CRF_STATUS: string;
|
|
393
|
+
HOSPITAL: string;
|
|
394
|
+
HOSPITAL_STATUS: string;
|
|
395
|
+
ID: string;
|
|
396
|
+
LOCK_STATE: string;
|
|
397
|
+
LOCK_USER: string;
|
|
398
|
+
LOCK_DATE: string;
|
|
399
|
+
MODIFICATION_TIME: string;
|
|
400
|
+
MODIFICATION_USER: string;
|
|
401
|
+
PATIENT_ID: string;
|
|
402
|
+
PATIENT_NUMBER: string;
|
|
403
|
+
PATIENT_NUMBER_STATUS: string;
|
|
404
|
+
RECORD_ID: string;
|
|
405
|
+
SIGNATURE_DATE: string;
|
|
406
|
+
SIGNATURE_STATE: string;
|
|
407
|
+
SIGNATURE_USER: string;
|
|
408
|
+
STATUS: string;
|
|
409
|
+
USER_IP: string;
|
|
410
|
+
DATE_OF_QUESTIONNAIRE: string;
|
|
411
|
+
TIME_OF_QUESTIONNAIRE: string;
|
|
412
|
+
VERSION: string;
|
|
413
|
+
REFERENCE: string;
|
|
414
|
+
SUBFORM_ID: string;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
export declare interface CreateDashboardPayload {
|
|
418
|
+
title: string;
|
|
419
|
+
active?: boolean;
|
|
420
|
+
config?: DashboardConfig;
|
|
421
|
+
icon?: string | null;
|
|
422
|
+
weight?: number;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export declare interface CreateFormPayload extends BaseApiServicePayload {
|
|
426
|
+
formName: string;
|
|
427
|
+
patientId: number;
|
|
428
|
+
fullBody: any;
|
|
429
|
+
method?: string;
|
|
430
|
+
token?: string;
|
|
431
|
+
qInfoId?: number;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export declare interface CreateQuestionnairePayload {
|
|
435
|
+
patientId?: number;
|
|
436
|
+
type: 'unique' | 'periodic';
|
|
437
|
+
date: string;
|
|
438
|
+
untilDate?: string;
|
|
439
|
+
formName: string;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export declare interface CreateTriggerPayload {
|
|
443
|
+
notified_about: NotifiedAboutType;
|
|
444
|
+
text_content?: string;
|
|
445
|
+
configuration?: NotificationConfigurationConf;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
declare class CustomQueryBuilder<M extends Model = Model, R = M[]> extends QueryBuilder<M, R> {
|
|
449
|
+
delete(): this;
|
|
450
|
+
nativeDelete(): NumberQueryBuilder<this>;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export declare interface DashboardConfig {
|
|
454
|
+
widgets?: Widget[];
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export declare enum DashboardWidgetType {
|
|
458
|
+
VALUECARD = "ValueCard",
|
|
459
|
+
SECTIONCARD = "SectionCard",
|
|
460
|
+
PATIENTLIST = "PatientList"
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Any changes here may need changes in Caaring-js packages/perseed-react-ui-components/src/dashboards/types.ts
|
|
465
|
+
*/
|
|
466
|
+
export declare enum DataLoaderType {
|
|
467
|
+
OUTCOMES = "outcomes"
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export declare const DATE_FORMAT = "YYYY-MM-DD";
|
|
471
|
+
|
|
472
|
+
export declare const DATE_TYPE: string[];
|
|
473
|
+
|
|
474
|
+
export declare const DATETIME_SHORT_FORMAT = "YYYY-MM-DD HH:mm";
|
|
475
|
+
|
|
476
|
+
export declare const DEFAULT_CONFIGURATION_PATIENT_LIST: {
|
|
477
|
+
id: string;
|
|
478
|
+
name: string;
|
|
479
|
+
type: string;
|
|
480
|
+
label: string;
|
|
481
|
+
required: string;
|
|
482
|
+
crf_name: string;
|
|
483
|
+
status: string;
|
|
484
|
+
}[];
|
|
485
|
+
|
|
486
|
+
export declare interface DeleteFormPayload extends BaseApiServicePayload {
|
|
487
|
+
formId: number;
|
|
488
|
+
formName: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export declare const DYNAMIC_FILE_VALID_FORMATS: {
|
|
492
|
+
1: string[];
|
|
493
|
+
2: string[];
|
|
494
|
+
3: string[];
|
|
495
|
+
4: string[];
|
|
496
|
+
5: string[];
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
declare type EcosystemUsers = {
|
|
500
|
+
ecosystem: string;
|
|
501
|
+
id: number;
|
|
502
|
+
password: string;
|
|
503
|
+
username: string;
|
|
504
|
+
email: string;
|
|
505
|
+
loginId: string;
|
|
506
|
+
displayName: string;
|
|
507
|
+
label: string;
|
|
508
|
+
type: string;
|
|
509
|
+
tz: string;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
export declare const EXCLUDE_FIELDS: string[];
|
|
513
|
+
|
|
514
|
+
declare class ExternalDisplayerCrf extends BaseModel {
|
|
515
|
+
crf_name: string;
|
|
516
|
+
patient_id: number;
|
|
517
|
+
external_form_id: number;
|
|
518
|
+
external_project_id: number;
|
|
519
|
+
static get tableName(): string;
|
|
520
|
+
static get jsonSchema(): {
|
|
521
|
+
type: string;
|
|
522
|
+
properties: {
|
|
523
|
+
id: {
|
|
524
|
+
type: string;
|
|
525
|
+
maxLength: number;
|
|
526
|
+
};
|
|
527
|
+
crf_name: {
|
|
528
|
+
type: string;
|
|
529
|
+
maxLength: number;
|
|
530
|
+
};
|
|
531
|
+
patient_id: {
|
|
532
|
+
type: string;
|
|
533
|
+
maxLength: number;
|
|
534
|
+
};
|
|
535
|
+
external_form_id: {
|
|
536
|
+
type: string;
|
|
537
|
+
maxLength: number;
|
|
538
|
+
};
|
|
539
|
+
external_project_id: {
|
|
540
|
+
type: string;
|
|
541
|
+
maxLength: number;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
additionalProperties: boolean;
|
|
545
|
+
};
|
|
546
|
+
static getModelByPool(projectPool: default_2.TransactionOrKnex): typeof ExternalDisplayerCrf;
|
|
547
|
+
static insert(ctx: RequestContext, data: default_2.PartialModelObject<ExternalDisplayerCrf>): Promise<number>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare class ExternalPatientProject extends BaseModel {
|
|
551
|
+
project_id: number;
|
|
552
|
+
patient_id: number;
|
|
553
|
+
external_project_id?: number;
|
|
554
|
+
external_patient_id?: number;
|
|
555
|
+
projectCrfs: ExternalDisplayerCrf[];
|
|
556
|
+
projectFields: ExternalProjectFields;
|
|
557
|
+
static get tableName(): string;
|
|
558
|
+
static get jsonSchema(): {
|
|
559
|
+
type: string;
|
|
560
|
+
properties: {
|
|
561
|
+
project_id: {
|
|
562
|
+
type: string;
|
|
563
|
+
maxLength: number;
|
|
564
|
+
};
|
|
565
|
+
patient_id: {
|
|
566
|
+
type: string;
|
|
567
|
+
maxLength: number;
|
|
568
|
+
};
|
|
569
|
+
external_project_id: {
|
|
570
|
+
oneOf: {
|
|
571
|
+
type: string;
|
|
572
|
+
}[];
|
|
573
|
+
default: null;
|
|
574
|
+
maxLength: number;
|
|
575
|
+
};
|
|
576
|
+
external_patient_id: {
|
|
577
|
+
oneOf: {
|
|
578
|
+
type: string;
|
|
579
|
+
}[];
|
|
580
|
+
default: null;
|
|
581
|
+
maxLength: number;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
additionalProperties: boolean;
|
|
585
|
+
};
|
|
586
|
+
static get relationMappings(): {
|
|
587
|
+
projectFields: {
|
|
588
|
+
relation: default_2.RelationType;
|
|
589
|
+
modelClass: string;
|
|
590
|
+
join: {
|
|
591
|
+
from: string;
|
|
592
|
+
to: string;
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
projectCrfs: {
|
|
596
|
+
relation: default_2.RelationType;
|
|
597
|
+
modelClass: string;
|
|
598
|
+
join: {
|
|
599
|
+
from: string;
|
|
600
|
+
to: string;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
static getModelByPool(projectPool: default_2.TransactionOrKnex): typeof ExternalPatientProject;
|
|
605
|
+
static getExternalValues(projectPool: default_2.TransactionOrKnex, projectId: number, patientId: number): Promise<ExternalPatientProject[]>;
|
|
606
|
+
getExternalFormId(formName: string, formId: number): number | null;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
declare class ExternalProjectFields extends BaseModel {
|
|
610
|
+
project_id: number;
|
|
611
|
+
fields: string;
|
|
612
|
+
static get tableName(): string;
|
|
613
|
+
static get jsonSchema(): {
|
|
614
|
+
type: string;
|
|
615
|
+
properties: {
|
|
616
|
+
id: {
|
|
617
|
+
type: string;
|
|
618
|
+
maxLength: number;
|
|
619
|
+
};
|
|
620
|
+
project_id: {
|
|
621
|
+
type: string;
|
|
622
|
+
maxLength: number;
|
|
623
|
+
};
|
|
624
|
+
fields: {
|
|
625
|
+
type: string;
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
additionalProperties: boolean;
|
|
629
|
+
};
|
|
630
|
+
static getModel(projectPool: default_2.TransactionOrKnex): typeof ExternalProjectFields;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export declare const FIELD_NAMES: {
|
|
634
|
+
DECIMAL_NAME: string;
|
|
635
|
+
INTEGER_NAME: string;
|
|
636
|
+
MULTIPLE_SELECTION_NAME: string;
|
|
637
|
+
SELECTION_NAME: string;
|
|
638
|
+
DYNAMIC_SELECTION_NAME: string;
|
|
639
|
+
DATE_NAME: string;
|
|
640
|
+
HEADER_NAME: string;
|
|
641
|
+
SUBHEADER_NAME: string;
|
|
642
|
+
WARNING_NAME: string;
|
|
643
|
+
SUBFORM_NAME: string;
|
|
644
|
+
MEMO_NAME: string;
|
|
645
|
+
TEXT_NAME: string;
|
|
646
|
+
TEXT_AREA_NAME: string;
|
|
647
|
+
YES_NO_NAME: string;
|
|
648
|
+
TIME_NAME: string;
|
|
649
|
+
LINK_HREF_NAME: string;
|
|
650
|
+
COUNTRY_NAME: string;
|
|
651
|
+
HOSPITAL_NAME: string;
|
|
652
|
+
USERS_NAME: string;
|
|
653
|
+
DYNAMIC_FILE_NAME: string;
|
|
654
|
+
DYNAMIC_LINK_HREF_NAME: string;
|
|
655
|
+
SCAN_CODE_NAME: string;
|
|
656
|
+
PARAGRAPH_NAME: string;
|
|
657
|
+
FILE_NAME: string;
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
export declare const FIELD_NAMES_MAP: () => {};
|
|
661
|
+
|
|
662
|
+
export declare const FIELD_STATUS: {
|
|
663
|
+
filled: string;
|
|
664
|
+
unk: string;
|
|
665
|
+
na: string;
|
|
666
|
+
nd: string;
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* @deprecated Use STATUS_SUFFIX instead
|
|
671
|
+
* @type {string}
|
|
672
|
+
*/
|
|
673
|
+
export declare const FIELD_SUFFIX = "_status";
|
|
674
|
+
|
|
675
|
+
export declare const FIELDS: {
|
|
676
|
+
DECIMAL: number;
|
|
677
|
+
INTEGER: number;
|
|
678
|
+
MULTIPLE_SELECTION: number;
|
|
679
|
+
SELECTION: number;
|
|
680
|
+
DYNAMIC_SELECTION: number;
|
|
681
|
+
DATE: number;
|
|
682
|
+
HEADER: number;
|
|
683
|
+
SUBHEADER: number;
|
|
684
|
+
WARNING: number;
|
|
685
|
+
SUBFORM: number;
|
|
686
|
+
MEMO: number;
|
|
687
|
+
TEXT: number;
|
|
688
|
+
TEXT_AREA: number;
|
|
689
|
+
YES_NO: number;
|
|
690
|
+
TIME: number;
|
|
691
|
+
LINK_HREF: number;
|
|
692
|
+
COUNTRY: number;
|
|
693
|
+
HOSPITAL: number;
|
|
694
|
+
USERS: number;
|
|
695
|
+
DYNAMIC_FILE: number;
|
|
696
|
+
DYNAMIC_LINK_HREF: number;
|
|
697
|
+
SCAN_CODE: number;
|
|
698
|
+
PARAGRAPH: number;
|
|
699
|
+
FILE: number;
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
export declare interface FilterParams {
|
|
703
|
+
conditions?: Record<string, unknown>;
|
|
704
|
+
relatedData?: {
|
|
705
|
+
join?: string[];
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
export declare type FlexType = number | 'none' | 'auto' | string;
|
|
710
|
+
|
|
711
|
+
export declare const FORM_NAMES: {
|
|
712
|
+
PATIENT: string;
|
|
713
|
+
SEPARATOR: string;
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
export declare const FORM_SUFFIX: {
|
|
717
|
+
AUDIT: string;
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
export declare const FORM_TYPES: {
|
|
721
|
+
STANDARD: number;
|
|
722
|
+
FOLLOW_UP: number;
|
|
723
|
+
ADVERSE_EVENT: number;
|
|
724
|
+
QUESTIONNAIRE: number;
|
|
725
|
+
STUDY: number;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
export declare type GenericBooleanSetting = boolean;
|
|
729
|
+
|
|
730
|
+
export declare interface GenericWidgetDataLoader {
|
|
731
|
+
type: DataLoaderType;
|
|
732
|
+
params: Record<string, any>;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
export declare function getIntrospectionSchema(t: TFunction): IntrospectionSchema;
|
|
736
|
+
|
|
737
|
+
export declare const HREF_TYPE: {
|
|
738
|
+
NEW_WINDOW: string;
|
|
739
|
+
EMBEDDED_HTML: string;
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
export declare interface I18nTextLocales {
|
|
743
|
+
[locale: string]: string;
|
|
744
|
+
default: string;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export declare type I18nTextTranslation = I18nTextLocales | string;
|
|
748
|
+
|
|
749
|
+
declare interface IdRefForm {
|
|
750
|
+
syncId?: number;
|
|
751
|
+
id: number;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
export declare interface IntrospectionField {
|
|
755
|
+
name: string;
|
|
756
|
+
type: IntrospectionSchemaType;
|
|
757
|
+
options?: {
|
|
758
|
+
value: string;
|
|
759
|
+
title: string;
|
|
760
|
+
}[];
|
|
761
|
+
label: string;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export declare interface IntrospectionOption {
|
|
765
|
+
value: string;
|
|
766
|
+
label: string;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export declare interface IntrospectionSchema {
|
|
770
|
+
models: Record<string, IntrospectionSchemaModel>;
|
|
771
|
+
externalApis?: {
|
|
772
|
+
value: string;
|
|
773
|
+
label: string;
|
|
774
|
+
methods?: string | string[];
|
|
775
|
+
}[];
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export declare interface IntrospectionSchemaModel {
|
|
779
|
+
label: string;
|
|
780
|
+
fields: IntrospectionField[];
|
|
781
|
+
relations?: IntrospectionOption[];
|
|
782
|
+
canJoinPatient?: boolean;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export declare enum IntrospectionSchemaType {
|
|
786
|
+
TEXT = "text",
|
|
787
|
+
DATE = "date",
|
|
788
|
+
TIME = "time",
|
|
789
|
+
BOOLEAN = "boolean",
|
|
790
|
+
NUMBER = "number",
|
|
791
|
+
SELECT = "select",
|
|
792
|
+
MULTISELECT = "multiselect"
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export declare const isNotStatusField: (fieldName: any) => boolean;
|
|
796
|
+
|
|
797
|
+
declare interface LoadPatientDataType {
|
|
798
|
+
join?: string[];
|
|
799
|
+
where: Record<string, string> | 'auto';
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export declare const META_NAMES: {
|
|
803
|
+
DEPENDENT_SOURCE: string;
|
|
804
|
+
ENCRYPTED: string;
|
|
805
|
+
ENCRYPTED_LEVEL: string;
|
|
806
|
+
EXTERNAL_SHARING: string;
|
|
807
|
+
SHOW_EMBEDDED_PDF: string;
|
|
808
|
+
HIDDEN: string;
|
|
809
|
+
IS_CRF_MAIN_FIELD: string;
|
|
810
|
+
MIN_VALUE: string;
|
|
811
|
+
MIN_VALUE_VALIDATION: string;
|
|
812
|
+
MAX_VALUE: string;
|
|
813
|
+
MAX_VALUE_VALIDATION: string;
|
|
814
|
+
NEXT_FORM: string;
|
|
815
|
+
MULTIPLE: string;
|
|
816
|
+
ORDER: string;
|
|
817
|
+
READ_ONLY: string;
|
|
818
|
+
REQUIRED: string;
|
|
819
|
+
REQUIRED_TYPE: string;
|
|
820
|
+
SELECTION_VALUE: string;
|
|
821
|
+
SELECTION_VALUE_SLIDER: string;
|
|
822
|
+
SOURCE_FIELD: string;
|
|
823
|
+
TYPE: string;
|
|
824
|
+
TYPE_QUESTIONARY: string;
|
|
825
|
+
QUESTION_DAYS: string;
|
|
826
|
+
QUESTION_TIME: string;
|
|
827
|
+
QUESTION_HOURS: string;
|
|
828
|
+
QUESTION_MINUTES: string;
|
|
829
|
+
REMINDER_DAYS: string;
|
|
830
|
+
REMINDER_HOURS: string;
|
|
831
|
+
REMINDER_MINUTES: string;
|
|
832
|
+
REMINDER_SUBJECT: string;
|
|
833
|
+
REMINDER_MESSAGE: string;
|
|
834
|
+
MAX_NUMBER_REMINDER: string;
|
|
835
|
+
NUMBER_QUESTION_PAGE: string;
|
|
836
|
+
UNTIL: string;
|
|
837
|
+
NUMBER_OF_QUESTIONAIRES: string;
|
|
838
|
+
QUESTION_COMMENTS: string;
|
|
839
|
+
TYPE_OF_QUESTIONNAIRE: string;
|
|
840
|
+
HISTORY_OF_QUESTIONNAIRE: string;
|
|
841
|
+
HISTORY: string;
|
|
842
|
+
CRF_HISTORY: string;
|
|
843
|
+
PROCEDURE_CONDITION: string;
|
|
844
|
+
HREF_VALUE: string;
|
|
845
|
+
HREF_TYPE: string;
|
|
846
|
+
SIZE: string;
|
|
847
|
+
FILE_TYPE: string;
|
|
848
|
+
INPUT_TYPE: string;
|
|
849
|
+
PARAGRAPH_CONTENT: string;
|
|
850
|
+
FILE_VALUE: string;
|
|
851
|
+
WINDOW_REFERENCE: string;
|
|
852
|
+
START_DATE_DAYS: string;
|
|
853
|
+
HAS_DEFAULT_VALUE: string;
|
|
854
|
+
SPECIFIC_VALUE: string;
|
|
855
|
+
DEFAULT_VALUE: string;
|
|
856
|
+
UNIQUE: string;
|
|
857
|
+
HELP: string;
|
|
858
|
+
SELECTOR_TYPE: string;
|
|
859
|
+
SLIDER_SELECTOR: string;
|
|
860
|
+
SLIDER_SCALE_ORIENTATION: string;
|
|
861
|
+
UNTIL_DATE: string;
|
|
862
|
+
PAGE_BREAK: string;
|
|
863
|
+
WINDOW_BEFORE: string;
|
|
864
|
+
WINDOW_AFTER: string;
|
|
865
|
+
WINDOW_PERIOD: string;
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
export declare const META_RESTRICTION: {
|
|
869
|
+
STRICT: string;
|
|
870
|
+
FLEXIBLE: string;
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
export declare const META_STATUS: {
|
|
874
|
+
ACTIVE: string;
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
export declare interface MFALoginData {
|
|
878
|
+
type: MFAMethodCode;
|
|
879
|
+
value: string;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* MFA method definition and configuration
|
|
884
|
+
*/
|
|
885
|
+
export declare interface MFAMethod {
|
|
886
|
+
code: MFAMethodCode;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Available MFA methods
|
|
891
|
+
*/
|
|
892
|
+
export declare type MFAMethodCode = 'sms' | 'email';
|
|
893
|
+
|
|
894
|
+
declare type ModelName = string;
|
|
895
|
+
|
|
896
|
+
export declare const MULTIPLE_SELECTION_SEPARATOR = "~";
|
|
897
|
+
|
|
898
|
+
export declare const MYSQL_DATE_FORMAT = "YYYY-MM-DD";
|
|
899
|
+
|
|
900
|
+
export declare const MYSQL_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
901
|
+
|
|
902
|
+
export declare const NO_FILL_STATUS: string[];
|
|
903
|
+
|
|
904
|
+
export declare interface NotificationConfigurationConf {
|
|
905
|
+
conditions?: ConditionsRules;
|
|
906
|
+
join?: string[];
|
|
907
|
+
load_patient?: LoadPatientDataType;
|
|
908
|
+
action?: ApiAction;
|
|
909
|
+
conditionsFormat?: ConditionsFormat;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export declare type NotifiedAboutType = `model_${ModelName}` | `model_displayer_${ModelName}` | `model_${ModelName}_${TriggerAction}` | `model_displayer_${ModelName}_${TriggerAction}`;
|
|
913
|
+
|
|
914
|
+
declare type NoUserRequestContext = Omit<RequestContext, 'userId' | 'patientId' | 'ip' | 'user' | 'userLanguage' | 'coreProfiling' | 'userRole' | 'loginId'>;
|
|
915
|
+
|
|
916
|
+
export declare const NUMBER_TYPE: string[];
|
|
917
|
+
|
|
918
|
+
export declare const OBJECT_TYPE: string[];
|
|
919
|
+
|
|
920
|
+
declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Any changes here may need changes in Caaring-js packages/perseed-api-client/src/PerseedApiClient.ts
|
|
924
|
+
*/
|
|
925
|
+
export declare type OrderDir = 'asc' | 'desc';
|
|
926
|
+
|
|
927
|
+
export declare type Outcome = OutcomeDateGroup & {
|
|
928
|
+
name: string;
|
|
929
|
+
identifier: string;
|
|
930
|
+
from: string;
|
|
931
|
+
to: string;
|
|
932
|
+
value: number;
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
export declare type OutcomeDateField = `${OutcomesDateFields}.${OutcomesDateFunctions}`;
|
|
936
|
+
|
|
937
|
+
export declare interface OutcomeDateGroup {
|
|
938
|
+
[dateGroup: string]: string;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export declare type OutcomesDateFields = 'from' | 'to';
|
|
942
|
+
|
|
943
|
+
export declare type OutcomesDateFunctions = 'date' | 'day' | 'dayname' | 'dayofmonth' | 'dayofweek' | 'dayofyear' | 'hour' | 'minute' | 'month' | 'monthname' | 'time' | 'second' | 'week' | 'weekday' | 'weekofyear' | 'year' | 'yearweek';
|
|
944
|
+
|
|
945
|
+
export declare type OutcomesGroupBy = 'name' | 'identifier' | 'value' | OutcomesDateFields | OutcomeDateField;
|
|
946
|
+
|
|
947
|
+
export declare interface OutcomesParams {
|
|
948
|
+
ecosystem: string;
|
|
949
|
+
projectName: string;
|
|
950
|
+
clinicId?: number;
|
|
951
|
+
name: string | string[];
|
|
952
|
+
identifier?: string | string[];
|
|
953
|
+
from?: string;
|
|
954
|
+
to?: string;
|
|
955
|
+
datesContained?: boolean;
|
|
956
|
+
aggType?: AggFunction;
|
|
957
|
+
groupBy?: OutcomesGroupBy | OutcomesGroupBy[];
|
|
958
|
+
limit?: number;
|
|
959
|
+
orderBy?: string;
|
|
960
|
+
orderDir?: OrderDir;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
export declare interface PatientListProps {
|
|
964
|
+
loadUserProfiles?: boolean;
|
|
965
|
+
loadAdherence?: boolean;
|
|
966
|
+
extraFields?: string[];
|
|
967
|
+
loadPushTokens?: boolean;
|
|
968
|
+
loadUserAccessData?: boolean;
|
|
969
|
+
programId?: number | null;
|
|
970
|
+
prevAdherenceDays?: number | null;
|
|
971
|
+
filter?: FilterParams;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
declare class Profiling extends BaseModel {
|
|
975
|
+
name: string;
|
|
976
|
+
description: string;
|
|
977
|
+
timestamp: string;
|
|
978
|
+
project_id: number | null;
|
|
979
|
+
profile_type: string | null;
|
|
980
|
+
parent_id: number | null;
|
|
981
|
+
seedPrivileges: SeedPrivilege[];
|
|
982
|
+
enabledCrfs?: ProfilingEnableCp;
|
|
983
|
+
addRepeatCrfs?: ProfilingAddRepeatCrf[];
|
|
984
|
+
deleteRepeatCrfs?: ProfilingDeleteRepeatCrf[];
|
|
985
|
+
privilegesDenied?: ProfilingPrivilegeDenied[];
|
|
986
|
+
profilingSelections?: ProfilingSelected[];
|
|
987
|
+
static get tableName(): string;
|
|
988
|
+
static get jsonSchema(): {
|
|
989
|
+
type: string;
|
|
990
|
+
properties: {
|
|
991
|
+
id: {
|
|
992
|
+
type: string;
|
|
993
|
+
maxLength: number;
|
|
994
|
+
};
|
|
995
|
+
name: {
|
|
996
|
+
type: string;
|
|
997
|
+
maxLength: number;
|
|
998
|
+
};
|
|
999
|
+
description: {
|
|
1000
|
+
type: string;
|
|
1001
|
+
};
|
|
1002
|
+
timestamp: {
|
|
1003
|
+
type: string;
|
|
1004
|
+
format: string;
|
|
1005
|
+
};
|
|
1006
|
+
project_id: {
|
|
1007
|
+
oneOf: {
|
|
1008
|
+
type: string;
|
|
1009
|
+
}[];
|
|
1010
|
+
default: null;
|
|
1011
|
+
maxLength: number;
|
|
1012
|
+
};
|
|
1013
|
+
profile_type: {
|
|
1014
|
+
oneOf: {
|
|
1015
|
+
type: string;
|
|
1016
|
+
}[];
|
|
1017
|
+
default: null;
|
|
1018
|
+
maxLength: number;
|
|
1019
|
+
};
|
|
1020
|
+
parent_id: {
|
|
1021
|
+
oneOf: {
|
|
1022
|
+
type: string;
|
|
1023
|
+
}[];
|
|
1024
|
+
default: null;
|
|
1025
|
+
maxLength: number;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
additionalProperties: boolean;
|
|
1029
|
+
};
|
|
1030
|
+
static get relationMappings(): {
|
|
1031
|
+
seedPrivileges: {
|
|
1032
|
+
relation: RelationType;
|
|
1033
|
+
modelClass: string;
|
|
1034
|
+
join: {
|
|
1035
|
+
from: string;
|
|
1036
|
+
through: {
|
|
1037
|
+
from: string;
|
|
1038
|
+
to: string;
|
|
1039
|
+
};
|
|
1040
|
+
to: string;
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
addRepeatCrfs: {
|
|
1044
|
+
relation: RelationType;
|
|
1045
|
+
modelClass: string;
|
|
1046
|
+
join: {
|
|
1047
|
+
from: string;
|
|
1048
|
+
to: string;
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
1051
|
+
deleteRepeatCrfs: {
|
|
1052
|
+
relation: RelationType;
|
|
1053
|
+
modelClass: string;
|
|
1054
|
+
join: {
|
|
1055
|
+
from: string;
|
|
1056
|
+
to: string;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
enabledCrfs: {
|
|
1060
|
+
relation: RelationType;
|
|
1061
|
+
modelClass: string;
|
|
1062
|
+
join: {
|
|
1063
|
+
from: string;
|
|
1064
|
+
to: string;
|
|
1065
|
+
};
|
|
1066
|
+
};
|
|
1067
|
+
privilegesDenied: {
|
|
1068
|
+
relation: RelationType;
|
|
1069
|
+
modelClass: string;
|
|
1070
|
+
join: {
|
|
1071
|
+
from: string;
|
|
1072
|
+
to: string;
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
profilingSelections: {
|
|
1076
|
+
relation: RelationType;
|
|
1077
|
+
modelClass: string;
|
|
1078
|
+
join: {
|
|
1079
|
+
from: string;
|
|
1080
|
+
to: string;
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
1084
|
+
static getModel(ctx: RequestContext): typeof Profiling;
|
|
1085
|
+
static getFirstProProfilingId(ctx: RequestContext, projectId: number): Promise<number | undefined>;
|
|
1086
|
+
isProProfiling(seedPrivileges: SeedPrivilege[]): boolean;
|
|
1087
|
+
static hasAddPatient(seedPrivilegeName: string): boolean;
|
|
1088
|
+
static hasConfigNotifications(seedPrivilegeName: string): boolean;
|
|
1089
|
+
static hasManageUsers(seedPrivilegeName: string): boolean;
|
|
1090
|
+
static hasCoreProUserSensitiveInfo(seedPrivilegeName: string): boolean;
|
|
1091
|
+
static hasUsersManagementOrganization(seedPrivilegeName: string): boolean;
|
|
1092
|
+
static hasAllowToControl(seedPrivilegeName: string): boolean;
|
|
1093
|
+
static hasOnlyUpdatePatientsApiPermission(seedPrivilegeName: string): boolean;
|
|
1094
|
+
static hasUploadDocumentsPermission(seedPrivilegeName: string): boolean;
|
|
1095
|
+
static hasDeleteDocumentsPermission(seedPrivilegeName: string): boolean;
|
|
1096
|
+
static hasDownloadDocumentsPermission(seedPrivilegeName: string): boolean;
|
|
1097
|
+
static hasDisplayPatientListPrivilege(seedPrivilegeName: string): boolean;
|
|
1098
|
+
hasManageUsersPrivilege(): boolean;
|
|
1099
|
+
hasCoreProUserSensitiveInfoPrivilege(): boolean;
|
|
1100
|
+
hasUserManagementMyOrganizationsPrivilege(): boolean;
|
|
1101
|
+
hasAllowControlProfilesPrivilege(): boolean;
|
|
1102
|
+
hasDeletePatientPrivilege(): boolean;
|
|
1103
|
+
hasFullDeletePatientPrivilege(): boolean;
|
|
1104
|
+
hasAddRepeatableCrfPrivilege(): boolean;
|
|
1105
|
+
hasDeleteRepeatableCrfPrivilege(): boolean;
|
|
1106
|
+
hasEnableCpPrivilege(): boolean;
|
|
1107
|
+
hasNotificationLogPrivilege(): boolean;
|
|
1108
|
+
hasMyNotificationLogPrivilege(): boolean;
|
|
1109
|
+
hasAllPatientListPrivilege(): boolean;
|
|
1110
|
+
hasOnlyMyPatients(): boolean;
|
|
1111
|
+
hasConnectorAddCpPrivilege(): boolean;
|
|
1112
|
+
hasConnectorAddCrfPrivilege(): boolean;
|
|
1113
|
+
hasConnectorAddFieldPrivilege(): boolean;
|
|
1114
|
+
hasRawExportPrivilege(): boolean;
|
|
1115
|
+
hasExportConfigurationsExplicitAccessOnlyPrivilege(): boolean;
|
|
1116
|
+
static checkIfProfilingExists(ctx: RequestContext, profilingId?: number): Promise<boolean>;
|
|
1117
|
+
isPro(): boolean;
|
|
1118
|
+
isNonPro(): boolean;
|
|
1119
|
+
hasEnabledForm(formName: any): boolean;
|
|
1120
|
+
hasAddRepeatCrf(formName: any): boolean;
|
|
1121
|
+
hasDeleteRepeatCrf(formName: any): boolean;
|
|
1122
|
+
hasViewPermission(formName: any): boolean;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
declare class ProfilingAddRepeatCrf extends BaseModel {
|
|
1126
|
+
profiling_id: number;
|
|
1127
|
+
crf_name: string;
|
|
1128
|
+
static get tableName(): string;
|
|
1129
|
+
static get jsonSchema(): {
|
|
1130
|
+
type: string;
|
|
1131
|
+
properties: {
|
|
1132
|
+
id: {
|
|
1133
|
+
type: string;
|
|
1134
|
+
};
|
|
1135
|
+
profiling_id: {
|
|
1136
|
+
type: string;
|
|
1137
|
+
};
|
|
1138
|
+
crf_name: {
|
|
1139
|
+
type: string;
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
static getModel(ctx: RequestContext): typeof ProfilingAddRepeatCrf;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
declare class ProfilingDeleteRepeatCrf extends BaseModel {
|
|
1147
|
+
profiling_id: number;
|
|
1148
|
+
crf_name: string;
|
|
1149
|
+
static get tableName(): string;
|
|
1150
|
+
static get jsonSchema(): {
|
|
1151
|
+
type: string;
|
|
1152
|
+
properties: {
|
|
1153
|
+
id: {
|
|
1154
|
+
type: string;
|
|
1155
|
+
};
|
|
1156
|
+
profiling_id: {
|
|
1157
|
+
type: string;
|
|
1158
|
+
};
|
|
1159
|
+
crf_name: {
|
|
1160
|
+
type: string;
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
static getModel(ctx: RequestContext): typeof ProfilingDeleteRepeatCrf;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
declare class ProfilingEnableCp extends BaseModel {
|
|
1168
|
+
profiling_id: number;
|
|
1169
|
+
cp: string;
|
|
1170
|
+
crfs: string;
|
|
1171
|
+
static get tableName(): string;
|
|
1172
|
+
static get jsonSchema(): {
|
|
1173
|
+
type: string;
|
|
1174
|
+
properties: {
|
|
1175
|
+
id: {
|
|
1176
|
+
type: string;
|
|
1177
|
+
};
|
|
1178
|
+
profiling_id: {
|
|
1179
|
+
type: string;
|
|
1180
|
+
};
|
|
1181
|
+
cp: {
|
|
1182
|
+
type: string;
|
|
1183
|
+
};
|
|
1184
|
+
crfs: {
|
|
1185
|
+
type: string;
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
static getModel(ctx: RequestContext): typeof ProfilingEnableCp;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
declare class ProfilingPrivilegeDenied extends BaseModel {
|
|
1193
|
+
profiling_id: number;
|
|
1194
|
+
crf_name: string;
|
|
1195
|
+
permission_name: string;
|
|
1196
|
+
static get tableName(): string;
|
|
1197
|
+
static get jsonSchema(): {
|
|
1198
|
+
type: string;
|
|
1199
|
+
properties: {
|
|
1200
|
+
id: {
|
|
1201
|
+
type: string;
|
|
1202
|
+
};
|
|
1203
|
+
profiling_id: {
|
|
1204
|
+
type: string;
|
|
1205
|
+
};
|
|
1206
|
+
crf_name: {
|
|
1207
|
+
type: string;
|
|
1208
|
+
};
|
|
1209
|
+
permission_name: {
|
|
1210
|
+
type: string;
|
|
1211
|
+
};
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
static getModel(ctx: RequestContext): typeof ProfilingPrivilegeDenied;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
declare class ProfilingSelected extends BaseModel {
|
|
1218
|
+
profiling_id: number | null;
|
|
1219
|
+
profiling_selected_id: number | null;
|
|
1220
|
+
static get tableName(): string;
|
|
1221
|
+
static get jsonSchema(): {
|
|
1222
|
+
type: string;
|
|
1223
|
+
properties: {
|
|
1224
|
+
id: {
|
|
1225
|
+
type: string;
|
|
1226
|
+
maxLength: number;
|
|
1227
|
+
};
|
|
1228
|
+
profiling_id: {
|
|
1229
|
+
oneOf: {
|
|
1230
|
+
type: string;
|
|
1231
|
+
}[];
|
|
1232
|
+
maxLength: number;
|
|
1233
|
+
};
|
|
1234
|
+
profiling_selected_id: {
|
|
1235
|
+
oneOf: {
|
|
1236
|
+
type: string;
|
|
1237
|
+
}[];
|
|
1238
|
+
maxLength: number;
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
additionalProperties: boolean;
|
|
1242
|
+
};
|
|
1243
|
+
static getModel(ctx: RequestContext): typeof ProfilingSelected;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
declare class Project extends BaseModel {
|
|
1247
|
+
ecosystem: number;
|
|
1248
|
+
user_id: number;
|
|
1249
|
+
user_mode: string;
|
|
1250
|
+
name: string;
|
|
1251
|
+
label: string;
|
|
1252
|
+
description: string;
|
|
1253
|
+
database_name: string;
|
|
1254
|
+
hostname: string;
|
|
1255
|
+
username: string;
|
|
1256
|
+
password: string;
|
|
1257
|
+
database_name_training: string;
|
|
1258
|
+
hostname_training: string;
|
|
1259
|
+
username_training: string;
|
|
1260
|
+
password_training: string;
|
|
1261
|
+
database_name_production: string;
|
|
1262
|
+
hostname_production: string;
|
|
1263
|
+
username_production: string;
|
|
1264
|
+
password_production: string;
|
|
1265
|
+
mobile_customization: number;
|
|
1266
|
+
mobile_description: string;
|
|
1267
|
+
mobile_icon: string;
|
|
1268
|
+
mobile_splash: string;
|
|
1269
|
+
contact_phone: string;
|
|
1270
|
+
external_ecosystem_name: string | null;
|
|
1271
|
+
clinics: Clinic[];
|
|
1272
|
+
static get tableName(): string;
|
|
1273
|
+
static get jsonSchema(): {
|
|
1274
|
+
type: string;
|
|
1275
|
+
required: string[];
|
|
1276
|
+
properties: {
|
|
1277
|
+
id: {
|
|
1278
|
+
type: string;
|
|
1279
|
+
};
|
|
1280
|
+
ecosystem: {
|
|
1281
|
+
type: string;
|
|
1282
|
+
};
|
|
1283
|
+
user_id: {
|
|
1284
|
+
type: string;
|
|
1285
|
+
};
|
|
1286
|
+
user_mode: {
|
|
1287
|
+
type: string;
|
|
1288
|
+
maxLength: number;
|
|
1289
|
+
};
|
|
1290
|
+
name: {
|
|
1291
|
+
type: string;
|
|
1292
|
+
maxLength: number;
|
|
1293
|
+
};
|
|
1294
|
+
label: {
|
|
1295
|
+
type: string;
|
|
1296
|
+
maxLength: number;
|
|
1297
|
+
};
|
|
1298
|
+
description: {
|
|
1299
|
+
type: string;
|
|
1300
|
+
};
|
|
1301
|
+
database_name: {
|
|
1302
|
+
type: string;
|
|
1303
|
+
maxLength: number;
|
|
1304
|
+
};
|
|
1305
|
+
hostname: {
|
|
1306
|
+
type: string;
|
|
1307
|
+
maxLength: number;
|
|
1308
|
+
};
|
|
1309
|
+
username: {
|
|
1310
|
+
type: string;
|
|
1311
|
+
maxLength: number;
|
|
1312
|
+
};
|
|
1313
|
+
password: {
|
|
1314
|
+
type: string;
|
|
1315
|
+
maxLength: number;
|
|
1316
|
+
};
|
|
1317
|
+
database_name_training: {
|
|
1318
|
+
type: string;
|
|
1319
|
+
maxLength: number;
|
|
1320
|
+
};
|
|
1321
|
+
hostname_training: {
|
|
1322
|
+
type: string;
|
|
1323
|
+
maxLength: number;
|
|
1324
|
+
};
|
|
1325
|
+
username_training: {
|
|
1326
|
+
type: string;
|
|
1327
|
+
maxLength: number;
|
|
1328
|
+
};
|
|
1329
|
+
password_training: {
|
|
1330
|
+
type: string;
|
|
1331
|
+
maxLength: number;
|
|
1332
|
+
};
|
|
1333
|
+
database_name_production: {
|
|
1334
|
+
type: string;
|
|
1335
|
+
maxLength: number;
|
|
1336
|
+
};
|
|
1337
|
+
hostname_production: {
|
|
1338
|
+
type: string;
|
|
1339
|
+
maxLength: number;
|
|
1340
|
+
};
|
|
1341
|
+
username_production: {
|
|
1342
|
+
type: string;
|
|
1343
|
+
maxLength: number;
|
|
1344
|
+
};
|
|
1345
|
+
password_production: {
|
|
1346
|
+
type: string;
|
|
1347
|
+
maxLength: number;
|
|
1348
|
+
};
|
|
1349
|
+
mobile_customization: {
|
|
1350
|
+
type: string;
|
|
1351
|
+
};
|
|
1352
|
+
mobile_description: {
|
|
1353
|
+
type: string;
|
|
1354
|
+
};
|
|
1355
|
+
mobile_icon: {
|
|
1356
|
+
type: string;
|
|
1357
|
+
maxLength: number;
|
|
1358
|
+
};
|
|
1359
|
+
mobile_splash: {
|
|
1360
|
+
type: string;
|
|
1361
|
+
maxLength: number;
|
|
1362
|
+
};
|
|
1363
|
+
contact_phone: {
|
|
1364
|
+
type: string;
|
|
1365
|
+
maxLength: number;
|
|
1366
|
+
};
|
|
1367
|
+
external_ecosystem_name: {
|
|
1368
|
+
oneOf: {
|
|
1369
|
+
type: string;
|
|
1370
|
+
}[];
|
|
1371
|
+
default: null;
|
|
1372
|
+
maxLength: number;
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
static get relationMappings(): {
|
|
1377
|
+
clinics: {
|
|
1378
|
+
relation: default_2.RelationType;
|
|
1379
|
+
modelClass: string;
|
|
1380
|
+
join: {
|
|
1381
|
+
from: string;
|
|
1382
|
+
through: {
|
|
1383
|
+
from: string;
|
|
1384
|
+
to: string;
|
|
1385
|
+
};
|
|
1386
|
+
to: string;
|
|
1387
|
+
};
|
|
1388
|
+
};
|
|
1389
|
+
};
|
|
1390
|
+
static getModel(ctx: RequestContext): typeof Project;
|
|
1391
|
+
static getModelByPool(ecosystemPool: default_2.TransactionOrKnex): typeof Project;
|
|
1392
|
+
static checkIfProjectExists(ctx: RequestContext, projectId: number): Promise<boolean>;
|
|
1393
|
+
static getProjectIdByName(ctxOrEcosystemPool: RequestContext | default_2.TransactionOrKnex, projectName: string): Promise<number | undefined>;
|
|
1394
|
+
static getProjectIdByNameOrFail(ctx: RequestContext, projectName?: string | null): Promise<number>;
|
|
1395
|
+
static getProjectName(ctx: RequestContext, projectId: number): Promise<string | undefined>;
|
|
1396
|
+
static getExternalEcosystemName(ctx: RequestContext, projectId: number): Promise<string | null | undefined>;
|
|
1397
|
+
static getProjectLabel(ctx: RequestContext, projectName: string): Promise<string | undefined>;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
declare enum QuestionnaireInfoUpdateMode {
|
|
1401
|
+
START_OVER = 0,
|
|
1402
|
+
RESUME = 1
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
declare interface QuestionnaireInfoUpdateOptions {
|
|
1406
|
+
defaultMode: QuestionnaireInfoUpdateMode;
|
|
1407
|
+
referenceFieldIdModes?: {
|
|
1408
|
+
[key: string]: QuestionnaireInfoUpdateMode;
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* req.body object mfa validation
|
|
1414
|
+
*/
|
|
1415
|
+
export declare interface ReqBodyWithMFA {
|
|
1416
|
+
mfa?: MFALoginData;
|
|
1417
|
+
[key: string]: any;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
declare class RequestCache_2 {
|
|
1421
|
+
cache: Record<string, any>;
|
|
1422
|
+
cacheHits: Record<string, number>;
|
|
1423
|
+
redisCacheHits: Record<string, number>;
|
|
1424
|
+
nodeCacheHits: Record<string, number>;
|
|
1425
|
+
ctx: RequestContext;
|
|
1426
|
+
constructor(ctx: RequestContext);
|
|
1427
|
+
get ecosystem(): string | null | undefined;
|
|
1428
|
+
get project(): string | null | undefined;
|
|
1429
|
+
get userId(): number | undefined;
|
|
1430
|
+
get patientId(): number | undefined;
|
|
1431
|
+
/**
|
|
1432
|
+
* Merge options
|
|
1433
|
+
* @param {object} options
|
|
1434
|
+
* @return {*&{projectDependent: boolean, patientDependent: boolean, userDependent: boolean, requestDependent: boolean, serializable: boolean, ecosystemDependent: boolean}}
|
|
1435
|
+
*/
|
|
1436
|
+
getOptions(options: any): CacheOptions;
|
|
1437
|
+
/**
|
|
1438
|
+
* @param {string} key
|
|
1439
|
+
* @param {object} options
|
|
1440
|
+
* @return {string}
|
|
1441
|
+
*/
|
|
1442
|
+
getCacheKey(key: any, options: any): string;
|
|
1443
|
+
getTagsWithDependencyTags(options: CacheOptions): {
|
|
1444
|
+
[x: string]: any;
|
|
1445
|
+
};
|
|
1446
|
+
/**
|
|
1447
|
+
* Add an item to the cache
|
|
1448
|
+
* @param {string} key
|
|
1449
|
+
* @param {any} value
|
|
1450
|
+
* @param {any} opt
|
|
1451
|
+
* @return {any}
|
|
1452
|
+
*/
|
|
1453
|
+
add<T = any>(key: string, value: T, opt?: Partial<CacheOptions>): T;
|
|
1454
|
+
addToLocal<T>(key: any, value: any, tags?: {}, options?: Partial<CacheOptions>): T;
|
|
1455
|
+
addToRedis(key: any, value: any, tags?: {}, options?: Partial<CacheOptions>): any;
|
|
1456
|
+
_addToRequestCache(key: any, value: any): void;
|
|
1457
|
+
_addToRedisCache(key: any, value: any, tags: any): void;
|
|
1458
|
+
_addToNodeCache(key: any, value: any, tags: any): void;
|
|
1459
|
+
/**
|
|
1460
|
+
* Get an item from the cache
|
|
1461
|
+
* @param {string} key
|
|
1462
|
+
* @param {any} defaultValue
|
|
1463
|
+
* @param {any} options
|
|
1464
|
+
* @return {any}
|
|
1465
|
+
*/
|
|
1466
|
+
get(key: any, defaultValue?: null, options?: Partial<CacheOptions>): Promise<any>;
|
|
1467
|
+
/**
|
|
1468
|
+
* Return cached value from local node cache
|
|
1469
|
+
* This function is used in not async environments
|
|
1470
|
+
* @param key
|
|
1471
|
+
* @param defaultValue
|
|
1472
|
+
* @param options
|
|
1473
|
+
* @return {null|*}
|
|
1474
|
+
*/
|
|
1475
|
+
getFromLocal<T = any>(key: any, defaultValue?: T | null, options?: Partial<CacheOptions>): T | null;
|
|
1476
|
+
/**
|
|
1477
|
+
* Return cached value from local node cache
|
|
1478
|
+
* This function is used in not async environments
|
|
1479
|
+
* @param key
|
|
1480
|
+
* @param defaultValue
|
|
1481
|
+
* @param options
|
|
1482
|
+
* @return {null|*}
|
|
1483
|
+
*/
|
|
1484
|
+
getFromRequest(key: any, defaultValue?: null, options?: Partial<CacheOptions>): any;
|
|
1485
|
+
getFromRedis(key: any, defaultValue?: null, options?: Partial<CacheOptions>): any;
|
|
1486
|
+
_getFromRequestCache(key: any): any;
|
|
1487
|
+
_getFromRedisCache(key: any): Promise<any>;
|
|
1488
|
+
_getFromNodeCache(key: any): any;
|
|
1489
|
+
clearDesigner(crf: any): void;
|
|
1490
|
+
clearForm(crf: any, id: any): void;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
declare class RequestContext implements RequestContextData {
|
|
1494
|
+
ecosystemName?: string | null;
|
|
1495
|
+
projectName?: string | null;
|
|
1496
|
+
userId?: number;
|
|
1497
|
+
patientId?: number;
|
|
1498
|
+
ip?: string;
|
|
1499
|
+
cache: RequestCache_2;
|
|
1500
|
+
loginId?: string;
|
|
1501
|
+
user?: User;
|
|
1502
|
+
userLanguage?: string;
|
|
1503
|
+
ecosystemPool?: Knex;
|
|
1504
|
+
projectPool?: Knex;
|
|
1505
|
+
perseedPool?: Knex;
|
|
1506
|
+
ecosystemTrx?: Transaction;
|
|
1507
|
+
tz: string;
|
|
1508
|
+
reqId?: string;
|
|
1509
|
+
i18n: i18n;
|
|
1510
|
+
projectTrx?: Transaction;
|
|
1511
|
+
projectTrxPile: Transaction[];
|
|
1512
|
+
ecosystemTrxPile: Transaction[];
|
|
1513
|
+
coreProfiling?: 'NonPRO' | 'PRO';
|
|
1514
|
+
userRole?: string;
|
|
1515
|
+
projectId?: number;
|
|
1516
|
+
ecosystemId?: number;
|
|
1517
|
+
/**
|
|
1518
|
+
* Compatibility prop, should be removed in the future
|
|
1519
|
+
*/
|
|
1520
|
+
params: {
|
|
1521
|
+
ecosystemName?: string | null;
|
|
1522
|
+
projectName?: string | null;
|
|
1523
|
+
};
|
|
1524
|
+
static create(data: RequestContextData): Promise<RequestContext>;
|
|
1525
|
+
static createFromRequest(req: Request_2): Promise<RequestContext>;
|
|
1526
|
+
static getRequestDataWithUser(req: Optional<Request_2, 'ctx'>, u: Partial<UserData>): RequestContextData;
|
|
1527
|
+
static getRequestData(req: Optional<Request_2, 'ctx'>): Partial<RequestContextData>;
|
|
1528
|
+
getStaticRequestDataWithUser(u: EcosystemUsers): {
|
|
1529
|
+
ecosystemName: string | null;
|
|
1530
|
+
projectName?: string | null | undefined;
|
|
1531
|
+
loginId: string;
|
|
1532
|
+
userId: number;
|
|
1533
|
+
userLanguage?: string | undefined;
|
|
1534
|
+
ip?: string | undefined;
|
|
1535
|
+
tz: string;
|
|
1536
|
+
i18n?: i18n | undefined;
|
|
1537
|
+
reqId?: string | undefined;
|
|
1538
|
+
};
|
|
1539
|
+
getStaticRequestData(): Partial<RequestContextData>;
|
|
1540
|
+
private constructor();
|
|
1541
|
+
private init;
|
|
1542
|
+
updateContextData(data: Partial<RequestContextData>): Promise<void>;
|
|
1543
|
+
get userType(): string | undefined;
|
|
1544
|
+
get acceptLanguage(): string;
|
|
1545
|
+
getRequestContextData(): RequestContextData;
|
|
1546
|
+
cloneWithData(data: Partial<RequestContextData>): Promise<RequestContext>;
|
|
1547
|
+
get t(): TFunction<["translation", ...string[]], undefined>;
|
|
1548
|
+
getProjectPool(): Knex;
|
|
1549
|
+
getEcosystemPool(): Knex;
|
|
1550
|
+
getPerseedPool(): Knex;
|
|
1551
|
+
getUserId(): number;
|
|
1552
|
+
getUser(throwException?: true): User;
|
|
1553
|
+
getUser(throwException: false): User | undefined;
|
|
1554
|
+
getProjectName(): string;
|
|
1555
|
+
getProjectId(): number;
|
|
1556
|
+
getEcosystemName(): string;
|
|
1557
|
+
getEcosystemId(): number;
|
|
1558
|
+
getPatientId(): number;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
declare interface RequestContextData {
|
|
1562
|
+
ecosystemName?: string | null;
|
|
1563
|
+
projectName?: string | null;
|
|
1564
|
+
loginId?: string;
|
|
1565
|
+
userId?: number;
|
|
1566
|
+
userLanguage?: string;
|
|
1567
|
+
ip?: string;
|
|
1568
|
+
tz: string;
|
|
1569
|
+
i18n?: i18n;
|
|
1570
|
+
reqId?: string;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
declare class Role extends BaseModel {
|
|
1574
|
+
roleId: string;
|
|
1575
|
+
parent_id: number;
|
|
1576
|
+
static get tableName(): string;
|
|
1577
|
+
static get jsonSchema(): {
|
|
1578
|
+
type: string;
|
|
1579
|
+
properties: {
|
|
1580
|
+
id: {
|
|
1581
|
+
type: string;
|
|
1582
|
+
};
|
|
1583
|
+
roleId: {
|
|
1584
|
+
type: string;
|
|
1585
|
+
};
|
|
1586
|
+
parent_id: {
|
|
1587
|
+
type: string;
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
};
|
|
1591
|
+
static getModel(ctx: RequestContext): typeof Role;
|
|
1592
|
+
static getIdByRoleId(ctx: RequestContext, roleId: string): Promise<number | undefined>;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
export declare interface SectionCardProps {
|
|
1596
|
+
icon: string;
|
|
1597
|
+
background?: string;
|
|
1598
|
+
titleBackground?: string;
|
|
1599
|
+
title: I18nTextTranslation;
|
|
1600
|
+
widgets: Widget[];
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* Seed Privilege constants
|
|
1605
|
+
*/
|
|
1606
|
+
declare const SEED_PRIVILEGE: {
|
|
1607
|
+
readonly ADD_PATIENT: "add_patient";
|
|
1608
|
+
readonly ADD_REPEATABLE_CRF: "add_repeat_crf";
|
|
1609
|
+
readonly ADVANCED_FILTER: "advanced_filter";
|
|
1610
|
+
readonly ALL_PATIENT_LIST: "all_patient_list";
|
|
1611
|
+
readonly ALLOW_TO_CONTROL_THESE_PROFILES: "core_control_profile";
|
|
1612
|
+
readonly CONNECTOR_ADD_CP: "connector_add_cp";
|
|
1613
|
+
readonly CONNECTOR_ADD_CRF: "connector_add_crf";
|
|
1614
|
+
readonly CONNECTOR_ADD_FIELD: "connector_add_field";
|
|
1615
|
+
readonly CORE_NOT_ALLOW_ACCESS_SENSITIVE_INFO: "core_not_allow_access_sensitive_info";
|
|
1616
|
+
readonly CORE_NOTIFICATION_LOG: "core_notification_log";
|
|
1617
|
+
readonly CORE_NOTIFICATION_MY_LOG: "core_notification_my_log";
|
|
1618
|
+
readonly DELETE_PATIENT: "delete_patient";
|
|
1619
|
+
readonly FULL_DELETE_PATIENT: "full_delete_patient";
|
|
1620
|
+
readonly DELETE_REPEATABLE_CRF: "delete_crf";
|
|
1621
|
+
readonly EXPORT_ANONYMIZED: "export_anonymized";
|
|
1622
|
+
readonly ENABLE_CP: "enable_cp";
|
|
1623
|
+
readonly EXPORT_MY_HOSPITALS: "export_my_hospitals";
|
|
1624
|
+
readonly EXPORT_NOT_ALLOW_ACCESS_SENSITIVE_INFO: "export_not_allow_access_sensitive_info";
|
|
1625
|
+
readonly EXPORT_USER_TIMESTAMP: "export_user_timestamp";
|
|
1626
|
+
readonly EXPORT_RAW: "export_raw";
|
|
1627
|
+
readonly FILTER_ALL: "filter_all";
|
|
1628
|
+
readonly FILTER_MY_HOSPITALS: "filter_my_hospitals";
|
|
1629
|
+
readonly MANAGE_USERS: "core_manage_user";
|
|
1630
|
+
readonly CORE_PRO_USER_SENSITIVE_INFO: "core_pro_user_sensitive_info";
|
|
1631
|
+
readonly NOTIFICATIONS: "core_notification_seed";
|
|
1632
|
+
readonly ONLY_MY_PATIENTS: "only_my_patients";
|
|
1633
|
+
readonly ONLY_UPDATE_PATIENTS_API: "only_update_patients";
|
|
1634
|
+
readonly PRO_USER: "core_pro_user";
|
|
1635
|
+
readonly USERS_MANAGEMENT_FOR_MY_ORGANIZATIONS: "core_manage_user_hospital";
|
|
1636
|
+
readonly UPLOAD_DOCUMENTS: "add";
|
|
1637
|
+
readonly DELETE_DOCUMENTS: "delete";
|
|
1638
|
+
readonly READ_DOCUMENTS: "read";
|
|
1639
|
+
readonly DISPLAY_PATIENT_LIST: "advanced_patient_list";
|
|
1640
|
+
readonly EXPORT_CONFIGURATION_EXPLICIT_ACCESS: "export_configurations_explicit_access_only";
|
|
1641
|
+
readonly FOLLOWUP_DASHBOARD: "followup_dashboard";
|
|
1642
|
+
readonly TRIGGERS_MANAGEMENT: "triggers_management";
|
|
1643
|
+
};
|
|
1644
|
+
|
|
1645
|
+
declare type SEED_PRIVILEGE_Keys = keyof typeof SEED_PRIVILEGE;
|
|
1646
|
+
|
|
1647
|
+
declare type SEED_PRIVILEGES = typeof SEED_PRIVILEGE[SEED_PRIVILEGE_Keys];
|
|
1648
|
+
|
|
1649
|
+
declare class SeedPrivilege extends BaseModel {
|
|
1650
|
+
seed_id: number;
|
|
1651
|
+
name: string;
|
|
1652
|
+
label: string;
|
|
1653
|
+
description: string;
|
|
1654
|
+
timestamp: string;
|
|
1655
|
+
controller: string;
|
|
1656
|
+
action: string;
|
|
1657
|
+
param: string;
|
|
1658
|
+
is_relate_extra_control: number;
|
|
1659
|
+
static get tableName(): string;
|
|
1660
|
+
static get jsonSchema(): {
|
|
1661
|
+
type: string;
|
|
1662
|
+
properties: {
|
|
1663
|
+
id: {
|
|
1664
|
+
type: string;
|
|
1665
|
+
maxLength: number;
|
|
1666
|
+
};
|
|
1667
|
+
seed_id: {
|
|
1668
|
+
type: string;
|
|
1669
|
+
maxLength: number;
|
|
1670
|
+
};
|
|
1671
|
+
name: {
|
|
1672
|
+
type: string;
|
|
1673
|
+
maxLength: number;
|
|
1674
|
+
};
|
|
1675
|
+
label: {
|
|
1676
|
+
type: string;
|
|
1677
|
+
maxLength: number;
|
|
1678
|
+
};
|
|
1679
|
+
description: {
|
|
1680
|
+
type: string;
|
|
1681
|
+
};
|
|
1682
|
+
timestamp: {
|
|
1683
|
+
type: string;
|
|
1684
|
+
format: string;
|
|
1685
|
+
};
|
|
1686
|
+
controller: {
|
|
1687
|
+
type: string;
|
|
1688
|
+
maxLength: number;
|
|
1689
|
+
};
|
|
1690
|
+
action: {
|
|
1691
|
+
type: string;
|
|
1692
|
+
maxLength: number;
|
|
1693
|
+
};
|
|
1694
|
+
param: {
|
|
1695
|
+
type: string;
|
|
1696
|
+
maxLength: number;
|
|
1697
|
+
};
|
|
1698
|
+
is_relate_extra_control: {
|
|
1699
|
+
type: string;
|
|
1700
|
+
maxLength: number;
|
|
1701
|
+
};
|
|
1702
|
+
};
|
|
1703
|
+
additionalProperties: boolean;
|
|
1704
|
+
};
|
|
1705
|
+
static getModel(ctx: RequestContext): typeof SeedPrivilege;
|
|
1706
|
+
isDeletePatient(): boolean;
|
|
1707
|
+
isFullDeletePatient(): boolean;
|
|
1708
|
+
isAddRepeatableCrf(): boolean;
|
|
1709
|
+
isDeleteRepeatableCrf(): boolean;
|
|
1710
|
+
isEnableCp(): boolean;
|
|
1711
|
+
isShowAllNotificationsInLog(): boolean;
|
|
1712
|
+
isShowOnlyMyNotificationsInLog(): boolean;
|
|
1713
|
+
isAllPatientList(): boolean;
|
|
1714
|
+
isOnlyMyPatients(): boolean;
|
|
1715
|
+
isManageUsers(): boolean;
|
|
1716
|
+
isCoreProUserSensitiveInfo(): boolean;
|
|
1717
|
+
isUserManagementMyOrganizations(): boolean;
|
|
1718
|
+
isAllowControlProfiles(): boolean;
|
|
1719
|
+
isConnectorAddCp(): boolean;
|
|
1720
|
+
isConnectorAddCrf(): boolean;
|
|
1721
|
+
isConnectorAddField(): boolean;
|
|
1722
|
+
isExportRaw(): boolean;
|
|
1723
|
+
isExportConfigurationsExplicitAccessOnly(): boolean;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
export declare const SELECTOR_TYPE: {
|
|
1727
|
+
SLIDER: string;
|
|
1728
|
+
DROPDOWN: string;
|
|
1729
|
+
RADIO_BUTTON: string;
|
|
1730
|
+
CHECK_BOX: string;
|
|
1731
|
+
};
|
|
1732
|
+
|
|
1733
|
+
declare interface SettingResponse {
|
|
1734
|
+
id: number;
|
|
1735
|
+
name: string;
|
|
1736
|
+
value: UserSettingValue;
|
|
1737
|
+
device_id?: string | null;
|
|
1738
|
+
project_name?: string | null;
|
|
1739
|
+
ecosystem_name?: string | null;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
export declare const SHORT_TIME_FORMAT = "HH:mm";
|
|
1743
|
+
|
|
1744
|
+
export declare const SLIDER_SCALE_ORIENTATION_TYPE: {
|
|
1745
|
+
[x: string]: string;
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
export declare const SLIDER_SCALE_TYPE: {
|
|
1749
|
+
HORIZONTAL: string;
|
|
1750
|
+
VERTICAL: string;
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
export declare const SLIDER_SELECTOR_TYPE: {
|
|
1754
|
+
[x: string]: string;
|
|
1755
|
+
};
|
|
1756
|
+
|
|
1757
|
+
export declare const SLIDER_TYPE: {
|
|
1758
|
+
STARS: string;
|
|
1759
|
+
SCALE_RATING: string;
|
|
1760
|
+
IMAGES: string;
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
export declare const STATUS_FIELD_REGEXP: RegExp;
|
|
1764
|
+
|
|
1765
|
+
export declare const STATUS_SUFFIX = "_status";
|
|
1766
|
+
|
|
1767
|
+
declare class SubformReference extends BaseModel {
|
|
1768
|
+
crf_name: string;
|
|
1769
|
+
subform: number;
|
|
1770
|
+
record_id: number;
|
|
1771
|
+
subform_id: number;
|
|
1772
|
+
reference: number;
|
|
1773
|
+
static get tableName(): string;
|
|
1774
|
+
static get jsonSchema(): {
|
|
1775
|
+
type: string;
|
|
1776
|
+
properties: {
|
|
1777
|
+
id: {
|
|
1778
|
+
type: string;
|
|
1779
|
+
};
|
|
1780
|
+
crf_name: {
|
|
1781
|
+
type: string;
|
|
1782
|
+
};
|
|
1783
|
+
subform: {
|
|
1784
|
+
type: string;
|
|
1785
|
+
};
|
|
1786
|
+
record_id: {
|
|
1787
|
+
type: string;
|
|
1788
|
+
};
|
|
1789
|
+
subform_id: {
|
|
1790
|
+
type: string;
|
|
1791
|
+
};
|
|
1792
|
+
reference: {
|
|
1793
|
+
type: string;
|
|
1794
|
+
};
|
|
1795
|
+
};
|
|
1796
|
+
};
|
|
1797
|
+
static getModelByPool(projectPool: default_2.TransactionOrKnex): typeof SubformReference;
|
|
1798
|
+
static getModel(ctx: RequestContext): typeof SubformReference;
|
|
1799
|
+
static getSubformRef(ctx: RequestContext, recordId: number | null, reference: number, subform: number, crfName: string): Promise<SubformReference | undefined>;
|
|
1800
|
+
$beforeInsert(queryContext: any): Promise<void>;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
export declare const TIME_FORMAT = "HH:mm:ss";
|
|
1804
|
+
|
|
1805
|
+
export declare const TIME_SCHEMA = "^[0-1][0-9]:[0-5][0-9]$|^[0-2][0-3]:[0-5][0-9]$";
|
|
1806
|
+
|
|
1807
|
+
export declare enum TriggerAction {
|
|
1808
|
+
CREATION = "creation",
|
|
1809
|
+
UPDATE = "update"
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
export declare type UpdateDashboardPayload = Partial<CreateDashboardPayload>;
|
|
1813
|
+
|
|
1814
|
+
export declare interface UpdateFormPayload extends BaseApiServicePayload {
|
|
1815
|
+
formName: string;
|
|
1816
|
+
body: any;
|
|
1817
|
+
formId: number;
|
|
1818
|
+
token?: string;
|
|
1819
|
+
options?: QuestionnaireInfoUpdateOptions;
|
|
1820
|
+
method?: string;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
export declare type UpdateTriggerPayload = Partial<CreateTriggerPayload>;
|
|
1824
|
+
|
|
1825
|
+
declare class User extends BaseModel {
|
|
1826
|
+
username?: string;
|
|
1827
|
+
created_user?: number;
|
|
1828
|
+
created_mode?: string;
|
|
1829
|
+
mod_user?: number;
|
|
1830
|
+
mod_time?: string;
|
|
1831
|
+
email?: string;
|
|
1832
|
+
password: string;
|
|
1833
|
+
displayName?: string;
|
|
1834
|
+
blocked: number;
|
|
1835
|
+
timestamp: string;
|
|
1836
|
+
state?: number;
|
|
1837
|
+
new_register?: string;
|
|
1838
|
+
password_changed_date?: string;
|
|
1839
|
+
token?: string;
|
|
1840
|
+
type?: string;
|
|
1841
|
+
expiry_date?: string;
|
|
1842
|
+
allow_upload: number;
|
|
1843
|
+
allow_change_color: number;
|
|
1844
|
+
clinic_request: string;
|
|
1845
|
+
favourite: string;
|
|
1846
|
+
last_access?: string;
|
|
1847
|
+
temporary_password: string;
|
|
1848
|
+
currentFailedCount?: number;
|
|
1849
|
+
token_date?: string;
|
|
1850
|
+
clinics?: Clinic[];
|
|
1851
|
+
projects?: Project[];
|
|
1852
|
+
patients?: UserPatient[];
|
|
1853
|
+
profile?: UserProfile;
|
|
1854
|
+
role?: Role;
|
|
1855
|
+
profilings?: Profiling[];
|
|
1856
|
+
_clinicsNotRepeated?: Clinic[];
|
|
1857
|
+
static get tableName(): string;
|
|
1858
|
+
static get jsonSchema(): {
|
|
1859
|
+
type: string;
|
|
1860
|
+
properties: {
|
|
1861
|
+
id: {
|
|
1862
|
+
type: string;
|
|
1863
|
+
maxLength: number;
|
|
1864
|
+
};
|
|
1865
|
+
username: {
|
|
1866
|
+
oneOf: {
|
|
1867
|
+
type: string;
|
|
1868
|
+
}[];
|
|
1869
|
+
default: null;
|
|
1870
|
+
maxLength: number;
|
|
1871
|
+
};
|
|
1872
|
+
created_user: {
|
|
1873
|
+
oneOf: {
|
|
1874
|
+
type: string;
|
|
1875
|
+
}[];
|
|
1876
|
+
default: null;
|
|
1877
|
+
maxLength: number;
|
|
1878
|
+
};
|
|
1879
|
+
created_mode: {
|
|
1880
|
+
oneOf: {
|
|
1881
|
+
type: string;
|
|
1882
|
+
}[];
|
|
1883
|
+
default: null;
|
|
1884
|
+
maxLength: number;
|
|
1885
|
+
};
|
|
1886
|
+
mod_user: {
|
|
1887
|
+
oneOf: {
|
|
1888
|
+
type: string;
|
|
1889
|
+
}[];
|
|
1890
|
+
default: null;
|
|
1891
|
+
maxLength: number;
|
|
1892
|
+
};
|
|
1893
|
+
mod_time: {
|
|
1894
|
+
oneOf: ({
|
|
1895
|
+
type: string;
|
|
1896
|
+
format?: undefined;
|
|
1897
|
+
} | {
|
|
1898
|
+
type: string;
|
|
1899
|
+
format: string;
|
|
1900
|
+
})[];
|
|
1901
|
+
default: null;
|
|
1902
|
+
};
|
|
1903
|
+
email: {
|
|
1904
|
+
oneOf: {
|
|
1905
|
+
type: string;
|
|
1906
|
+
}[];
|
|
1907
|
+
default: null;
|
|
1908
|
+
maxLength: number;
|
|
1909
|
+
};
|
|
1910
|
+
password: {
|
|
1911
|
+
type: string;
|
|
1912
|
+
default: string;
|
|
1913
|
+
maxLength: number;
|
|
1914
|
+
};
|
|
1915
|
+
displayName: {
|
|
1916
|
+
oneOf: {
|
|
1917
|
+
type: string;
|
|
1918
|
+
}[];
|
|
1919
|
+
default: null;
|
|
1920
|
+
maxLength: number;
|
|
1921
|
+
};
|
|
1922
|
+
blocked: {
|
|
1923
|
+
type: string;
|
|
1924
|
+
default: number;
|
|
1925
|
+
enum: number[];
|
|
1926
|
+
};
|
|
1927
|
+
timestamp: {
|
|
1928
|
+
type: string;
|
|
1929
|
+
format: string;
|
|
1930
|
+
};
|
|
1931
|
+
state: {
|
|
1932
|
+
oneOf: {
|
|
1933
|
+
type: string;
|
|
1934
|
+
}[];
|
|
1935
|
+
default: null;
|
|
1936
|
+
maxLength: number;
|
|
1937
|
+
};
|
|
1938
|
+
new_register: {
|
|
1939
|
+
oneOf: {
|
|
1940
|
+
type: string;
|
|
1941
|
+
}[];
|
|
1942
|
+
default: null;
|
|
1943
|
+
maxLength: number;
|
|
1944
|
+
};
|
|
1945
|
+
password_changed_date: {
|
|
1946
|
+
oneOf: ({
|
|
1947
|
+
type: string;
|
|
1948
|
+
format: string;
|
|
1949
|
+
} | {
|
|
1950
|
+
type: string;
|
|
1951
|
+
format?: undefined;
|
|
1952
|
+
})[];
|
|
1953
|
+
default: null;
|
|
1954
|
+
};
|
|
1955
|
+
token: {
|
|
1956
|
+
oneOf: {
|
|
1957
|
+
type: string;
|
|
1958
|
+
}[];
|
|
1959
|
+
default: null;
|
|
1960
|
+
maxLength: number;
|
|
1961
|
+
};
|
|
1962
|
+
type: {
|
|
1963
|
+
oneOf: {
|
|
1964
|
+
type: string;
|
|
1965
|
+
}[];
|
|
1966
|
+
default: null;
|
|
1967
|
+
maxLength: number;
|
|
1968
|
+
};
|
|
1969
|
+
expiry_date: {
|
|
1970
|
+
oneOf: ({
|
|
1971
|
+
type: string;
|
|
1972
|
+
format?: undefined;
|
|
1973
|
+
} | {
|
|
1974
|
+
type: string;
|
|
1975
|
+
format: string;
|
|
1976
|
+
})[];
|
|
1977
|
+
default: null;
|
|
1978
|
+
};
|
|
1979
|
+
allow_upload: {
|
|
1980
|
+
type: string;
|
|
1981
|
+
default: number;
|
|
1982
|
+
enum: number[];
|
|
1983
|
+
};
|
|
1984
|
+
allow_change_color: {
|
|
1985
|
+
type: string;
|
|
1986
|
+
default: number;
|
|
1987
|
+
enum: number[];
|
|
1988
|
+
};
|
|
1989
|
+
clinic_request: {
|
|
1990
|
+
type: string;
|
|
1991
|
+
};
|
|
1992
|
+
favourite: {
|
|
1993
|
+
type: string;
|
|
1994
|
+
};
|
|
1995
|
+
last_access: {
|
|
1996
|
+
oneOf: {
|
|
1997
|
+
type: string;
|
|
1998
|
+
}[];
|
|
1999
|
+
default: null;
|
|
2000
|
+
};
|
|
2001
|
+
temporary_password: {
|
|
2002
|
+
type: string;
|
|
2003
|
+
};
|
|
2004
|
+
currentFailedCount: {
|
|
2005
|
+
oneOf: {
|
|
2006
|
+
type: string;
|
|
2007
|
+
}[];
|
|
2008
|
+
default: null;
|
|
2009
|
+
maxLength: number;
|
|
2010
|
+
};
|
|
2011
|
+
token_date: {
|
|
2012
|
+
oneOf: ({
|
|
2013
|
+
type: string;
|
|
2014
|
+
format?: undefined;
|
|
2015
|
+
} | {
|
|
2016
|
+
type: string;
|
|
2017
|
+
format: string;
|
|
2018
|
+
})[];
|
|
2019
|
+
default: null;
|
|
2020
|
+
};
|
|
2021
|
+
};
|
|
2022
|
+
additionalProperties: boolean;
|
|
2023
|
+
};
|
|
2024
|
+
static get relationMappings(): {
|
|
2025
|
+
clinics: {
|
|
2026
|
+
relation: default_2.RelationType;
|
|
2027
|
+
modelClass: string;
|
|
2028
|
+
join: {
|
|
2029
|
+
from: string;
|
|
2030
|
+
through: {
|
|
2031
|
+
from: string;
|
|
2032
|
+
to: string;
|
|
2033
|
+
};
|
|
2034
|
+
to: string;
|
|
2035
|
+
};
|
|
2036
|
+
};
|
|
2037
|
+
projects: {
|
|
2038
|
+
relation: default_2.RelationType;
|
|
2039
|
+
modelClass: string;
|
|
2040
|
+
join: {
|
|
2041
|
+
from: string;
|
|
2042
|
+
through: {
|
|
2043
|
+
from: string;
|
|
2044
|
+
to: string;
|
|
2045
|
+
};
|
|
2046
|
+
to: string;
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
patients: {
|
|
2050
|
+
relation: default_2.RelationType;
|
|
2051
|
+
modelClass: string;
|
|
2052
|
+
join: {
|
|
2053
|
+
from: string;
|
|
2054
|
+
to: string;
|
|
2055
|
+
};
|
|
2056
|
+
};
|
|
2057
|
+
profile: {
|
|
2058
|
+
relation: default_2.RelationType;
|
|
2059
|
+
modelClass: string;
|
|
2060
|
+
join: {
|
|
2061
|
+
from: string;
|
|
2062
|
+
to: string;
|
|
2063
|
+
};
|
|
2064
|
+
};
|
|
2065
|
+
role: {
|
|
2066
|
+
relation: default_2.RelationType;
|
|
2067
|
+
modelClass: string;
|
|
2068
|
+
join: {
|
|
2069
|
+
from: string;
|
|
2070
|
+
through: {
|
|
2071
|
+
from: string;
|
|
2072
|
+
to: string;
|
|
2073
|
+
};
|
|
2074
|
+
to: string;
|
|
2075
|
+
};
|
|
2076
|
+
};
|
|
2077
|
+
profilings: {
|
|
2078
|
+
relation: default_2.RelationType;
|
|
2079
|
+
modelClass: string;
|
|
2080
|
+
join: {
|
|
2081
|
+
from: string;
|
|
2082
|
+
through: {
|
|
2083
|
+
from: string;
|
|
2084
|
+
to: string;
|
|
2085
|
+
};
|
|
2086
|
+
to: string;
|
|
2087
|
+
};
|
|
2088
|
+
};
|
|
2089
|
+
};
|
|
2090
|
+
static getModel(ctx: RequestContext): typeof User;
|
|
2091
|
+
static getModelByPool(ecosystemPool: default_2.TransactionOrKnex): typeof User;
|
|
2092
|
+
static getUser(ctx: RequestContext, userId: number): Promise<User | undefined>;
|
|
2093
|
+
static fetchAll(ecosystemPool: default_2.TransactionOrKnex, userId: number, page: number, perPage: number): default_2.QueryBuilder<User, default_2.Page<User>>;
|
|
2094
|
+
static fetchAllForProjects(ecosystemPool: default_2.TransactionOrKnex, projects: number[], userId: number, page: number, perPage: number): default_2.QueryBuilder<User, default_2.Page<User>>;
|
|
2095
|
+
static fetchAllForProjectsAndOrganizations(ecosystemPool: default_2.TransactionOrKnex, clinics: number[], userId: number, page: number, perPage: number): default_2.QueryBuilder<User, default_2.Page<User>>;
|
|
2096
|
+
/**
|
|
2097
|
+
* @param userId
|
|
2098
|
+
* @returns {Promise<User>}
|
|
2099
|
+
*/
|
|
2100
|
+
static getScopes(ecosystemPool: default_2.TransactionOrKnex, userId: number): Promise<User | undefined>;
|
|
2101
|
+
static getUserByEmail(ecosystemPool: default_2.TransactionOrKnex, email: string): Promise<User | undefined>;
|
|
2102
|
+
static insert(ctx: RequestContext, data: default_2.PartialModelObject<User>): Promise<number>;
|
|
2103
|
+
static patch(ctx: RequestContext, data: default_2.PartialModelObject<User>, id: number): Promise<User>;
|
|
2104
|
+
static checkIfIdExists(ctx: RequestContext, userId: number): Promise<boolean>;
|
|
2105
|
+
static checkIfEmailExists(ctx: RequestContext, email: string, returnId?: boolean): Promise<number | boolean>;
|
|
2106
|
+
static checkIfUsernameExists(ctx: RequestContext, username: string, returnId?: boolean): Promise<number | boolean>;
|
|
2107
|
+
static getUserPassword(ctx: RequestContext, userId: number): Promise<string | null>;
|
|
2108
|
+
static setUserNewPassword(ctx: RequestContext, userId: number, newPassword: string): Promise<boolean>;
|
|
2109
|
+
static activateAccount(ctx: RequestContext, userId: number, username: string, password: string): Promise<User>;
|
|
2110
|
+
static logAccess(ctx: RequestContext, userId: number, checkPrevValue?: boolean): Promise<void>;
|
|
2111
|
+
static logFailedLogin(ecosystemPool: default_2.TransactionOrKnex, userId: number): Promise<User[]>;
|
|
2112
|
+
static resetCurrentFailedCount(ecosystemPool: default_2.TransactionOrKnex, userId: number): Promise<number>;
|
|
2113
|
+
getCrfFilter(projectName: string): string[] | null;
|
|
2114
|
+
getClinics(): Clinic[];
|
|
2115
|
+
checkIfAccountIsActivated(activationToken: string): boolean;
|
|
2116
|
+
checkCreateUserPermissions(selectedProfilingId: any, projectId: any, clinicsIds: any): boolean | undefined;
|
|
2117
|
+
isMobileLogged(ecosystemPool: default_2.TransactionOrKnex, userId: number): Promise<boolean>;
|
|
2118
|
+
hasStatusPermissions(projectName: string, clinics: Clinic[], profilingId: number): boolean;
|
|
2119
|
+
hasConnectorAddPermissions(projectName: string): boolean | undefined;
|
|
2120
|
+
checkUserManagementMyOrganizationsPermissions(projectName: string, clinics: Clinic[]): boolean;
|
|
2121
|
+
checkAllowControlProfilesPermissions(projectName: string, profilingId: number): boolean;
|
|
2122
|
+
checkAddPatientPermissions(projectId: number): boolean;
|
|
2123
|
+
checkConfigNotificationsPermissions(projectId: number): boolean;
|
|
2124
|
+
checkDisplayPatientListPermissions(projectId: number): boolean;
|
|
2125
|
+
checkOnlyUpdatePatientsPermissions(projectName: string): boolean;
|
|
2126
|
+
static checkUploadDocumentsPermissions(projectId: number, profilings: Profiling[]): boolean;
|
|
2127
|
+
static checkDeleteDocumentsPermissions(projectId: number, profilings: Profiling[]): boolean;
|
|
2128
|
+
static checkDownloadDocumentsPermissions(projectId: number, profilings: Profiling[]): boolean;
|
|
2129
|
+
checkPermission(ctx: RequestContext, privilege: SEED_PRIVILEGES): boolean;
|
|
2130
|
+
checkUserProject(projectId: number): boolean;
|
|
2131
|
+
isPerseedAdmin(): boolean;
|
|
2132
|
+
isEcosystemAdmin(): boolean;
|
|
2133
|
+
isAdmin(): boolean;
|
|
2134
|
+
getProject(projectName: string): Project | undefined;
|
|
2135
|
+
getProjectId(ctx: RequestContext): Promise<number | undefined>;
|
|
2136
|
+
hasProjectAccessByName(projectName: string): boolean;
|
|
2137
|
+
getProfiling(projectName: string): Profiling | undefined;
|
|
2138
|
+
isNonPro(projectName: string): boolean;
|
|
2139
|
+
isPro(projectName: string): boolean;
|
|
2140
|
+
hasEnabledForm(projectName: string, formName: string): boolean;
|
|
2141
|
+
canViewForm(projectName: string, formName: string): boolean | undefined;
|
|
2142
|
+
canDeletePatient(projectName: string): boolean | undefined;
|
|
2143
|
+
canFullDeletePatient(projectName: string): boolean | undefined;
|
|
2144
|
+
canAddRepeatCrf(projectName: string, formName: string): boolean;
|
|
2145
|
+
canDeleteRepeatCrf(projectName: string, formName: string): boolean;
|
|
2146
|
+
canSeeAllPatients(projectName: string): boolean | undefined;
|
|
2147
|
+
canOnlySeeOwnPatients(projectName: string): boolean | undefined;
|
|
2148
|
+
hasClinicAccess(clinicId: string): boolean;
|
|
2149
|
+
getPatient(projectName: string): UserPatient | null | undefined;
|
|
2150
|
+
getPatientId(projectName: string): number | null | undefined;
|
|
2151
|
+
hasProjectClinicAccess(projectName: string, clinicId?: string | null): boolean | "" | null | undefined;
|
|
2152
|
+
getProjectClinicsAssociated(projectName: string): Clinic[];
|
|
2153
|
+
callConnector(ctx: RequestContext, body: any, token: string, method: string, project: ExternalPatientProject, PATH: string, formName: string, subformFieldName?: string): Promise<any>;
|
|
2154
|
+
getConsent(ecosystemPool: default_2.TransactionOrKnex, projectName: string, returnArray: false): Promise<ConsentGeneral>;
|
|
2155
|
+
getConsent(ecosystemPool: default_2.TransactionOrKnex, projectName: string, returnArray: true): Promise<ConsentGeneral[]>;
|
|
2156
|
+
fillConsent(ecosystemPool: default_2.TransactionOrKnex, projectName: string, userConsent: any, t: TFunction): Promise<void>;
|
|
2157
|
+
isLegalAccessAllowed(ecosystemPool: default_2.TransactionOrKnex, projectName: string): Promise<boolean>;
|
|
2158
|
+
isConsentFilled(ecosystemPool: default_2.TransactionOrKnex, projectName: string): Promise<boolean>;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
declare class UserClinic extends BaseModel {
|
|
2162
|
+
user_id?: number;
|
|
2163
|
+
clinic_id?: number;
|
|
2164
|
+
project_id?: number;
|
|
2165
|
+
static get tableName(): string;
|
|
2166
|
+
static get jsonSchema(): {
|
|
2167
|
+
type: string;
|
|
2168
|
+
properties: {
|
|
2169
|
+
id: {
|
|
2170
|
+
type: string;
|
|
2171
|
+
};
|
|
2172
|
+
user_id: {
|
|
2173
|
+
oneOf: {
|
|
2174
|
+
type: string;
|
|
2175
|
+
}[];
|
|
2176
|
+
default: null;
|
|
2177
|
+
maxLength: number;
|
|
2178
|
+
};
|
|
2179
|
+
clinic_id: {
|
|
2180
|
+
oneOf: {
|
|
2181
|
+
type: string;
|
|
2182
|
+
}[];
|
|
2183
|
+
default: null;
|
|
2184
|
+
maxLength: number;
|
|
2185
|
+
};
|
|
2186
|
+
project_id: {
|
|
2187
|
+
oneOf: {
|
|
2188
|
+
type: string;
|
|
2189
|
+
}[];
|
|
2190
|
+
default: null;
|
|
2191
|
+
maxLength: number;
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
additionalProperties: boolean;
|
|
2195
|
+
};
|
|
2196
|
+
static getModel(ctx: RequestContext): typeof UserClinic;
|
|
2197
|
+
static insert(ctx: RequestContext, data: default_2.PartialModelObject<UserClinic>): Promise<number>;
|
|
2198
|
+
static getUserClinicId(ctx: RequestContext, userId: number, projectId: number): Promise<number[]>;
|
|
2199
|
+
static checkUserClinic(ctx: RequestContext, userId: number, projectId: number, clinicsIds: number[]): Promise<any>;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
declare interface UserData {
|
|
2203
|
+
language?: string;
|
|
2204
|
+
userId: number;
|
|
2205
|
+
userName: string;
|
|
2206
|
+
ecosystem: string;
|
|
2207
|
+
email: string;
|
|
2208
|
+
loginId: string;
|
|
2209
|
+
displayName: string;
|
|
2210
|
+
userType: string;
|
|
2211
|
+
ecosystemLabel: string;
|
|
2212
|
+
tz: string;
|
|
2213
|
+
settings?: SettingResponse[];
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
declare class UserMobileApp extends BaseModel {
|
|
2217
|
+
user_id: number;
|
|
2218
|
+
device_id?: string;
|
|
2219
|
+
device_token?: string;
|
|
2220
|
+
token?: string;
|
|
2221
|
+
created_at: string;
|
|
2222
|
+
updated_at?: string;
|
|
2223
|
+
static get tableName(): string;
|
|
2224
|
+
static get jsonSchema(): {
|
|
2225
|
+
type: string;
|
|
2226
|
+
properties: {
|
|
2227
|
+
id: {
|
|
2228
|
+
type: string;
|
|
2229
|
+
maxLength: number;
|
|
2230
|
+
};
|
|
2231
|
+
user_id: {
|
|
2232
|
+
type: string;
|
|
2233
|
+
maxLength: number;
|
|
2234
|
+
};
|
|
2235
|
+
device_id: {
|
|
2236
|
+
oneOf: {
|
|
2237
|
+
type: string;
|
|
2238
|
+
}[];
|
|
2239
|
+
};
|
|
2240
|
+
device_token: {
|
|
2241
|
+
oneOf: {
|
|
2242
|
+
type: string;
|
|
2243
|
+
}[];
|
|
2244
|
+
};
|
|
2245
|
+
token: {
|
|
2246
|
+
oneOf: {
|
|
2247
|
+
type: string;
|
|
2248
|
+
}[];
|
|
2249
|
+
};
|
|
2250
|
+
created_at: {
|
|
2251
|
+
type: string;
|
|
2252
|
+
format: string;
|
|
2253
|
+
};
|
|
2254
|
+
updated_at: {
|
|
2255
|
+
oneOf: ({
|
|
2256
|
+
type: string;
|
|
2257
|
+
format?: undefined;
|
|
2258
|
+
} | {
|
|
2259
|
+
type: string;
|
|
2260
|
+
format: string;
|
|
2261
|
+
})[];
|
|
2262
|
+
default: null;
|
|
2263
|
+
};
|
|
2264
|
+
};
|
|
2265
|
+
additionalProperties: boolean;
|
|
2266
|
+
};
|
|
2267
|
+
static getModel(ecosystemPool: default_2.TransactionOrKnex): typeof UserMobileApp;
|
|
2268
|
+
static get(ecosystemPool: default_2.TransactionOrKnex, userId: number): Promise<UserMobileApp | undefined>;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
declare class UserPatient extends BaseModel {
|
|
2272
|
+
user_id?: number;
|
|
2273
|
+
patient_id?: number;
|
|
2274
|
+
project_id?: number;
|
|
2275
|
+
patient_number: string;
|
|
2276
|
+
projects?: Project;
|
|
2277
|
+
user?: User | null;
|
|
2278
|
+
user_profile: UserProfile;
|
|
2279
|
+
user_mobile?: UserMobileApp[];
|
|
2280
|
+
static get tableName(): string;
|
|
2281
|
+
static get jsonSchema(): {
|
|
2282
|
+
type: string;
|
|
2283
|
+
properties: {
|
|
2284
|
+
id: {
|
|
2285
|
+
type: string;
|
|
2286
|
+
};
|
|
2287
|
+
user_id: {
|
|
2288
|
+
oneOf: {
|
|
2289
|
+
type: string;
|
|
2290
|
+
}[];
|
|
2291
|
+
};
|
|
2292
|
+
patient_id: {
|
|
2293
|
+
oneOf: {
|
|
2294
|
+
type: string;
|
|
2295
|
+
}[];
|
|
2296
|
+
};
|
|
2297
|
+
project_id: {
|
|
2298
|
+
oneOf: {
|
|
2299
|
+
type: string;
|
|
2300
|
+
}[];
|
|
2301
|
+
};
|
|
2302
|
+
patient_number: {
|
|
2303
|
+
type: string;
|
|
2304
|
+
maxLength: number;
|
|
2305
|
+
};
|
|
2306
|
+
};
|
|
2307
|
+
};
|
|
2308
|
+
static get relationMappings(): {
|
|
2309
|
+
projects: {
|
|
2310
|
+
relation: default_2.RelationType;
|
|
2311
|
+
modelClass: string;
|
|
2312
|
+
join: {
|
|
2313
|
+
from: string;
|
|
2314
|
+
to: string;
|
|
2315
|
+
};
|
|
2316
|
+
};
|
|
2317
|
+
user: {
|
|
2318
|
+
relation: default_2.RelationType;
|
|
2319
|
+
modelClass: string;
|
|
2320
|
+
join: {
|
|
2321
|
+
from: string;
|
|
2322
|
+
to: string;
|
|
2323
|
+
};
|
|
2324
|
+
};
|
|
2325
|
+
user_profile: {
|
|
2326
|
+
relation: default_2.RelationType;
|
|
2327
|
+
modelClass: string;
|
|
2328
|
+
join: {
|
|
2329
|
+
from: string;
|
|
2330
|
+
to: string;
|
|
2331
|
+
};
|
|
2332
|
+
};
|
|
2333
|
+
user_mobile: {
|
|
2334
|
+
relation: default_2.RelationType;
|
|
2335
|
+
modelClass: string;
|
|
2336
|
+
join: {
|
|
2337
|
+
from: string;
|
|
2338
|
+
to: string;
|
|
2339
|
+
};
|
|
2340
|
+
};
|
|
2341
|
+
};
|
|
2342
|
+
static getModel(ctx: RequestContext): typeof UserPatient;
|
|
2343
|
+
static getModelByPool(ecosystemPool: default_2.TransactionOrKnex): typeof UserPatient;
|
|
2344
|
+
static insert(ctx: RequestContext, data: default_2.PartialModelObject<UserPatient>): Promise<number>;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
declare class UserProfile extends BaseModel {
|
|
2348
|
+
user_id?: number;
|
|
2349
|
+
name?: string;
|
|
2350
|
+
surname?: string;
|
|
2351
|
+
address?: string;
|
|
2352
|
+
phone?: string;
|
|
2353
|
+
image?: string;
|
|
2354
|
+
birthday?: string;
|
|
2355
|
+
company?: string;
|
|
2356
|
+
company_localtion?: string;
|
|
2357
|
+
position?: string;
|
|
2358
|
+
description?: string;
|
|
2359
|
+
language?: string;
|
|
2360
|
+
training_password?: string;
|
|
2361
|
+
demo_accepted?: number;
|
|
2362
|
+
user_accepted?: number;
|
|
2363
|
+
accepted_date?: string;
|
|
2364
|
+
tzname?: string;
|
|
2365
|
+
location?: string | null;
|
|
2366
|
+
static get tableName(): string;
|
|
2367
|
+
static get virtualAttributes(): string[];
|
|
2368
|
+
static get jsonSchema(): {
|
|
2369
|
+
type: string;
|
|
2370
|
+
properties: {
|
|
2371
|
+
id: {
|
|
2372
|
+
type: string;
|
|
2373
|
+
maxLength: number;
|
|
2374
|
+
};
|
|
2375
|
+
user_id: {
|
|
2376
|
+
oneOf: {
|
|
2377
|
+
type: string;
|
|
2378
|
+
}[];
|
|
2379
|
+
maxLength: number;
|
|
2380
|
+
};
|
|
2381
|
+
name: {
|
|
2382
|
+
oneOf: {
|
|
2383
|
+
type: string;
|
|
2384
|
+
}[];
|
|
2385
|
+
maxLength: number;
|
|
2386
|
+
};
|
|
2387
|
+
surname: {
|
|
2388
|
+
oneOf: {
|
|
2389
|
+
type: string;
|
|
2390
|
+
}[];
|
|
2391
|
+
maxLength: number;
|
|
2392
|
+
};
|
|
2393
|
+
address: {
|
|
2394
|
+
oneOf: {
|
|
2395
|
+
type: string;
|
|
2396
|
+
}[];
|
|
2397
|
+
default: null;
|
|
2398
|
+
maxLength: number;
|
|
2399
|
+
};
|
|
2400
|
+
phone: {
|
|
2401
|
+
oneOf: {
|
|
2402
|
+
type: string;
|
|
2403
|
+
}[];
|
|
2404
|
+
default: null;
|
|
2405
|
+
maxLength: number;
|
|
2406
|
+
};
|
|
2407
|
+
image: {
|
|
2408
|
+
oneOf: {
|
|
2409
|
+
type: string;
|
|
2410
|
+
}[];
|
|
2411
|
+
default: null;
|
|
2412
|
+
maxLength: number;
|
|
2413
|
+
};
|
|
2414
|
+
birthday: {
|
|
2415
|
+
oneOf: ({
|
|
2416
|
+
type: string;
|
|
2417
|
+
format: string;
|
|
2418
|
+
} | {
|
|
2419
|
+
type: string;
|
|
2420
|
+
format?: undefined;
|
|
2421
|
+
})[];
|
|
2422
|
+
default: null;
|
|
2423
|
+
};
|
|
2424
|
+
company: {
|
|
2425
|
+
oneOf: {
|
|
2426
|
+
type: string;
|
|
2427
|
+
}[];
|
|
2428
|
+
default: null;
|
|
2429
|
+
maxLength: number;
|
|
2430
|
+
};
|
|
2431
|
+
company_localtion: {
|
|
2432
|
+
oneOf: {
|
|
2433
|
+
type: string;
|
|
2434
|
+
}[];
|
|
2435
|
+
default: null;
|
|
2436
|
+
maxLength: number;
|
|
2437
|
+
};
|
|
2438
|
+
position: {
|
|
2439
|
+
oneOf: {
|
|
2440
|
+
type: string;
|
|
2441
|
+
}[];
|
|
2442
|
+
default: null;
|
|
2443
|
+
maxLength: number;
|
|
2444
|
+
};
|
|
2445
|
+
description: {
|
|
2446
|
+
oneOf: {
|
|
2447
|
+
type: string;
|
|
2448
|
+
}[];
|
|
2449
|
+
default: null;
|
|
2450
|
+
maxLength: number;
|
|
2451
|
+
};
|
|
2452
|
+
language: {
|
|
2453
|
+
oneOf: {
|
|
2454
|
+
type: string;
|
|
2455
|
+
}[];
|
|
2456
|
+
default: string;
|
|
2457
|
+
maxLength: number;
|
|
2458
|
+
};
|
|
2459
|
+
training_password: {
|
|
2460
|
+
oneOf: {
|
|
2461
|
+
type: string;
|
|
2462
|
+
}[];
|
|
2463
|
+
default: null;
|
|
2464
|
+
maxLength: number;
|
|
2465
|
+
};
|
|
2466
|
+
demo_accepted: {
|
|
2467
|
+
type: string;
|
|
2468
|
+
default: number;
|
|
2469
|
+
minimum: number;
|
|
2470
|
+
maximum: number;
|
|
2471
|
+
};
|
|
2472
|
+
user_accepted: {
|
|
2473
|
+
type: string;
|
|
2474
|
+
default: number;
|
|
2475
|
+
minimum: number;
|
|
2476
|
+
maximum: number;
|
|
2477
|
+
};
|
|
2478
|
+
accepted_date: {
|
|
2479
|
+
oneOf: ({
|
|
2480
|
+
type: string;
|
|
2481
|
+
format?: undefined;
|
|
2482
|
+
} | {
|
|
2483
|
+
type: string;
|
|
2484
|
+
format: string;
|
|
2485
|
+
})[];
|
|
2486
|
+
default: null;
|
|
2487
|
+
};
|
|
2488
|
+
tzname: {
|
|
2489
|
+
oneOf: {
|
|
2490
|
+
type: string;
|
|
2491
|
+
}[];
|
|
2492
|
+
maxLength: number;
|
|
2493
|
+
};
|
|
2494
|
+
};
|
|
2495
|
+
additionalProperties: boolean;
|
|
2496
|
+
};
|
|
2497
|
+
get acceptLanguage(): string | null;
|
|
2498
|
+
static getModel(ctx: RequestContext): typeof UserProfile;
|
|
2499
|
+
static getModelByPool(ecosystemPool: default_2.TransactionOrKnex): typeof UserProfile;
|
|
2500
|
+
static insert(ctx: RequestContext, data: default_2.PartialModelObject<UserProfile>): Promise<number>;
|
|
2501
|
+
static checkIfUserIdExists(ctx: RequestContext, userId: number): Promise<boolean>;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
declare type UserSettingValue = string | number | boolean | Record<string, string | number> | string[] | number[];
|
|
2505
|
+
|
|
2506
|
+
export declare interface ValueCardProps {
|
|
2507
|
+
title: I18nTextTranslation;
|
|
2508
|
+
icon: string;
|
|
2509
|
+
text: I18nTextTranslation;
|
|
2510
|
+
subtext?: I18nTextTranslation;
|
|
2511
|
+
titleTextColor?: string;
|
|
2512
|
+
bodyTextColor?: string;
|
|
2513
|
+
data?: Record<string, any>;
|
|
2514
|
+
dataLoader?: WidgetDataLoader<WidgetOutcomesDataLoader>;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
export declare type Widget = BaseWidget & ({
|
|
2518
|
+
type: DashboardWidgetType.SECTIONCARD;
|
|
2519
|
+
params: SectionCardProps;
|
|
2520
|
+
} | {
|
|
2521
|
+
type: DashboardWidgetType.VALUECARD;
|
|
2522
|
+
params: ValueCardProps;
|
|
2523
|
+
} | {
|
|
2524
|
+
type: DashboardWidgetType.PATIENTLIST;
|
|
2525
|
+
params: PatientListProps;
|
|
2526
|
+
});
|
|
2527
|
+
|
|
2528
|
+
export declare type WidgetDataLoader<T> = T extends {
|
|
2529
|
+
type: infer Type;
|
|
2530
|
+
params: infer Params;
|
|
2531
|
+
} ? {
|
|
2532
|
+
type: Type;
|
|
2533
|
+
params: Params;
|
|
2534
|
+
} : never;
|
|
2535
|
+
|
|
2536
|
+
export declare interface WidgetOutcomesDataLoader {
|
|
2537
|
+
type: DataLoaderType.OUTCOMES;
|
|
2538
|
+
params: OutcomesParams;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
export { }
|