@persei/perseed-api 4.34.36 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -237
- package/dist/client.cjs +178 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.mjs +178 -0
- package/dist/client.mjs.map +1 -0
- package/dist/global-pagination.cjs +24 -0
- package/dist/global-pagination.cjs.map +1 -0
- package/dist/global-pagination.mjs +24 -0
- package/dist/global-pagination.mjs.map +1 -0
- package/dist/{schemas → src/schemas}/bulk_upload/update_bulk_upload_payload.schema.json +3 -0
- package/dist/{schemas → src/schemas}/dashboard_widget/create_widget_payload.schema.json +85 -23
- package/dist/{schemas → src/schemas}/dashboard_widget/update_widget_payload.schema.json +85 -23
- package/dist/v1/perseed-api.cjs +1459 -0
- package/dist/v1/perseed-api.cjs.map +1 -0
- package/dist/{perseed-api.mjs → v1/perseed-api.mjs} +347 -156
- package/dist/v1/perseed-api.mjs.map +1 -0
- package/package.json +36 -168
- package/dist/index.d.ts +0 -3073
- package/dist/perseed-api.umd.js +0 -1
- /package/dist/{schemas → src/schemas}/forms/create.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/forms/update.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/hospital/create.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/mfa/mfa-login-data.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/mobile/searchnotificationstatus.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/notification_configuration/create_trigger_payload.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/notification_configuration/update_trigger_payload.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/patient/createFullPatient.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/patient/createPatient.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/process_log/create_process_log_payload.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/process_log/update_process_log_payload.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/project/createCategory.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/project/export.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/project/uploadDocument.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/query/patch.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/questionnaire/createQuestionnaire.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/subform/create.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/subform/update.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/user_settings/APP_FONT_FACTOR.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/user_settings/AUTH_SECURITY_CONFIG.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/user_settings/GenericBooleanSetting.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/users/activate.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/users/contact.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/users/create.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/users/password.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/users/selfregister.schema.json +0 -0
- /package/dist/{schemas → src/schemas}/users/unlinkProject.schema.json +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const DATE_FORMAT = "YYYY-MM-DD";
|
|
2
|
+
const TIME_FORMAT = "HH:mm:ss";
|
|
3
|
+
const SHORT_TIME_FORMAT = "HH:mm";
|
|
4
|
+
const DATETIME_SHORT_FORMAT = "YYYY-MM-DD HH:mm";
|
|
5
|
+
const MYSQL_DATE_FORMAT = DATE_FORMAT;
|
|
6
|
+
const MYSQL_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
7
|
+
const Exporter = {
|
|
2
8
|
PENDING: "IN_PROGRESS",
|
|
3
9
|
ERROR: "ERROR",
|
|
4
10
|
SUCCESS: "COMPLETED",
|
|
@@ -7,7 +13,8 @@ const N = "YYYY-MM-DD", G = "HH:mm:ss", y = "HH:mm", B = "YYYY-MM-DD HH:mm", H =
|
|
|
7
13
|
csv: 2,
|
|
8
14
|
spss: 1
|
|
9
15
|
}
|
|
10
|
-
}
|
|
16
|
+
};
|
|
17
|
+
const FIELDS = {
|
|
11
18
|
DECIMAL: 1,
|
|
12
19
|
INTEGER: 2,
|
|
13
20
|
MULTIPLE_SELECTION: 3,
|
|
@@ -32,7 +39,8 @@ const N = "YYYY-MM-DD", G = "HH:mm:ss", y = "HH:mm", B = "YYYY-MM-DD HH:mm", H =
|
|
|
32
39
|
SCAN_CODE: 22,
|
|
33
40
|
PARAGRAPH: 23,
|
|
34
41
|
FILE: 24
|
|
35
|
-
}
|
|
42
|
+
};
|
|
43
|
+
const FIELD_NAMES = {
|
|
36
44
|
DECIMAL_NAME: "decimal",
|
|
37
45
|
INTEGER_NAME: "integer",
|
|
38
46
|
MULTIPLE_SELECTION_NAME: "multiple_selection",
|
|
@@ -58,16 +66,29 @@ const N = "YYYY-MM-DD", G = "HH:mm:ss", y = "HH:mm", B = "YYYY-MM-DD HH:mm", H =
|
|
|
58
66
|
PARAGRAPH_NAME: "paragraph",
|
|
59
67
|
FILE_NAME: "file"
|
|
60
68
|
};
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
var FORM_TYPES = /* @__PURE__ */ ((FORM_TYPES2) => {
|
|
70
|
+
FORM_TYPES2[FORM_TYPES2["STATIC"] = 0] = "STATIC";
|
|
71
|
+
FORM_TYPES2[FORM_TYPES2["STANDARD"] = 1] = "STANDARD";
|
|
72
|
+
FORM_TYPES2[FORM_TYPES2["FOLLOW_UP"] = 2] = "FOLLOW_UP";
|
|
73
|
+
FORM_TYPES2[FORM_TYPES2["ADVERSE_EVENT"] = 3] = "ADVERSE_EVENT";
|
|
74
|
+
FORM_TYPES2[FORM_TYPES2["QUESTIONNAIRE"] = 5] = "QUESTIONNAIRE";
|
|
75
|
+
FORM_TYPES2[FORM_TYPES2["STUDY"] = 6] = "STUDY";
|
|
76
|
+
return FORM_TYPES2;
|
|
77
|
+
})(FORM_TYPES || {});
|
|
78
|
+
const FIELD_NAMES_MAP = () => {
|
|
79
|
+
let fieldTypeNames = {};
|
|
80
|
+
Object.keys(FIELDS).forEach((key) => {
|
|
81
|
+
fieldTypeNames = {
|
|
82
|
+
...fieldTypeNames,
|
|
83
|
+
[FIELDS[key]]: FIELD_NAMES[`${key}_NAME`]
|
|
68
84
|
};
|
|
69
|
-
})
|
|
70
|
-
|
|
85
|
+
});
|
|
86
|
+
return fieldTypeNames;
|
|
87
|
+
};
|
|
88
|
+
const NUMBER_TYPE = ["number", FIELD_NAMES.DECIMAL_NAME, FIELD_NAMES.INTEGER_NAME];
|
|
89
|
+
const DATE_TYPE = ["date"];
|
|
90
|
+
const OBJECT_TYPE = ["object", FIELD_NAMES.SCAN_CODE_NAME];
|
|
91
|
+
const CORE = {
|
|
71
92
|
CREATION_TIME: "creation_time",
|
|
72
93
|
CREATION_USER: "creation_user",
|
|
73
94
|
CRF_NAME: "crf_name",
|
|
@@ -94,23 +115,36 @@ const z = () => {
|
|
|
94
115
|
VERSION: "version",
|
|
95
116
|
REFERENCE: "reference",
|
|
96
117
|
SUBFORM_ID: "subform_id"
|
|
97
|
-
}
|
|
118
|
+
};
|
|
119
|
+
const EXCLUDE_FIELDS = Object.values(CORE);
|
|
120
|
+
const AUDIT_FLAGS = {
|
|
98
121
|
added: "A",
|
|
99
122
|
edited: "E",
|
|
100
123
|
deleted: "D"
|
|
101
|
-
}
|
|
124
|
+
};
|
|
125
|
+
const FORM_NAMES = {
|
|
102
126
|
PATIENT: "patient",
|
|
103
127
|
SEPARATOR: "_"
|
|
104
|
-
}
|
|
128
|
+
};
|
|
129
|
+
const FORM_SUFFIX = {
|
|
105
130
|
AUDIT: "audit"
|
|
106
|
-
}
|
|
131
|
+
};
|
|
132
|
+
const MULTIPLE_SELECTION_SEPARATOR = "~";
|
|
133
|
+
const FIELD_SUFFIX = "_status";
|
|
134
|
+
const STATUS_SUFFIX = "_status";
|
|
135
|
+
const FIELD_STATUS = {
|
|
107
136
|
filled: "filled",
|
|
108
137
|
unk: "UNK",
|
|
109
138
|
na: "NA",
|
|
110
139
|
nd: "ND"
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
140
|
+
};
|
|
141
|
+
const STATUS_FIELD_REGEXP = /^[0-9a-f]{33}_status$/;
|
|
142
|
+
const isNotStatusField = function(fieldName) {
|
|
143
|
+
return !STATUS_FIELD_REGEXP.test(fieldName);
|
|
144
|
+
};
|
|
145
|
+
const NO_FILL_STATUS = ["UNK", "NA", "ND"];
|
|
146
|
+
const TIME_SCHEMA = "^[0-1][0-9]:[0-5][0-9]$|^[0-2][0-3]:[0-5][0-9]$";
|
|
147
|
+
const META_NAMES = {
|
|
114
148
|
DEPENDENT_SOURCE: "dependent_source",
|
|
115
149
|
ENCRYPTED: "encrypted",
|
|
116
150
|
ENCRYPTED_LEVEL: "encrypted_level",
|
|
@@ -184,35 +218,43 @@ const z = () => {
|
|
|
184
218
|
PROC_ANONYMIZE: "proc_anonymize",
|
|
185
219
|
PROC_EXTRACTION: "proc_extraction"
|
|
186
220
|
};
|
|
187
|
-
|
|
188
|
-
const
|
|
221
|
+
const AI_PROCESSING_META_NAMES = [META_NAMES.PROC_ANONYMIZE, META_NAMES.PROC_EXTRACTION];
|
|
222
|
+
const META_RESTRICTION = {
|
|
189
223
|
STRICT: "strict",
|
|
190
224
|
FLEXIBLE: "flexible"
|
|
191
|
-
}
|
|
225
|
+
};
|
|
226
|
+
const META_STATUS = {
|
|
192
227
|
ACTIVE: "1"
|
|
193
|
-
}
|
|
228
|
+
};
|
|
229
|
+
const SELECTOR_TYPE = {
|
|
194
230
|
SLIDER: "slider",
|
|
195
231
|
DROPDOWN: "dropdown",
|
|
196
232
|
RADIO_BUTTON: "radio_button",
|
|
197
233
|
CHECK_BOX: "check_box"
|
|
198
|
-
}
|
|
234
|
+
};
|
|
235
|
+
const SLIDER_TYPE = {
|
|
199
236
|
STARS: "0",
|
|
200
237
|
SCALE_RATING: "1",
|
|
201
238
|
IMAGES: "2"
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
|
|
239
|
+
};
|
|
240
|
+
const SLIDER_SELECTOR_TYPE = {
|
|
241
|
+
[SLIDER_TYPE.STARS]: "stars",
|
|
242
|
+
[SLIDER_TYPE.SCALE_RATING]: "scale",
|
|
243
|
+
[SLIDER_TYPE.IMAGES]: "images"
|
|
244
|
+
};
|
|
245
|
+
const SLIDER_SCALE_TYPE = {
|
|
207
246
|
HORIZONTAL: "0",
|
|
208
247
|
VERTICAL: "1"
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
[
|
|
212
|
-
|
|
248
|
+
};
|
|
249
|
+
const SLIDER_SCALE_ORIENTATION_TYPE = {
|
|
250
|
+
[SLIDER_SCALE_TYPE.HORIZONTAL]: "horizontal",
|
|
251
|
+
[SLIDER_SCALE_TYPE.VERTICAL]: "vertical"
|
|
252
|
+
};
|
|
253
|
+
const HREF_TYPE = {
|
|
213
254
|
NEW_WINDOW: "newwindow",
|
|
214
255
|
EMBEDDED_HTML: "embeddedhtml"
|
|
215
|
-
}
|
|
256
|
+
};
|
|
257
|
+
const DYNAMIC_FILE_VALID_FORMATS = {
|
|
216
258
|
1: ["image/jpg", "image/jpeg", "image/bmp", "image/gif", "image/png"],
|
|
217
259
|
// Images
|
|
218
260
|
2: [
|
|
@@ -260,7 +302,8 @@ const ia = [E.PROC_ANONYMIZE, E.PROC_EXTRACTION], na = {
|
|
|
260
302
|
"video/x-flv"
|
|
261
303
|
]
|
|
262
304
|
// Video
|
|
263
|
-
}
|
|
305
|
+
};
|
|
306
|
+
const DEFAULT_CONFIGURATION_PATIENT_LIST = [
|
|
264
307
|
{
|
|
265
308
|
id: "1",
|
|
266
309
|
name: "patient_number",
|
|
@@ -288,18 +331,24 @@ const ia = [E.PROC_ANONYMIZE, E.PROC_EXTRACTION], na = {
|
|
|
288
331
|
crf_name: "",
|
|
289
332
|
status: "1"
|
|
290
333
|
}
|
|
291
|
-
]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
334
|
+
];
|
|
335
|
+
const SELECT_FIELD_TYPES = [
|
|
336
|
+
FIELD_NAMES.SELECTION_NAME,
|
|
337
|
+
FIELD_NAMES.DYNAMIC_SELECTION_NAME,
|
|
338
|
+
...Object.values(SELECTOR_TYPE)
|
|
339
|
+
];
|
|
340
|
+
const MULTIPLE_SELECT_FIELD_TYPES = [FIELD_NAMES.MULTIPLE_SELECTION_NAME];
|
|
341
|
+
const NUMERIC_FIELD_TYPES = [FIELD_NAMES.DECIMAL_NAME, FIELD_NAMES.INTEGER_NAME];
|
|
342
|
+
const ALL_SELECT_FIELD_TYPES = [...SELECT_FIELD_TYPES, ...MULTIPLE_SELECT_FIELD_TYPES];
|
|
343
|
+
const NOTIFIED_TYPES = {
|
|
296
344
|
EMAIL: 1,
|
|
297
345
|
MOBILE: 2,
|
|
298
346
|
PLATFORM: 3,
|
|
299
347
|
SMS: 4,
|
|
300
348
|
HL7: 5,
|
|
301
349
|
ALL: ["1", "2", "3", "4", "5"]
|
|
302
|
-
}
|
|
350
|
+
};
|
|
351
|
+
const allCountries = [
|
|
303
352
|
["Afghanistan (افغانستان)", "af", "93"],
|
|
304
353
|
["Albania (Shqipëri)", "al", "355"],
|
|
305
354
|
["Algeria (الجزائر)", "dz", "213"],
|
|
@@ -593,34 +642,48 @@ const ia = [E.PROC_ANONYMIZE, E.PROC_EXTRACTION], na = {
|
|
|
593
642
|
["Zambia", "zm", "260"],
|
|
594
643
|
["Zimbabwe", "zw", "263"],
|
|
595
644
|
["Åland Islands", "ax", "358", 1, ["18"]]
|
|
596
|
-
]
|
|
597
|
-
|
|
598
|
-
|
|
645
|
+
];
|
|
646
|
+
const CountryPhoneCodes = allCountries.reduce((acc, c) => {
|
|
647
|
+
const key = c[1];
|
|
648
|
+
acc[key] = c[2];
|
|
649
|
+
return acc;
|
|
599
650
|
}, {});
|
|
600
|
-
var
|
|
601
|
-
|
|
651
|
+
var STATUS = /* @__PURE__ */ ((STATUS2) => {
|
|
652
|
+
STATUS2["CLOSED"] = "Closed";
|
|
653
|
+
STATUS2["OPEN"] = "Open";
|
|
654
|
+
STATUS2["COMING_SOON"] = "Coming soon";
|
|
655
|
+
return STATUS2;
|
|
656
|
+
})(STATUS || {});
|
|
657
|
+
const HISTORY = {
|
|
602
658
|
PERMANENT: "Permanent",
|
|
603
659
|
TEMPORARY: "Temporary"
|
|
604
|
-
}
|
|
660
|
+
};
|
|
661
|
+
const TYPE = {
|
|
605
662
|
QOL: "QoL",
|
|
606
663
|
TASK: "Task"
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
664
|
+
};
|
|
665
|
+
const QUESTIONNAIRE_TYPE_OPTIONS = {
|
|
666
|
+
"0": TYPE.QOL,
|
|
667
|
+
"1": TYPE.TASK
|
|
668
|
+
};
|
|
669
|
+
const HISTORY_TYPE_OPTIONS = {
|
|
670
|
+
"0": HISTORY.PERMANENT,
|
|
671
|
+
"1": HISTORY.TEMPORARY
|
|
672
|
+
};
|
|
673
|
+
const QUESTIONNAIRE_DATE = {
|
|
614
674
|
DATE: "date_of_questionnaire",
|
|
615
675
|
TIME: "time_of_questionnaire"
|
|
616
|
-
}
|
|
676
|
+
};
|
|
677
|
+
const QUESTIONNAIRE_TYPE = {
|
|
617
678
|
TYPE: "type_of_questionnaire"
|
|
618
|
-
}
|
|
679
|
+
};
|
|
680
|
+
const ROLES = {
|
|
619
681
|
PERSEED_ADMIN: "PerseedAdmin",
|
|
620
682
|
ECOSYSTEM_ADMIN: "EcosystemAdmin",
|
|
621
683
|
USER: "Users",
|
|
622
684
|
SALE: "Sales"
|
|
623
|
-
}
|
|
685
|
+
};
|
|
686
|
+
const SEED_PRIVILEGE = {
|
|
624
687
|
ADD_PATIENT: "add_patient",
|
|
625
688
|
ADD_REPEATABLE_CRF: "add_repeat_crf",
|
|
626
689
|
ADVANCED_FILTER: "advanced_filter",
|
|
@@ -663,7 +726,8 @@ const l = {
|
|
|
663
726
|
DASHBOARD_FOLLOWUP_OWN: "dashboard_followup_access_own",
|
|
664
727
|
DASHBOARD_FOLLOWUP_ASSIGNED: "dashboard_followup_access_assigned",
|
|
665
728
|
CORE_MANAGE_ORGANIZATION: "core_manage_organization"
|
|
666
|
-
}
|
|
729
|
+
};
|
|
730
|
+
const MINIMIAL_TIMEZONE_LIST = [
|
|
667
731
|
"Etc/GMT+12",
|
|
668
732
|
"Pacific/Midway",
|
|
669
733
|
"Pacific/Honolulu",
|
|
@@ -740,7 +804,8 @@ const l = {
|
|
|
740
804
|
"Pacific/Fiji",
|
|
741
805
|
"Pacific/Auckland",
|
|
742
806
|
"Pacific/Tongatapu"
|
|
743
|
-
]
|
|
807
|
+
];
|
|
808
|
+
const LANG_CODES = [
|
|
744
809
|
"ab",
|
|
745
810
|
"aa",
|
|
746
811
|
"af",
|
|
@@ -930,7 +995,8 @@ const l = {
|
|
|
930
995
|
"yo",
|
|
931
996
|
"za",
|
|
932
997
|
"zu"
|
|
933
|
-
]
|
|
998
|
+
];
|
|
999
|
+
const LOCALE_LANG_CODES = [
|
|
934
1000
|
"af_ZA",
|
|
935
1001
|
"am_ET",
|
|
936
1002
|
"ar_AE",
|
|
@@ -1142,20 +1208,109 @@ const l = {
|
|
|
1142
1208
|
"zh_TW",
|
|
1143
1209
|
"zu_ZA",
|
|
1144
1210
|
"fi_FI"
|
|
1145
|
-
]
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1211
|
+
];
|
|
1212
|
+
const FORMS_VIEW = "forms";
|
|
1213
|
+
const HISTORY_VIEW = "history";
|
|
1214
|
+
var DashboardWidgetType = /* @__PURE__ */ ((DashboardWidgetType2) => {
|
|
1215
|
+
DashboardWidgetType2["VALUECARD"] = "ValueCard";
|
|
1216
|
+
DashboardWidgetType2["SECTIONCARD"] = "SectionCard";
|
|
1217
|
+
DashboardWidgetType2["PATIENTLIST"] = "PatientList";
|
|
1218
|
+
DashboardWidgetType2["DASHBOARD"] = "Dashboard";
|
|
1219
|
+
DashboardWidgetType2["QUESTIONNAIRE_LOG"] = "QuestionnaireLog";
|
|
1220
|
+
DashboardWidgetType2["PATIENTS_PROGRAMS"] = "PatientsPrograms";
|
|
1221
|
+
DashboardWidgetType2["PATIENTS"] = "Patients";
|
|
1222
|
+
DashboardWidgetType2["ADHERENCE_SUMMARY"] = "AdherenceSummary";
|
|
1223
|
+
DashboardWidgetType2["FORM_LIST"] = "FormList";
|
|
1224
|
+
return DashboardWidgetType2;
|
|
1225
|
+
})(DashboardWidgetType || {});
|
|
1226
|
+
var DataLoaderType = /* @__PURE__ */ ((DataLoaderType2) => {
|
|
1227
|
+
DataLoaderType2["OUTCOMES"] = "outcomes";
|
|
1228
|
+
return DataLoaderType2;
|
|
1229
|
+
})(DataLoaderType || {});
|
|
1230
|
+
var ColumnType = /* @__PURE__ */ ((ColumnType2) => {
|
|
1231
|
+
ColumnType2["TEXT"] = "text";
|
|
1232
|
+
ColumnType2["NUMBER"] = "number";
|
|
1233
|
+
ColumnType2["BOOLEAN"] = "boolean";
|
|
1234
|
+
ColumnType2["DATE"] = "date";
|
|
1235
|
+
ColumnType2["TIME"] = "time";
|
|
1236
|
+
ColumnType2["DATETIME"] = "datetime";
|
|
1237
|
+
return ColumnType2;
|
|
1238
|
+
})(ColumnType || {});
|
|
1239
|
+
var OrderType = /* @__PURE__ */ ((OrderType2) => {
|
|
1240
|
+
OrderType2["ASC"] = "asc";
|
|
1241
|
+
OrderType2["DESC"] = "desc";
|
|
1242
|
+
return OrderType2;
|
|
1243
|
+
})(OrderType || {});
|
|
1244
|
+
var PresentationWidget = /* @__PURE__ */ ((PresentationWidget2) => {
|
|
1245
|
+
PresentationWidget2["TEXT"] = "text";
|
|
1246
|
+
PresentationWidget2["ICON"] = "icon";
|
|
1247
|
+
PresentationWidget2["ICON_TEXT"] = "icon_text";
|
|
1248
|
+
PresentationWidget2["LIST"] = "list";
|
|
1249
|
+
return PresentationWidget2;
|
|
1250
|
+
})(PresentationWidget || {});
|
|
1251
|
+
var IconPosition = /* @__PURE__ */ ((IconPosition2) => {
|
|
1252
|
+
IconPosition2["UP"] = "up";
|
|
1253
|
+
IconPosition2["DOWN"] = "down";
|
|
1254
|
+
IconPosition2["LEFT"] = "left";
|
|
1255
|
+
IconPosition2["RIGHT"] = "right";
|
|
1256
|
+
return IconPosition2;
|
|
1257
|
+
})(IconPosition || {});
|
|
1258
|
+
var ApiAction = /* @__PURE__ */ ((ApiAction2) => {
|
|
1259
|
+
ApiAction2["QUESTIONNAIRE_CREATE"] = "questionnaire.create";
|
|
1260
|
+
ApiAction2["CRF_CREATE"] = "crf.create";
|
|
1261
|
+
ApiAction2["CRF_UPDATE"] = "crf.update";
|
|
1262
|
+
ApiAction2["CRF_DELETE"] = "crf.delete";
|
|
1263
|
+
ApiAction2["EXTERNAL_API_CALL"] = "external_api_call";
|
|
1264
|
+
ApiAction2["LOG_CREATE"] = "log.create";
|
|
1265
|
+
ApiAction2["BULK_UPLOAD_UPDATE"] = "bulk_upload.update";
|
|
1266
|
+
ApiAction2["INVOKE_LAMBDA"] = "invoke_lambda";
|
|
1267
|
+
return ApiAction2;
|
|
1268
|
+
})(ApiAction || {});
|
|
1269
|
+
var ConditionsFormat = /* @__PURE__ */ ((ConditionsFormat2) => {
|
|
1270
|
+
ConditionsFormat2["JSON_LOGIC"] = "jsonLogic";
|
|
1271
|
+
ConditionsFormat2["CUSTOM"] = "custom";
|
|
1272
|
+
return ConditionsFormat2;
|
|
1273
|
+
})(ConditionsFormat || {});
|
|
1274
|
+
var TriggerAction = /* @__PURE__ */ ((TriggerAction2) => {
|
|
1275
|
+
TriggerAction2["CREATION"] = "creation";
|
|
1276
|
+
TriggerAction2["UPDATE"] = "update";
|
|
1277
|
+
return TriggerAction2;
|
|
1278
|
+
})(TriggerAction || {});
|
|
1279
|
+
var IntrospectionSchemaFieldType = /* @__PURE__ */ ((IntrospectionSchemaFieldType2) => {
|
|
1280
|
+
IntrospectionSchemaFieldType2["TEXT"] = "text";
|
|
1281
|
+
IntrospectionSchemaFieldType2["DATE"] = "date";
|
|
1282
|
+
IntrospectionSchemaFieldType2["TIME"] = "time";
|
|
1283
|
+
IntrospectionSchemaFieldType2["BOOLEAN"] = "boolean";
|
|
1284
|
+
IntrospectionSchemaFieldType2["NUMBER"] = "number";
|
|
1285
|
+
IntrospectionSchemaFieldType2["SELECT"] = "select";
|
|
1286
|
+
IntrospectionSchemaFieldType2["MULTISELECT"] = "multiselect";
|
|
1287
|
+
IntrospectionSchemaFieldType2["HIDDEN"] = "hidden";
|
|
1288
|
+
return IntrospectionSchemaFieldType2;
|
|
1289
|
+
})(IntrospectionSchemaFieldType || {});
|
|
1290
|
+
class NotifiedAboutInfo {
|
|
1291
|
+
notified_about;
|
|
1292
|
+
constructor(notifiedAbout) {
|
|
1293
|
+
this.notified_about = notifiedAbout;
|
|
1150
1294
|
}
|
|
1151
1295
|
crfName() {
|
|
1152
|
-
|
|
1296
|
+
if (this.notified_about.startsWith("crf_")) {
|
|
1297
|
+
return this.notified_about.split("_")[1];
|
|
1298
|
+
} else if (this.notified_about.startsWith("Patient")) {
|
|
1299
|
+
return "patient";
|
|
1300
|
+
} else {
|
|
1301
|
+
return null;
|
|
1302
|
+
}
|
|
1153
1303
|
}
|
|
1154
1304
|
actionTrigger() {
|
|
1155
|
-
|
|
1305
|
+
if (this.notified_about.toLowerCase().endsWith(TriggerAction.UPDATE)) {
|
|
1306
|
+
return TriggerAction.UPDATE;
|
|
1307
|
+
} else if (this.notified_about.toLowerCase().endsWith(TriggerAction.CREATION)) {
|
|
1308
|
+
return TriggerAction.CREATION;
|
|
1309
|
+
}
|
|
1310
|
+
return null;
|
|
1156
1311
|
}
|
|
1157
1312
|
isCrfTrigger() {
|
|
1158
|
-
return this.notified_about ===
|
|
1313
|
+
return this.notified_about === PATIENT_CREATION_ABOUT || this.notified_about.startsWith("crf_");
|
|
1159
1314
|
}
|
|
1160
1315
|
isModelTrigger() {
|
|
1161
1316
|
return this.notified_about.startsWith("model_");
|
|
@@ -1168,101 +1323,137 @@ class pa {
|
|
|
1168
1323
|
}
|
|
1169
1324
|
getModelName() {
|
|
1170
1325
|
if (this.isModelTrigger() && !this.isDisplayerTrigger()) {
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1326
|
+
const prefix = "model_";
|
|
1327
|
+
const actionSuffixes = Object.values(TriggerAction);
|
|
1328
|
+
let modelName = this.notified_about.slice(prefix.length);
|
|
1329
|
+
for (const suffix of actionSuffixes) {
|
|
1330
|
+
if (modelName.endsWith(`_${suffix}`)) {
|
|
1331
|
+
modelName = modelName.slice(0, -`_${suffix}`.length);
|
|
1176
1332
|
break;
|
|
1177
1333
|
}
|
|
1178
|
-
|
|
1334
|
+
}
|
|
1335
|
+
return modelName;
|
|
1179
1336
|
} else if (this.isDisplayerTrigger()) {
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1337
|
+
const parts = this.notified_about.split("_");
|
|
1338
|
+
const lastPart = parts[parts.length - 1];
|
|
1339
|
+
if (Object.values(TriggerAction).includes(lastPart)) {
|
|
1340
|
+
parts.pop();
|
|
1341
|
+
}
|
|
1342
|
+
return parts.slice(2).join("_");
|
|
1182
1343
|
}
|
|
1344
|
+
return void 0;
|
|
1183
1345
|
}
|
|
1184
1346
|
getModelTriggerAction() {
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1347
|
+
const modelName = this.getModelName();
|
|
1348
|
+
if (modelName && this.isDisplayerTrigger()) {
|
|
1349
|
+
return this.notified_about.replace(`model_displayer_${modelName}_`, "").replace(`model_displayer_${modelName}`, "");
|
|
1350
|
+
} else if (modelName && this.isModelTrigger()) {
|
|
1351
|
+
return this.notified_about.replace(`model_${modelName}_`, "").replace(`model_${modelName}`, "");
|
|
1352
|
+
}
|
|
1353
|
+
return null;
|
|
1187
1354
|
}
|
|
1188
1355
|
}
|
|
1189
|
-
const
|
|
1190
|
-
var
|
|
1356
|
+
const PATIENT_CREATION_ABOUT = "Patient Creation";
|
|
1357
|
+
var QuestionnaireInfoUpdateMode = /* @__PURE__ */ ((QuestionnaireInfoUpdateMode2) => {
|
|
1358
|
+
QuestionnaireInfoUpdateMode2[QuestionnaireInfoUpdateMode2["START_OVER"] = 0] = "START_OVER";
|
|
1359
|
+
QuestionnaireInfoUpdateMode2[QuestionnaireInfoUpdateMode2["RESUME"] = 1] = "RESUME";
|
|
1360
|
+
return QuestionnaireInfoUpdateMode2;
|
|
1361
|
+
})(QuestionnaireInfoUpdateMode || {});
|
|
1362
|
+
var ProcessLogType = /* @__PURE__ */ ((ProcessLogType2) => {
|
|
1363
|
+
ProcessLogType2[ProcessLogType2["LOG"] = 0] = "LOG";
|
|
1364
|
+
ProcessLogType2[ProcessLogType2["RESULT"] = 1] = "RESULT";
|
|
1365
|
+
ProcessLogType2[ProcessLogType2["WARNING"] = -1] = "WARNING";
|
|
1366
|
+
ProcessLogType2[ProcessLogType2["ERROR"] = -2] = "ERROR";
|
|
1367
|
+
return ProcessLogType2;
|
|
1368
|
+
})(ProcessLogType || {});
|
|
1369
|
+
var ProcessLogCode = /* @__PURE__ */ ((ProcessLogCode2) => {
|
|
1370
|
+
ProcessLogCode2["BULK_UPLOAD_BATCH"] = "bulk_upload_batch";
|
|
1371
|
+
ProcessLogCode2["BULK_UPLOAD_SUCCESS"] = "bulk_upload_success";
|
|
1372
|
+
ProcessLogCode2["BULK_UPLOAD_ERROR"] = "bulk_upload_error";
|
|
1373
|
+
return ProcessLogCode2;
|
|
1374
|
+
})(ProcessLogCode || {});
|
|
1375
|
+
var BulkUploadStatus = /* @__PURE__ */ ((BulkUploadStatus2) => {
|
|
1376
|
+
BulkUploadStatus2[BulkUploadStatus2["error"] = -1] = "error";
|
|
1377
|
+
BulkUploadStatus2[BulkUploadStatus2["uploaded"] = 0] = "uploaded";
|
|
1378
|
+
BulkUploadStatus2[BulkUploadStatus2["success"] = 1] = "success";
|
|
1379
|
+
return BulkUploadStatus2;
|
|
1380
|
+
})(BulkUploadStatus || {});
|
|
1191
1381
|
export {
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1382
|
+
AI_PROCESSING_META_NAMES,
|
|
1383
|
+
ALL_SELECT_FIELD_TYPES,
|
|
1384
|
+
AUDIT_FLAGS,
|
|
1385
|
+
ApiAction,
|
|
1386
|
+
BulkUploadStatus,
|
|
1387
|
+
CORE,
|
|
1388
|
+
ColumnType,
|
|
1389
|
+
ConditionsFormat,
|
|
1390
|
+
CountryPhoneCodes,
|
|
1391
|
+
DATETIME_SHORT_FORMAT,
|
|
1392
|
+
DATE_FORMAT,
|
|
1393
|
+
DATE_TYPE,
|
|
1394
|
+
DEFAULT_CONFIGURATION_PATIENT_LIST,
|
|
1395
|
+
DYNAMIC_FILE_VALID_FORMATS,
|
|
1396
|
+
DashboardWidgetType,
|
|
1397
|
+
DataLoaderType,
|
|
1398
|
+
EXCLUDE_FIELDS,
|
|
1399
|
+
Exporter,
|
|
1400
|
+
FIELDS,
|
|
1401
|
+
FIELD_NAMES,
|
|
1402
|
+
FIELD_NAMES_MAP,
|
|
1403
|
+
FIELD_STATUS,
|
|
1404
|
+
FIELD_SUFFIX,
|
|
1405
|
+
FORMS_VIEW,
|
|
1406
|
+
FORM_NAMES,
|
|
1407
|
+
FORM_SUFFIX,
|
|
1408
|
+
FORM_TYPES,
|
|
1409
|
+
HISTORY,
|
|
1410
|
+
HISTORY_TYPE_OPTIONS,
|
|
1411
|
+
HISTORY_VIEW,
|
|
1412
|
+
HREF_TYPE,
|
|
1413
|
+
IconPosition,
|
|
1414
|
+
IntrospectionSchemaFieldType,
|
|
1415
|
+
LANG_CODES,
|
|
1416
|
+
LOCALE_LANG_CODES,
|
|
1417
|
+
META_NAMES,
|
|
1418
|
+
META_RESTRICTION,
|
|
1419
|
+
META_STATUS,
|
|
1420
|
+
MINIMIAL_TIMEZONE_LIST,
|
|
1421
|
+
MULTIPLE_SELECTION_SEPARATOR,
|
|
1422
|
+
MULTIPLE_SELECT_FIELD_TYPES,
|
|
1423
|
+
MYSQL_DATETIME_FORMAT,
|
|
1424
|
+
MYSQL_DATE_FORMAT,
|
|
1425
|
+
NOTIFIED_TYPES,
|
|
1426
|
+
NO_FILL_STATUS,
|
|
1427
|
+
NUMBER_TYPE,
|
|
1428
|
+
NUMERIC_FIELD_TYPES,
|
|
1429
|
+
NotifiedAboutInfo,
|
|
1430
|
+
OBJECT_TYPE,
|
|
1431
|
+
OrderType,
|
|
1432
|
+
PATIENT_CREATION_ABOUT,
|
|
1433
|
+
PresentationWidget,
|
|
1434
|
+
ProcessLogCode,
|
|
1435
|
+
ProcessLogType,
|
|
1436
|
+
QUESTIONNAIRE_DATE,
|
|
1437
|
+
QUESTIONNAIRE_TYPE,
|
|
1438
|
+
QUESTIONNAIRE_TYPE_OPTIONS,
|
|
1439
|
+
QuestionnaireInfoUpdateMode,
|
|
1440
|
+
ROLES,
|
|
1441
|
+
SEED_PRIVILEGE,
|
|
1442
|
+
SELECTOR_TYPE,
|
|
1443
|
+
SELECT_FIELD_TYPES,
|
|
1444
|
+
SHORT_TIME_FORMAT,
|
|
1445
|
+
SLIDER_SCALE_ORIENTATION_TYPE,
|
|
1446
|
+
SLIDER_SCALE_TYPE,
|
|
1447
|
+
SLIDER_SELECTOR_TYPE,
|
|
1448
|
+
SLIDER_TYPE,
|
|
1449
|
+
STATUS,
|
|
1450
|
+
STATUS_FIELD_REGEXP,
|
|
1451
|
+
STATUS_SUFFIX,
|
|
1452
|
+
TIME_FORMAT,
|
|
1453
|
+
TIME_SCHEMA,
|
|
1454
|
+
TYPE,
|
|
1455
|
+
TriggerAction,
|
|
1456
|
+
allCountries,
|
|
1457
|
+
isNotStatusField
|
|
1268
1458
|
};
|
|
1459
|
+
//# sourceMappingURL=perseed-api.mjs.map
|