@persei/perseed-api 4.34.16 → 4.34.18

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 CHANGED
@@ -78,6 +78,31 @@ export declare type BaseApiServicePayload = {
78
78
  ctx?: RequestContext;
79
79
  } & Partial<ApiActionContextData>;
80
80
 
81
+ export declare type BaseDashboardWidget = (BaseDashboardWidgetPayload & {
82
+ type: DashboardWidgetType.SECTIONCARD;
83
+ params: SectionCardProps;
84
+ }) | (BaseDashboardWidgetPayload & {
85
+ type: DashboardWidgetType.VALUECARD;
86
+ params: ValueCardProps;
87
+ }) | (BaseDashboardWidgetPayload & {
88
+ type: DashboardWidgetType.PATIENTLIST;
89
+ params: PatientListProps;
90
+ }) | (BaseDashboardWidgetPayload & {
91
+ type: DashboardWidgetType.DASHBOARD;
92
+ params: DashboardProps;
93
+ });
94
+
95
+ export declare type BaseDashboardWidgetPayload<T extends DashboardWidgetType | undefined = undefined> = {
96
+ id?: number;
97
+ title: string;
98
+ description?: string;
99
+ size?: number | ColProps;
100
+ type: T | DashboardWidgetType;
101
+ library: boolean;
102
+ config?: WidgetBlockConfig;
103
+ position?: number;
104
+ };
105
+
81
106
  declare class BaseModel extends Model {
82
107
  id: number;
83
108
  static get modelPaths(): string[];
@@ -85,13 +110,6 @@ declare class BaseModel extends Model {
85
110
  $parseJson(json: any, _opt: any): any;
86
111
  }
87
112
 
88
- export declare type BaseWidgetPayload = {
89
- title: string;
90
- description?: string;
91
- weight?: number;
92
- size?: number | ColProps;
93
- };
94
-
95
113
  declare interface CacheOptions {
96
114
  enabled: boolean;
97
115
  requestDependent: boolean;
@@ -422,6 +440,20 @@ export declare const CORE: {
422
440
 
423
441
  export declare const CountryPhoneCodes: {};
424
442
 
443
+ export declare type CreateDashboardWidgetPayload = (DashboardBaseWidgetPayload & {
444
+ type: DashboardWidgetType.SECTIONCARD;
445
+ params: SectionCardProps;
446
+ }) | (DashboardBaseWidgetPayload & {
447
+ type: DashboardWidgetType.VALUECARD;
448
+ params: ValueCardProps;
449
+ }) | (DashboardBaseWidgetPayload & {
450
+ type: DashboardWidgetType.PATIENTLIST;
451
+ params: PatientListProps;
452
+ }) | (DashboardBaseWidgetPayload & {
453
+ type: DashboardWidgetType.DASHBOARD;
454
+ params: DashboardProps;
455
+ });
456
+
425
457
  export declare interface CreateFormPayload extends BaseApiServicePayload {
426
458
  formName: string;
427
459
  patientId: number;
@@ -445,33 +477,72 @@ export declare interface CreateTriggerPayload {
445
477
  configuration?: NotificationConfigurationConf;
446
478
  }
447
479
 
448
- export declare type CreateWidgetPayload = (BaseWidgetPayload & {
449
- type: WidgetType.SECTIONCARD;
450
- params: SectionCardProps;
451
- }) | (BaseWidgetPayload & {
452
- type: WidgetType.VALUECARD;
453
- params: ValueCardProps;
454
- }) | (BaseWidgetPayload & {
455
- type: WidgetType.PATIENTLIST;
456
- params: PatientListProps;
457
- }) | (BaseWidgetPayload & {
458
- type: WidgetType.DASHBOARD;
459
- params: DashboardProps;
460
- });
461
-
462
480
  declare class CustomQueryBuilder<M extends Model = Model, R = M[]> extends QueryBuilder<M, R> {
463
481
  delete(): this;
464
482
  nativeDelete(): NumberQueryBuilder<this>;
465
483
  }
466
484
 
467
- export declare interface DashboardProps {
485
+ export declare type DashboardBaseWidgetPayload = {
468
486
  title: string;
487
+ description?: string;
488
+ weight?: number;
489
+ size?: number | ColProps;
490
+ library?: boolean;
491
+ widgetsBlocks?: DashboardWidgetBlockCreatePayload[];
492
+ };
493
+
494
+ export declare interface DashboardProps {
469
495
  active?: boolean;
470
496
  config?: any;
471
497
  icon?: string | null;
472
- weight?: number;
473
498
  }
474
499
 
500
+ export declare type DashboardWidget<T extends DashboardWidgetType | undefined = undefined> = T extends DashboardWidgetType ? {
501
+ id: number;
502
+ widgets?: BaseDashboardWidgetPayload[];
503
+ } & DashboardWidgetTypeToParams[T] & BaseDashboardWidgetPayload<T> : {
504
+ id: number;
505
+ params: any;
506
+ widgets?: BaseDashboardWidgetPayload[];
507
+ } & BaseDashboardWidgetPayload<T>;
508
+
509
+ export declare type DashboardWidgetBlockCreatePayload = {
510
+ parent_id: number | string;
511
+ child_id: number;
512
+ position: number;
513
+ config?: WidgetBlockConfig;
514
+ };
515
+
516
+ export declare type DashboardWidgetDataLoader<T> = T extends {
517
+ type: infer Type;
518
+ params: infer Params;
519
+ } ? {
520
+ type: Type;
521
+ params: Params;
522
+ } : never;
523
+
524
+ export declare enum DashboardWidgetType {
525
+ VALUECARD = "ValueCard",
526
+ SECTIONCARD = "SectionCard",
527
+ PATIENTLIST = "PatientList",
528
+ DASHBOARD = "Dashboard"
529
+ }
530
+
531
+ export declare type DashboardWidgetTypeToParams = {
532
+ [DashboardWidgetType.SECTIONCARD]: {
533
+ params: SectionCardProps;
534
+ };
535
+ [DashboardWidgetType.VALUECARD]: {
536
+ params: ValueCardProps;
537
+ };
538
+ [DashboardWidgetType.PATIENTLIST]: {
539
+ params: PatientListProps;
540
+ };
541
+ [DashboardWidgetType.DASHBOARD]: {
542
+ params: DashboardProps;
543
+ };
544
+ };
545
+
475
546
  export declare enum DataLoaderType {
476
547
  OUTCOMES = "outcomes"
477
548
  }
@@ -750,7 +821,7 @@ export declare const FORMS_VIEW = "forms";
750
821
 
751
822
  export declare type GenericBooleanSetting = boolean;
752
823
 
753
- export declare interface GenericWidgetDataLoader {
824
+ export declare interface GenericDashboardWidgetDataLoader {
754
825
  type: DataLoaderType;
755
826
  params: Record<string, any>;
756
827
  }
@@ -1707,8 +1778,6 @@ export declare interface SectionCardProps {
1707
1778
  icon: string;
1708
1779
  background?: string;
1709
1780
  titleBackground?: string;
1710
- title: I18nTextTranslation;
1711
- widgets: number[];
1712
1781
  }
1713
1782
 
1714
1783
  /**
@@ -1931,6 +2000,8 @@ export declare const TYPE: {
1931
2000
  TASK: string;
1932
2001
  };
1933
2002
 
2003
+ export declare type UpdateDashboardWidgetPayload = Partial<CreateDashboardWidgetPayload>;
2004
+
1934
2005
  export declare interface UpdateFormPayload extends BaseApiServicePayload {
1935
2006
  formName: string;
1936
2007
  body: any;
@@ -1942,8 +2013,6 @@ export declare interface UpdateFormPayload extends BaseApiServicePayload {
1942
2013
 
1943
2014
  export declare type UpdateTriggerPayload = Partial<CreateTriggerPayload>;
1944
2015
 
1945
- export declare type UpdateWidgetPayload = Partial<CreateWidgetPayload>;
1946
-
1947
2016
  declare class User extends BaseModel {
1948
2017
  username?: string;
1949
2018
  created_user?: number;
@@ -2626,34 +2695,22 @@ declare class UserProfile extends BaseModel {
2626
2695
  declare type UserSettingValue = string | number | boolean | Record<string, string | number> | string[] | number[];
2627
2696
 
2628
2697
  export declare interface ValueCardProps {
2629
- title: I18nTextTranslation;
2630
2698
  icon: string;
2631
2699
  text: I18nTextTranslation;
2632
2700
  subtext?: I18nTextTranslation;
2633
2701
  titleTextColor?: string;
2634
2702
  bodyTextColor?: string;
2635
2703
  data?: Record<string, any>;
2636
- dataLoader?: WidgetDataLoader<WidgetOutcomesDataLoader>;
2704
+ dataLoader?: DashboardWidgetDataLoader<WidgetOutcomesDataLoader>;
2637
2705
  }
2638
2706
 
2639
- export declare type WidgetDataLoader<T> = T extends {
2640
- type: infer Type;
2641
- params: infer Params;
2642
- } ? {
2643
- type: Type;
2644
- params: Params;
2645
- } : never;
2707
+ export declare type WidgetBlockConfig = {
2708
+ size?: number | ColProps;
2709
+ };
2646
2710
 
2647
2711
  export declare interface WidgetOutcomesDataLoader {
2648
2712
  type: DataLoaderType.OUTCOMES;
2649
2713
  params: OutcomesParams;
2650
2714
  }
2651
2715
 
2652
- export declare enum WidgetType {
2653
- VALUECARD = "ValueCard",
2654
- SECTIONCARD = "SectionCard",
2655
- PATIENTLIST = "PatientList",
2656
- DASHBOARD = "Dashboard"
2657
- }
2658
-
2659
2716
  export { }
@@ -1,4 +1,4 @@
1
- const A = "YYYY-MM-DD", C = "HH:mm:ss", M = "HH:mm", p = "YYYY-MM-DD HH:mm", D = A, g = "YYYY-MM-DD HH:mm:ss", h = {
1
+ const A = "YYYY-MM-DD", C = "HH:mm:ss", M = "HH:mm", p = "YYYY-MM-DD HH:mm", D = A, g = "YYYY-MM-DD HH:mm:ss", f = {
2
2
  PENDING: "IN_PROGRESS",
3
3
  ERROR: "ERROR",
4
4
  SUCCESS: "COMPLETED",
@@ -59,7 +59,7 @@ const A = "YYYY-MM-DD", C = "HH:mm:ss", M = "HH:mm", p = "YYYY-MM-DD HH:mm", D =
59
59
  FILE_NAME: "file"
60
60
  };
61
61
  var l = /* @__PURE__ */ ((a) => (a[a.STATIC = 0] = "STATIC", a[a.STANDARD = 1] = "STANDARD", a[a.FOLLOW_UP = 2] = "FOLLOW_UP", a[a.ADVERSE_EVENT = 3] = "ADVERSE_EVENT", a[a.QUESTIONNAIRE = 5] = "QUESTIONNAIRE", a[a.STUDY = 6] = "STUDY", a))(l || {});
62
- const f = () => {
62
+ const h = () => {
63
63
  let a = {};
64
64
  return Object.keys(r).forEach((e) => {
65
65
  a = {
@@ -67,7 +67,7 @@ const f = () => {
67
67
  [r[e]]: _[`${e}_NAME`]
68
68
  };
69
69
  }), a;
70
- }, b = ["number", _.DECIMAL_NAME, _.INTEGER_NAME], P = ["date"], U = ["object", _.SCAN_CODE_NAME], T = {
70
+ }, P = ["number", _.DECIMAL_NAME, _.INTEGER_NAME], b = ["date"], U = ["object", _.SCAN_CODE_NAME], T = {
71
71
  CREATION_TIME: "creation_time",
72
72
  CREATION_USER: "creation_user",
73
73
  CRF_NAME: "crf_name",
@@ -1168,15 +1168,16 @@ export {
1168
1168
  aa as CountryPhoneCodes,
1169
1169
  p as DATETIME_SHORT_FORMAT,
1170
1170
  A as DATE_FORMAT,
1171
- P as DATE_TYPE,
1171
+ b as DATE_TYPE,
1172
1172
  J as DEFAULT_CONFIGURATION_PATIENT_LIST,
1173
1173
  X as DYNAMIC_FILE_VALID_FORMATS,
1174
+ N as DashboardWidgetType,
1174
1175
  d as DataLoaderType,
1175
1176
  y as EXCLUDE_FIELDS,
1176
- h as Exporter,
1177
+ f as Exporter,
1177
1178
  r as FIELDS,
1178
1179
  _ as FIELD_NAMES,
1179
- f as FIELD_NAMES_MAP,
1180
+ h as FIELD_NAMES_MAP,
1180
1181
  Y as FIELD_STATUS,
1181
1182
  G as FIELD_SUFFIX,
1182
1183
  Aa as FORMS_VIEW,
@@ -1199,7 +1200,7 @@ export {
1199
1200
  D as MYSQL_DATE_FORMAT,
1200
1201
  $ as NOTIFIED_TYPES,
1201
1202
  z as NO_FILL_STATUS,
1202
- b as NUMBER_TYPE,
1203
+ P as NUMBER_TYPE,
1203
1204
  Ta as NotifiedAboutInfo,
1204
1205
  U as OBJECT_TYPE,
1205
1206
  O as PATIENT_CREATION_ABOUT,
@@ -1222,7 +1223,6 @@ export {
1222
1223
  V as TIME_SCHEMA,
1223
1224
  E as TYPE,
1224
1225
  i as TriggerAction,
1225
- N as WidgetType,
1226
1226
  c as allCountries,
1227
1227
  w as isNotStatusField
1228
1228
  };
@@ -1 +1 @@
1
- (function(a,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(a=typeof globalThis<"u"?globalThis:a||self,n(a["perseed-api"]={}))})(this,function(a){"use strict";const n="YYYY-MM-DD",C="HH:mm:ss",D="HH:mm",g="YYYY-MM-DD HH:mm",f=n,P="YYYY-MM-DD HH:mm:ss",h={PENDING:"IN_PROGRESS",ERROR:"ERROR",SUCCESS:"COMPLETED",AVAILABLE_FORMATS:{xls:0,csv:2,spss:1}},r={DECIMAL:1,INTEGER:2,MULTIPLE_SELECTION:3,SELECTION:4,DYNAMIC_SELECTION:5,DATE:6,HEADER:7,SUBHEADER:8,WARNING:9,SUBFORM:10,MEMO:11,TEXT:12,TEXT_AREA:13,YES_NO:14,TIME:15,LINK_HREF:16,COUNTRY:17,HOSPITAL:18,USERS:19,DYNAMIC_FILE:20,DYNAMIC_LINK_HREF:21,SCAN_CODE:22,PARAGRAPH:23,FILE:24},E={DECIMAL_NAME:"decimal",INTEGER_NAME:"integer",MULTIPLE_SELECTION_NAME:"multiple_selection",SELECTION_NAME:"selection",DYNAMIC_SELECTION_NAME:"dynamic_selection",DATE_NAME:"date",HEADER_NAME:"header",SUBHEADER_NAME:"subheader",WARNING_NAME:"warning",SUBFORM_NAME:"subform",MEMO_NAME:"memo",TEXT_NAME:"text",TEXT_AREA_NAME:"text_area",YES_NO_NAME:"yes_no",TIME_NAME:"time",LINK_HREF_NAME:"link_href",COUNTRY_NAME:"country",HOSPITAL_NAME:"hospital",USERS_NAME:"users",DYNAMIC_FILE_NAME:"dynamic_file",DYNAMIC_LINK_HREF_NAME:"dynamic_link_href",SCAN_CODE_NAME:"scan_code",PARAGRAPH_NAME:"paragraph",FILE_NAME:"file"};var l=(e=>(e[e.STATIC=0]="STATIC",e[e.STANDARD=1]="STANDARD",e[e.FOLLOW_UP=2]="FOLLOW_UP",e[e.ADVERSE_EVENT=3]="ADVERSE_EVENT",e[e.QUESTIONNAIRE=5]="QUESTIONNAIRE",e[e.STUDY=6]="STUDY",e))(l||{});const U=()=>{let e={};return Object.keys(r).forEach(_=>{e={...e,[r[_]]:E[`${_}_NAME`]}}),e},p=["number",E.DECIMAL_NAME,E.INTEGER_NAME],b=["date"],F=["object",E.SCAN_CODE_NAME],I={CREATION_TIME:"creation_time",CREATION_USER:"creation_user",CRF_NAME:"crf_name",CRF_STATUS:"crf_status",HOSPITAL:"hospital",HOSPITAL_STATUS:"hospital_status",ID:"id",LOCK_STATE:"lock_state",LOCK_USER:"lock_user",LOCK_DATE:"lock_date",MODIFICATION_TIME:"mod_time",MODIFICATION_USER:"mod_user",PATIENT_ID:"patient_id",PATIENT_NUMBER:"patient_number",PATIENT_NUMBER_STATUS:"patient_number_status",RECORD_ID:"record_id",SIGNATURE_DATE:"signature_date",SIGNATURE_STATE:"signature_state",SIGNATURE_USER:"signature_user",STATUS:"status",USER_IP:"user_ip",DATE_OF_QUESTIONNAIRE:"date_of_questionnaire",TIME_OF_QUESTIONNAIRE:"time_of_questionnaire",VERSION:"version",REFERENCE:"reference",SUBFORM_ID:"subform_id"},y=Object.values(I),v={added:"A",edited:"E",deleted:"D"},k={PATIENT:"patient",SEPARATOR:"_"},Y={AUDIT:"audit"},B="~",G="_status",H="_status",w={filled:"filled",unk:"UNK",na:"NA",nd:"ND"},u=/^[0-9a-f]{33}_status$/,z=function(e){return!u.test(e)},V=["UNK","NA","ND"],K="^[0-1][0-9]:[0-5][0-9]$|^[0-2][0-3]:[0-5][0-9]$",q={DEPENDENT_SOURCE:"dependent_source",ENCRYPTED:"encrypted",ENCRYPTED_LEVEL:"encrypted_level",EXTERNAL_SHARING:"external_sharing",SHOW_EMBEDDED_PDF:"show_embedded_pdf",HIDDEN:"hidden",IS_CRF_MAIN_FIELD:"is_crf_main_field",MIN_VALUE:"min-value",MIN_VALUE_VALIDATION:"validation_of_less_than",MAX_VALUE:"max-value",MAX_VALUE_VALIDATION:"validation_of_higher_than",NEXT_FORM:"next_form",MULTIPLE:"is_multiple",ORDER:"order",READ_ONLY:"readonly",REQUIRED:"is_required",REQUIRED_TYPE:"type_of_required",SELECTION_VALUE:"value_of_selection",SELECTION_VALUE_SLIDER:"value_of_selection_slider",SOURCE_FIELD:"source_field",TYPE:"type",TYPE_QUESTIONARY:"questionary",QUESTION_DAYS:"question_days",QUESTION_TIME:"question_time",QUESTION_HOURS:"question_hours",QUESTION_MINUTES:"question_minutes",REMINDER_DAYS:"reminder_days",REMINDER_HOURS:"reminder_hours",REMINDER_MINUTES:"reminder_minutes",REMINDER_SUBJECT:"reminder_subject",REMINDER_MESSAGE:"reminder_message",MAX_NUMBER_REMINDER:"max_number_reminder",NUMBER_QUESTION_PAGE:"number_question_page",UNTIL:"until",NUMBER_OF_QUESTIONAIRES:"number_of_questionaires",QUESTION_COMMENTS:"question_comments",TYPE_OF_QUESTIONNAIRE:"type_of_questionnaire",HISTORY_OF_QUESTIONNAIRE:"history_of_questionnaire",HISTORY:"history",CRF_HISTORY:"crf_history",PROCEDURE_CONDITION:"procedure_condition",HREF_VALUE:"href_value",HREF_TYPE:"href_type",SIZE:"size",FILE_TYPE:"file_type",INPUT_TYPE:"input_type",PARAGRAPH_CONTENT:"paragraph_content",FILE_VALUE:"file_value",WINDOW_REFERENCE:"window_reference",START_DATE_DAYS:"start_date_days",HAS_DEFAULT_VALUE:"has_default_value",SPECIFIC_VALUE:"specific_value",DEFAULT_VALUE:"default_value",UNIQUE:"unique",HELP:"help",SELECTOR_TYPE:"selector_type",SLIDER_SELECTOR:"slider_selector",SLIDER_SCALE_ORIENTATION:"slider_scale_orientation",UNTIL_DATE:"until",PAGE_BREAK:"page_break",WINDOW_BEFORE:"window_before",WINDOW_AFTER:"window_after",WINDOW_PERIOD:"window_period"},j={STRICT:"strict",FLEXIBLE:"flexible"},W={ACTIVE:"1"},Q={SLIDER:"slider",DROPDOWN:"dropdown",RADIO_BUTTON:"radio_button",CHECK_BOX:"check_box"},t={STARS:"0",SCALE_RATING:"1",IMAGES:"2"},X={[t.STARS]:"stars",[t.SCALE_RATING]:"scale",[t.IMAGES]:"images"},s={HORIZONTAL:"0",VERTICAL:"1"},Z={[s.HORIZONTAL]:"horizontal",[s.VERTICAL]:"vertical"},J={NEW_WINDOW:"newwindow",EMBEDDED_HTML:"embeddedhtml"},$={1:["image/jpg","image/jpeg","image/bmp","image/gif","image/png"],2:["application/pdf","application/x-pdf","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],3:["application/pdf","application/x-pdf"],4:["application/dicom","application/gzip","application/x-gzip","application/tar","application/tar+gzip","application/zip","application/x-rar-compressed","application/x-zip-compressed","application/x-7z-compressed","application/octet-stream"],5:["video/x-msvideo","video/x-mkv","video/x-matroska","video/mpeg","video/mpeg4","video/mpg","video/ogg","video/webm","video/3gpp","video/3gpp2","video/mp4","video/divx","video/avi","video/quicktime","video/x-ms-wmv","video/x-flv"]},x=[{id:"1",name:"patient_number",type:"Zend\\Form\\Element\\Text",label:"Patient Id",required:"1",crf_name:"patient",status:"1"},{type:"4",name:"hospital",label:"Hospital",required:"0",id:"2",crf_name:"patient",status:"1"},{id:"1000000001",name:"procedure",type:"customzation",label:"Procedures",required:"1",crf_name:"",status:"1"}],aa={EMAIL:1,MOBILE:2,PLATFORM:3,SMS:4,HL7:5,ALL:["1","2","3","4","5"]},N=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua and Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (日本)","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["North Macedonia (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1",18,["869"]],["Saint Lucia","lc","1",19,["758"]],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1",20,["784"]],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1,["79"]],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1",22,["868"]],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1",24,["340"]],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1,["5288","5289"]],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],ea=N.reduce((e,_)=>{const T=_[1];return e[T]=_[2],e},{});var S=(e=>(e.CLOSED="Closed",e.OPEN="Open",e.COMING_SOON="Coming soon",e))(S||{});const o={PERMANENT:"Permanent",TEMPORARY:"Temporary"},A={QOL:"QoL",TASK:"Task"},_a={0:A.QOL,1:A.TASK},ia={0:o.PERMANENT,1:o.TEMPORARY},na={DATE:"date_of_questionnaire",TIME:"time_of_questionnaire"},Ea={TYPE:"type_of_questionnaire"},ta={PERSEED_ADMIN:"PerseedAdmin",ECOSYSTEM_ADMIN:"EcosystemAdmin",USER:"Users",SALE:"Sales"},ra={ADD_PATIENT:"add_patient",ADD_REPEATABLE_CRF:"add_repeat_crf",ADVANCED_FILTER:"advanced_filter",ALL_PATIENT_LIST:"all_patient_list",ALLOW_TO_CONTROL_THESE_PROFILES:"core_control_profile",CONNECTOR_ADD_CP:"connector_add_cp",CONNECTOR_ADD_CRF:"connector_add_crf",CONNECTOR_ADD_FIELD:"connector_add_field",CORE_NOT_ALLOW_ACCESS_SENSITIVE_INFO:"core_not_allow_access_sensitive_info",CORE_NOTIFICATION_LOG:"core_notification_log",CORE_NOTIFICATION_MY_LOG:"core_notification_my_log",DELETE_PATIENT:"delete_patient",FULL_DELETE_PATIENT:"full_delete_patient",DELETE_REPEATABLE_CRF:"delete_crf",EXPORT_ANONYMIZED:"export_anonymized",ENABLE_CP:"enable_cp",EXPORT_MY_HOSPITALS:"export_my_hospitals",EXPORT_NOT_ALLOW_ACCESS_SENSITIVE_INFO:"export_not_allow_access_sensitive_info",EXPORT_USER_TIMESTAMP:"export_user_timestamp",EXPORT_RAW:"export_raw",FILTER_ALL:"filter_all",FILTER_MY_HOSPITALS:"filter_my_hospitals",MANAGE_USERS:"core_manage_user",CORE_PRO_USER_SENSITIVE_INFO:"core_pro_user_sensitive_info",NOTIFICATIONS:"core_notification_seed",ONLY_MY_PATIENTS:"only_my_patients",ONLY_UPDATE_PATIENTS_API:"only_update_patients",PRO_USER:"core_pro_user",USERS_MANAGEMENT_FOR_MY_ORGANIZATIONS:"core_manage_user_hospital",UPLOAD_DOCUMENTS:"add",DELETE_DOCUMENTS:"delete",READ_DOCUMENTS:"read",DISPLAY_PATIENT_LIST:"advanced_patient_list",EXPORT_CONFIGURATION_EXPLICIT_ACCESS:"export_configurations_explicit_access_only",FOLLOWUP_DASHBOARD:"followup_dashboard",TRIGGERS_MANAGEMENT:"triggers_management"},sa=["Etc/GMT+12","Pacific/Midway","Pacific/Honolulu","America/Juneau","America/Dawson","America/Boise","America/Chihuahua","America/Phoenix","America/Chicago","America/Regina","America/Mexico_City","America/Belize","America/Detroit","America/Indiana/Indianapolis","America/Bogota","America/Glace_Bay","America/Caracas","America/Santiago","America/St_Johns","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Godthab","Etc/GMT+2","Atlantic/Azores","Atlantic/Cape_Verde","GMT","Africa/Casablanca","Atlantic/Canary","Europe/Belgrade","Europe/Sarajevo","Europe/Brussels","Europe/Amsterdam","Africa/Algiers","Europe/Bucharest","Africa/Cairo","Europe/Helsinki","Europe/Athens","Asia/Jerusalem","Africa/Harare","Europe/Moscow","Asia/Kuwait","Africa/Nairobi","Asia/Baghdad","Asia/Tehran","Asia/Dubai","Asia/Baku","Asia/Kabul","Asia/Yekaterinburg","Asia/Karachi","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Colombo","Asia/Almaty","Asia/Rangoon","Asia/Bangkok","Asia/Krasnoyarsk","Asia/Shanghai","Asia/Kuala_Lumpur","Asia/Taipei","Australia/Perth","Asia/Irkutsk","Asia/Seoul","Asia/Tokyo","Asia/Yakutsk","Australia/Darwin","Australia/Adelaide","Australia/Sydney","Australia/Brisbane","Australia/Hobart","Asia/Vladivostok","Pacific/Guam","Asia/Magadan","Pacific/Fiji","Pacific/Auckland","Pacific/Tongatapu"],oa=["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","gd","gv","ka","de","el","kl","gn","gu","ht","ha","he","hz","hi","ho","hu","is","io","ig","id","ia","ie","iu","ik","ga","it","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","rn","ky","kv","kg","ko","ku","kj","lo","la","lv","li","ln","lt","lu","lg","lb","gv","mk","mg","ms","ml","mt","mi","mr","mh","mo","mn","na","nv","ng","nd","ne","no","nb","nn","ii","oc","oj","cu","or","om","os","pi","ps","fa","pl","pt","pa","qu","rm","ro","ru","se","sm","sg","sa","sr","sh","st","tn","sn","ii","sd","si","ss","sk","sl","so","nr","es","su","sw","ss","sv","tl","ty","tg","ta","tt","te","th","bo","ti","to","ts","tr","tk","tw","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","ji","yo","za","zu"],Aa=["af_ZA","am_ET","ar_AE","ar_BH","ar_DZ","ar_EG","ar_IQ","ar_JO","ar_KW","ar_LB","ar_LY","ar_MA","arn_CL","ar_OM","ar_QA","ar_SA","ar_SY","ar_TN","ar_YE","as_IN","az_Cyrl_AZ","az_Latn_AZ","ba_RU","be_BY","bg_BG","bn_BD","bn_IN","bo_CN","br_FR","bs_Cyrl_BA","bs_Latn_BA","ca_ES","co_FR","cs_CZ","cy_GB","da_DK","de_AT","de_CH","de_DE","de_LI","de_LU","dsb_DE","dv_MV","el_GR","en_029","en_AU","en_BZ","en_CA","en_GB","en_IE","en_IN","en_JM","en_MY","en_NZ","en_PH","en_SG","en_TT","en_US","en_ZA","en_ZW","es_AR","es_BO","es_CL","es_CO","es_CR","es_DO","es_EC","es_ES","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et_EE","eu_ES","fa_IR","fi_FI","fil_PH","fo_FO","fr_BE","fr_CA","fr_CH","fr_FR","fr_LU","fr_MC","fy_NL","ga_IE","gd_GB","gl_ES","gsw_FR","gu_IN","ha_Latn_NG","he_IL","hi_IN","hr_BA","hr_HR","hsb_DE","hu_HU","hy_AM","id_ID","ig_NG","ii_CN","is_IS","it_CH","it_IT","iu_Cans_CA","iu_Latn_CA","ja_JP","ka_GE","kk_KZ","kl_GL","km_KH","kn_IN","kok_IN","ko_KR","ky_KG","lb_LU","lo_LA","lt_LT","lv_LV","mi_NZ","mk_MK","ml_IN","mn_MN","mn_Mong_CN","moh_CA","mr_IN","ms_BN","ms_MY","mt_MT","nb_NO","ne_NP","nl_BE","nl_NL","nn_NO","nso_ZA","oc_FR","or_IN","pa_IN","pl_PL","prs_AF","ps_AF","pt_BR","pt_PT","qut_GT","quz_BO","quz_EC","quz_PE","rm_CH","ro_RO","ru_RU","rw_RW","sah_RU","sa_IN","se_FI","se_NO","se_SE","si_LK","sk_SK","sl_SI","sma_NO","sma_SE","smj_NO","smj_SE","smn_FI","sms_FI","sq_AL","sr_Cyrl_BA","sr_Cyrl_CS","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn_BA","sr_Latn_CS","sr_Latn_ME","sr_Latn_RS","sv_FI","sv_SE","sw_KE","syr_SY","ta_IN","te_IN","tg_Cyrl_TJ","th_TH","tk_TM","tn_ZA","tr_TR","tt_RU","tzm_Latn_DZ","ug_CN","uk_UA","ur_PK","uz_Cyrl_UZ","uz_Latn_UZ","vi_VN","wo_SN","xh_ZA","yo_NG","zh_CN","zh_HK","zh_MO","zh_SG","zh_TW","zu_ZA","fi_FI"],Ta="forms",la="history";var d=(e=>(e.VALUECARD="ValueCard",e.SECTIONCARD="SectionCard",e.PATIENTLIST="PatientList",e.DASHBOARD="Dashboard",e))(d||{}),c=(e=>(e.OUTCOMES="outcomes",e))(c||{}),R=(e=>(e.QUESTIONNAIRE_CREATE="questionnaire.create",e.CRF_CREATE="crf.create",e.CRF_UPDATE="crf.update",e.CRF_DELETE="crf.delete",e.EXTERNAL_API_CALL="external_api_call",e))(R||{}),m=(e=>(e.JSON_LOGIC="jsonLogic",e.CUSTOM="custom",e))(m||{}),i=(e=>(e.CREATION="creation",e.UPDATE="update",e))(i||{}),O=(e=>(e.TEXT="text",e.DATE="date",e.TIME="time",e.BOOLEAN="boolean",e.NUMBER="number",e.SELECT="select",e.MULTISELECT="multiselect",e.HIDDEN="hidden",e))(O||{});class Ia{constructor(_){this.notified_about=_}crfName(){return this.notified_about.startsWith("crf_")?this.notified_about.split("_")[1]:this.notified_about.startsWith("Patient")?"patient":null}actionTrigger(){return this.notified_about.toLowerCase().endsWith(i.UPDATE)?i.UPDATE:this.notified_about.toLowerCase().endsWith(i.CREATION)?i.CREATION:null}isCrfTrigger(){return this.notified_about===L||this.notified_about.startsWith("crf_")}isModelTrigger(){return this.notified_about.startsWith("model_")}isDisplayerTrigger(){return this.notified_about.startsWith("model_displayer_")}isFieldTrigger(){return!isNaN(parseInt(this.notified_about))}getModelName(){if(this.isModelTrigger()&&!this.isDisplayerTrigger())return this.notified_about.split("_")[1];if(this.isDisplayerTrigger()){const _=this.notified_about.split("_"),T=_[_.length-1];return Object.values(i).includes(T)&&_.pop(),_.slice(2).join("_")}}getModelTriggerAction(){const _=this.getModelName();return _&&this.isDisplayerTrigger()?this.notified_about.replace(`model_displayer_${_}_`,"").replace(`model_displayer_${_}`,""):_&&this.isModelTrigger()?this.notified_about.replace(`model_${_}_`,"").replace(`model_${_}`,""):null}}const L="Patient Creation";var M=(e=>(e[e.START_OVER=0]="START_OVER",e[e.RESUME=1]="RESUME",e))(M||{});a.AUDIT_FLAGS=v,a.ApiAction=R,a.CORE=I,a.ConditionsFormat=m,a.CountryPhoneCodes=ea,a.DATETIME_SHORT_FORMAT=g,a.DATE_FORMAT=n,a.DATE_TYPE=b,a.DEFAULT_CONFIGURATION_PATIENT_LIST=x,a.DYNAMIC_FILE_VALID_FORMATS=$,a.DataLoaderType=c,a.EXCLUDE_FIELDS=y,a.Exporter=h,a.FIELDS=r,a.FIELD_NAMES=E,a.FIELD_NAMES_MAP=U,a.FIELD_STATUS=w,a.FIELD_SUFFIX=G,a.FORMS_VIEW=Ta,a.FORM_NAMES=k,a.FORM_SUFFIX=Y,a.FORM_TYPES=l,a.HISTORY=o,a.HISTORY_TYPE_OPTIONS=ia,a.HISTORY_VIEW=la,a.HREF_TYPE=J,a.IntrospectionSchemaFieldType=O,a.LANG_CODES=oa,a.LOCALE_LANG_CODES=Aa,a.META_NAMES=q,a.META_RESTRICTION=j,a.META_STATUS=W,a.MINIMIAL_TIMEZONE_LIST=sa,a.MULTIPLE_SELECTION_SEPARATOR=B,a.MYSQL_DATETIME_FORMAT=P,a.MYSQL_DATE_FORMAT=f,a.NOTIFIED_TYPES=aa,a.NO_FILL_STATUS=V,a.NUMBER_TYPE=p,a.NotifiedAboutInfo=Ia,a.OBJECT_TYPE=F,a.PATIENT_CREATION_ABOUT=L,a.QUESTIONNAIRE_DATE=na,a.QUESTIONNAIRE_TYPE=Ea,a.QUESTIONNAIRE_TYPE_OPTIONS=_a,a.QuestionnaireInfoUpdateMode=M,a.ROLES=ta,a.SEED_PRIVILEGE=ra,a.SELECTOR_TYPE=Q,a.SHORT_TIME_FORMAT=D,a.SLIDER_SCALE_ORIENTATION_TYPE=Z,a.SLIDER_SCALE_TYPE=s,a.SLIDER_SELECTOR_TYPE=X,a.SLIDER_TYPE=t,a.STATUS=S,a.STATUS_FIELD_REGEXP=u,a.STATUS_SUFFIX=H,a.TIME_FORMAT=C,a.TIME_SCHEMA=K,a.TYPE=A,a.TriggerAction=i,a.WidgetType=d,a.allCountries=N,a.isNotStatusField=z,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
1
+ (function(a,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(a=typeof globalThis<"u"?globalThis:a||self,n(a["perseed-api"]={}))})(this,function(a){"use strict";const n="YYYY-MM-DD",C="HH:mm:ss",D="HH:mm",g="YYYY-MM-DD HH:mm",f=n,P="YYYY-MM-DD HH:mm:ss",h={PENDING:"IN_PROGRESS",ERROR:"ERROR",SUCCESS:"COMPLETED",AVAILABLE_FORMATS:{xls:0,csv:2,spss:1}},r={DECIMAL:1,INTEGER:2,MULTIPLE_SELECTION:3,SELECTION:4,DYNAMIC_SELECTION:5,DATE:6,HEADER:7,SUBHEADER:8,WARNING:9,SUBFORM:10,MEMO:11,TEXT:12,TEXT_AREA:13,YES_NO:14,TIME:15,LINK_HREF:16,COUNTRY:17,HOSPITAL:18,USERS:19,DYNAMIC_FILE:20,DYNAMIC_LINK_HREF:21,SCAN_CODE:22,PARAGRAPH:23,FILE:24},E={DECIMAL_NAME:"decimal",INTEGER_NAME:"integer",MULTIPLE_SELECTION_NAME:"multiple_selection",SELECTION_NAME:"selection",DYNAMIC_SELECTION_NAME:"dynamic_selection",DATE_NAME:"date",HEADER_NAME:"header",SUBHEADER_NAME:"subheader",WARNING_NAME:"warning",SUBFORM_NAME:"subform",MEMO_NAME:"memo",TEXT_NAME:"text",TEXT_AREA_NAME:"text_area",YES_NO_NAME:"yes_no",TIME_NAME:"time",LINK_HREF_NAME:"link_href",COUNTRY_NAME:"country",HOSPITAL_NAME:"hospital",USERS_NAME:"users",DYNAMIC_FILE_NAME:"dynamic_file",DYNAMIC_LINK_HREF_NAME:"dynamic_link_href",SCAN_CODE_NAME:"scan_code",PARAGRAPH_NAME:"paragraph",FILE_NAME:"file"};var l=(e=>(e[e.STATIC=0]="STATIC",e[e.STANDARD=1]="STANDARD",e[e.FOLLOW_UP=2]="FOLLOW_UP",e[e.ADVERSE_EVENT=3]="ADVERSE_EVENT",e[e.QUESTIONNAIRE=5]="QUESTIONNAIRE",e[e.STUDY=6]="STUDY",e))(l||{});const U=()=>{let e={};return Object.keys(r).forEach(_=>{e={...e,[r[_]]:E[`${_}_NAME`]}}),e},p=["number",E.DECIMAL_NAME,E.INTEGER_NAME],b=["date"],F=["object",E.SCAN_CODE_NAME],I={CREATION_TIME:"creation_time",CREATION_USER:"creation_user",CRF_NAME:"crf_name",CRF_STATUS:"crf_status",HOSPITAL:"hospital",HOSPITAL_STATUS:"hospital_status",ID:"id",LOCK_STATE:"lock_state",LOCK_USER:"lock_user",LOCK_DATE:"lock_date",MODIFICATION_TIME:"mod_time",MODIFICATION_USER:"mod_user",PATIENT_ID:"patient_id",PATIENT_NUMBER:"patient_number",PATIENT_NUMBER_STATUS:"patient_number_status",RECORD_ID:"record_id",SIGNATURE_DATE:"signature_date",SIGNATURE_STATE:"signature_state",SIGNATURE_USER:"signature_user",STATUS:"status",USER_IP:"user_ip",DATE_OF_QUESTIONNAIRE:"date_of_questionnaire",TIME_OF_QUESTIONNAIRE:"time_of_questionnaire",VERSION:"version",REFERENCE:"reference",SUBFORM_ID:"subform_id"},y=Object.values(I),v={added:"A",edited:"E",deleted:"D"},k={PATIENT:"patient",SEPARATOR:"_"},Y={AUDIT:"audit"},B="~",G="_status",H="_status",w={filled:"filled",unk:"UNK",na:"NA",nd:"ND"},u=/^[0-9a-f]{33}_status$/,z=function(e){return!u.test(e)},V=["UNK","NA","ND"],K="^[0-1][0-9]:[0-5][0-9]$|^[0-2][0-3]:[0-5][0-9]$",q={DEPENDENT_SOURCE:"dependent_source",ENCRYPTED:"encrypted",ENCRYPTED_LEVEL:"encrypted_level",EXTERNAL_SHARING:"external_sharing",SHOW_EMBEDDED_PDF:"show_embedded_pdf",HIDDEN:"hidden",IS_CRF_MAIN_FIELD:"is_crf_main_field",MIN_VALUE:"min-value",MIN_VALUE_VALIDATION:"validation_of_less_than",MAX_VALUE:"max-value",MAX_VALUE_VALIDATION:"validation_of_higher_than",NEXT_FORM:"next_form",MULTIPLE:"is_multiple",ORDER:"order",READ_ONLY:"readonly",REQUIRED:"is_required",REQUIRED_TYPE:"type_of_required",SELECTION_VALUE:"value_of_selection",SELECTION_VALUE_SLIDER:"value_of_selection_slider",SOURCE_FIELD:"source_field",TYPE:"type",TYPE_QUESTIONARY:"questionary",QUESTION_DAYS:"question_days",QUESTION_TIME:"question_time",QUESTION_HOURS:"question_hours",QUESTION_MINUTES:"question_minutes",REMINDER_DAYS:"reminder_days",REMINDER_HOURS:"reminder_hours",REMINDER_MINUTES:"reminder_minutes",REMINDER_SUBJECT:"reminder_subject",REMINDER_MESSAGE:"reminder_message",MAX_NUMBER_REMINDER:"max_number_reminder",NUMBER_QUESTION_PAGE:"number_question_page",UNTIL:"until",NUMBER_OF_QUESTIONAIRES:"number_of_questionaires",QUESTION_COMMENTS:"question_comments",TYPE_OF_QUESTIONNAIRE:"type_of_questionnaire",HISTORY_OF_QUESTIONNAIRE:"history_of_questionnaire",HISTORY:"history",CRF_HISTORY:"crf_history",PROCEDURE_CONDITION:"procedure_condition",HREF_VALUE:"href_value",HREF_TYPE:"href_type",SIZE:"size",FILE_TYPE:"file_type",INPUT_TYPE:"input_type",PARAGRAPH_CONTENT:"paragraph_content",FILE_VALUE:"file_value",WINDOW_REFERENCE:"window_reference",START_DATE_DAYS:"start_date_days",HAS_DEFAULT_VALUE:"has_default_value",SPECIFIC_VALUE:"specific_value",DEFAULT_VALUE:"default_value",UNIQUE:"unique",HELP:"help",SELECTOR_TYPE:"selector_type",SLIDER_SELECTOR:"slider_selector",SLIDER_SCALE_ORIENTATION:"slider_scale_orientation",UNTIL_DATE:"until",PAGE_BREAK:"page_break",WINDOW_BEFORE:"window_before",WINDOW_AFTER:"window_after",WINDOW_PERIOD:"window_period"},j={STRICT:"strict",FLEXIBLE:"flexible"},W={ACTIVE:"1"},Q={SLIDER:"slider",DROPDOWN:"dropdown",RADIO_BUTTON:"radio_button",CHECK_BOX:"check_box"},t={STARS:"0",SCALE_RATING:"1",IMAGES:"2"},X={[t.STARS]:"stars",[t.SCALE_RATING]:"scale",[t.IMAGES]:"images"},s={HORIZONTAL:"0",VERTICAL:"1"},Z={[s.HORIZONTAL]:"horizontal",[s.VERTICAL]:"vertical"},J={NEW_WINDOW:"newwindow",EMBEDDED_HTML:"embeddedhtml"},$={1:["image/jpg","image/jpeg","image/bmp","image/gif","image/png"],2:["application/pdf","application/x-pdf","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],3:["application/pdf","application/x-pdf"],4:["application/dicom","application/gzip","application/x-gzip","application/tar","application/tar+gzip","application/zip","application/x-rar-compressed","application/x-zip-compressed","application/x-7z-compressed","application/octet-stream"],5:["video/x-msvideo","video/x-mkv","video/x-matroska","video/mpeg","video/mpeg4","video/mpg","video/ogg","video/webm","video/3gpp","video/3gpp2","video/mp4","video/divx","video/avi","video/quicktime","video/x-ms-wmv","video/x-flv"]},x=[{id:"1",name:"patient_number",type:"Zend\\Form\\Element\\Text",label:"Patient Id",required:"1",crf_name:"patient",status:"1"},{type:"4",name:"hospital",label:"Hospital",required:"0",id:"2",crf_name:"patient",status:"1"},{id:"1000000001",name:"procedure",type:"customzation",label:"Procedures",required:"1",crf_name:"",status:"1"}],aa={EMAIL:1,MOBILE:2,PLATFORM:3,SMS:4,HL7:5,ALL:["1","2","3","4","5"]},N=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua and Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (日本)","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["North Macedonia (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1",18,["869"]],["Saint Lucia","lc","1",19,["758"]],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1",20,["784"]],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1,["79"]],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1",22,["868"]],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1",24,["340"]],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1,["5288","5289"]],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],ea=N.reduce((e,_)=>{const T=_[1];return e[T]=_[2],e},{});var S=(e=>(e.CLOSED="Closed",e.OPEN="Open",e.COMING_SOON="Coming soon",e))(S||{});const o={PERMANENT:"Permanent",TEMPORARY:"Temporary"},A={QOL:"QoL",TASK:"Task"},_a={0:A.QOL,1:A.TASK},ia={0:o.PERMANENT,1:o.TEMPORARY},na={DATE:"date_of_questionnaire",TIME:"time_of_questionnaire"},Ea={TYPE:"type_of_questionnaire"},ta={PERSEED_ADMIN:"PerseedAdmin",ECOSYSTEM_ADMIN:"EcosystemAdmin",USER:"Users",SALE:"Sales"},ra={ADD_PATIENT:"add_patient",ADD_REPEATABLE_CRF:"add_repeat_crf",ADVANCED_FILTER:"advanced_filter",ALL_PATIENT_LIST:"all_patient_list",ALLOW_TO_CONTROL_THESE_PROFILES:"core_control_profile",CONNECTOR_ADD_CP:"connector_add_cp",CONNECTOR_ADD_CRF:"connector_add_crf",CONNECTOR_ADD_FIELD:"connector_add_field",CORE_NOT_ALLOW_ACCESS_SENSITIVE_INFO:"core_not_allow_access_sensitive_info",CORE_NOTIFICATION_LOG:"core_notification_log",CORE_NOTIFICATION_MY_LOG:"core_notification_my_log",DELETE_PATIENT:"delete_patient",FULL_DELETE_PATIENT:"full_delete_patient",DELETE_REPEATABLE_CRF:"delete_crf",EXPORT_ANONYMIZED:"export_anonymized",ENABLE_CP:"enable_cp",EXPORT_MY_HOSPITALS:"export_my_hospitals",EXPORT_NOT_ALLOW_ACCESS_SENSITIVE_INFO:"export_not_allow_access_sensitive_info",EXPORT_USER_TIMESTAMP:"export_user_timestamp",EXPORT_RAW:"export_raw",FILTER_ALL:"filter_all",FILTER_MY_HOSPITALS:"filter_my_hospitals",MANAGE_USERS:"core_manage_user",CORE_PRO_USER_SENSITIVE_INFO:"core_pro_user_sensitive_info",NOTIFICATIONS:"core_notification_seed",ONLY_MY_PATIENTS:"only_my_patients",ONLY_UPDATE_PATIENTS_API:"only_update_patients",PRO_USER:"core_pro_user",USERS_MANAGEMENT_FOR_MY_ORGANIZATIONS:"core_manage_user_hospital",UPLOAD_DOCUMENTS:"add",DELETE_DOCUMENTS:"delete",READ_DOCUMENTS:"read",DISPLAY_PATIENT_LIST:"advanced_patient_list",EXPORT_CONFIGURATION_EXPLICIT_ACCESS:"export_configurations_explicit_access_only",FOLLOWUP_DASHBOARD:"followup_dashboard",TRIGGERS_MANAGEMENT:"triggers_management"},sa=["Etc/GMT+12","Pacific/Midway","Pacific/Honolulu","America/Juneau","America/Dawson","America/Boise","America/Chihuahua","America/Phoenix","America/Chicago","America/Regina","America/Mexico_City","America/Belize","America/Detroit","America/Indiana/Indianapolis","America/Bogota","America/Glace_Bay","America/Caracas","America/Santiago","America/St_Johns","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Godthab","Etc/GMT+2","Atlantic/Azores","Atlantic/Cape_Verde","GMT","Africa/Casablanca","Atlantic/Canary","Europe/Belgrade","Europe/Sarajevo","Europe/Brussels","Europe/Amsterdam","Africa/Algiers","Europe/Bucharest","Africa/Cairo","Europe/Helsinki","Europe/Athens","Asia/Jerusalem","Africa/Harare","Europe/Moscow","Asia/Kuwait","Africa/Nairobi","Asia/Baghdad","Asia/Tehran","Asia/Dubai","Asia/Baku","Asia/Kabul","Asia/Yekaterinburg","Asia/Karachi","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Colombo","Asia/Almaty","Asia/Rangoon","Asia/Bangkok","Asia/Krasnoyarsk","Asia/Shanghai","Asia/Kuala_Lumpur","Asia/Taipei","Australia/Perth","Asia/Irkutsk","Asia/Seoul","Asia/Tokyo","Asia/Yakutsk","Australia/Darwin","Australia/Adelaide","Australia/Sydney","Australia/Brisbane","Australia/Hobart","Asia/Vladivostok","Pacific/Guam","Asia/Magadan","Pacific/Fiji","Pacific/Auckland","Pacific/Tongatapu"],oa=["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","gd","gv","ka","de","el","kl","gn","gu","ht","ha","he","hz","hi","ho","hu","is","io","ig","id","ia","ie","iu","ik","ga","it","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","rn","ky","kv","kg","ko","ku","kj","lo","la","lv","li","ln","lt","lu","lg","lb","gv","mk","mg","ms","ml","mt","mi","mr","mh","mo","mn","na","nv","ng","nd","ne","no","nb","nn","ii","oc","oj","cu","or","om","os","pi","ps","fa","pl","pt","pa","qu","rm","ro","ru","se","sm","sg","sa","sr","sh","st","tn","sn","ii","sd","si","ss","sk","sl","so","nr","es","su","sw","ss","sv","tl","ty","tg","ta","tt","te","th","bo","ti","to","ts","tr","tk","tw","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","ji","yo","za","zu"],Aa=["af_ZA","am_ET","ar_AE","ar_BH","ar_DZ","ar_EG","ar_IQ","ar_JO","ar_KW","ar_LB","ar_LY","ar_MA","arn_CL","ar_OM","ar_QA","ar_SA","ar_SY","ar_TN","ar_YE","as_IN","az_Cyrl_AZ","az_Latn_AZ","ba_RU","be_BY","bg_BG","bn_BD","bn_IN","bo_CN","br_FR","bs_Cyrl_BA","bs_Latn_BA","ca_ES","co_FR","cs_CZ","cy_GB","da_DK","de_AT","de_CH","de_DE","de_LI","de_LU","dsb_DE","dv_MV","el_GR","en_029","en_AU","en_BZ","en_CA","en_GB","en_IE","en_IN","en_JM","en_MY","en_NZ","en_PH","en_SG","en_TT","en_US","en_ZA","en_ZW","es_AR","es_BO","es_CL","es_CO","es_CR","es_DO","es_EC","es_ES","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et_EE","eu_ES","fa_IR","fi_FI","fil_PH","fo_FO","fr_BE","fr_CA","fr_CH","fr_FR","fr_LU","fr_MC","fy_NL","ga_IE","gd_GB","gl_ES","gsw_FR","gu_IN","ha_Latn_NG","he_IL","hi_IN","hr_BA","hr_HR","hsb_DE","hu_HU","hy_AM","id_ID","ig_NG","ii_CN","is_IS","it_CH","it_IT","iu_Cans_CA","iu_Latn_CA","ja_JP","ka_GE","kk_KZ","kl_GL","km_KH","kn_IN","kok_IN","ko_KR","ky_KG","lb_LU","lo_LA","lt_LT","lv_LV","mi_NZ","mk_MK","ml_IN","mn_MN","mn_Mong_CN","moh_CA","mr_IN","ms_BN","ms_MY","mt_MT","nb_NO","ne_NP","nl_BE","nl_NL","nn_NO","nso_ZA","oc_FR","or_IN","pa_IN","pl_PL","prs_AF","ps_AF","pt_BR","pt_PT","qut_GT","quz_BO","quz_EC","quz_PE","rm_CH","ro_RO","ru_RU","rw_RW","sah_RU","sa_IN","se_FI","se_NO","se_SE","si_LK","sk_SK","sl_SI","sma_NO","sma_SE","smj_NO","smj_SE","smn_FI","sms_FI","sq_AL","sr_Cyrl_BA","sr_Cyrl_CS","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn_BA","sr_Latn_CS","sr_Latn_ME","sr_Latn_RS","sv_FI","sv_SE","sw_KE","syr_SY","ta_IN","te_IN","tg_Cyrl_TJ","th_TH","tk_TM","tn_ZA","tr_TR","tt_RU","tzm_Latn_DZ","ug_CN","uk_UA","ur_PK","uz_Cyrl_UZ","uz_Latn_UZ","vi_VN","wo_SN","xh_ZA","yo_NG","zh_CN","zh_HK","zh_MO","zh_SG","zh_TW","zu_ZA","fi_FI"],Ta="forms",la="history";var d=(e=>(e.VALUECARD="ValueCard",e.SECTIONCARD="SectionCard",e.PATIENTLIST="PatientList",e.DASHBOARD="Dashboard",e))(d||{}),c=(e=>(e.OUTCOMES="outcomes",e))(c||{}),R=(e=>(e.QUESTIONNAIRE_CREATE="questionnaire.create",e.CRF_CREATE="crf.create",e.CRF_UPDATE="crf.update",e.CRF_DELETE="crf.delete",e.EXTERNAL_API_CALL="external_api_call",e))(R||{}),m=(e=>(e.JSON_LOGIC="jsonLogic",e.CUSTOM="custom",e))(m||{}),i=(e=>(e.CREATION="creation",e.UPDATE="update",e))(i||{}),O=(e=>(e.TEXT="text",e.DATE="date",e.TIME="time",e.BOOLEAN="boolean",e.NUMBER="number",e.SELECT="select",e.MULTISELECT="multiselect",e.HIDDEN="hidden",e))(O||{});class Ia{constructor(_){this.notified_about=_}crfName(){return this.notified_about.startsWith("crf_")?this.notified_about.split("_")[1]:this.notified_about.startsWith("Patient")?"patient":null}actionTrigger(){return this.notified_about.toLowerCase().endsWith(i.UPDATE)?i.UPDATE:this.notified_about.toLowerCase().endsWith(i.CREATION)?i.CREATION:null}isCrfTrigger(){return this.notified_about===L||this.notified_about.startsWith("crf_")}isModelTrigger(){return this.notified_about.startsWith("model_")}isDisplayerTrigger(){return this.notified_about.startsWith("model_displayer_")}isFieldTrigger(){return!isNaN(parseInt(this.notified_about))}getModelName(){if(this.isModelTrigger()&&!this.isDisplayerTrigger())return this.notified_about.split("_")[1];if(this.isDisplayerTrigger()){const _=this.notified_about.split("_"),T=_[_.length-1];return Object.values(i).includes(T)&&_.pop(),_.slice(2).join("_")}}getModelTriggerAction(){const _=this.getModelName();return _&&this.isDisplayerTrigger()?this.notified_about.replace(`model_displayer_${_}_`,"").replace(`model_displayer_${_}`,""):_&&this.isModelTrigger()?this.notified_about.replace(`model_${_}_`,"").replace(`model_${_}`,""):null}}const L="Patient Creation";var M=(e=>(e[e.START_OVER=0]="START_OVER",e[e.RESUME=1]="RESUME",e))(M||{});a.AUDIT_FLAGS=v,a.ApiAction=R,a.CORE=I,a.ConditionsFormat=m,a.CountryPhoneCodes=ea,a.DATETIME_SHORT_FORMAT=g,a.DATE_FORMAT=n,a.DATE_TYPE=b,a.DEFAULT_CONFIGURATION_PATIENT_LIST=x,a.DYNAMIC_FILE_VALID_FORMATS=$,a.DashboardWidgetType=d,a.DataLoaderType=c,a.EXCLUDE_FIELDS=y,a.Exporter=h,a.FIELDS=r,a.FIELD_NAMES=E,a.FIELD_NAMES_MAP=U,a.FIELD_STATUS=w,a.FIELD_SUFFIX=G,a.FORMS_VIEW=Ta,a.FORM_NAMES=k,a.FORM_SUFFIX=Y,a.FORM_TYPES=l,a.HISTORY=o,a.HISTORY_TYPE_OPTIONS=ia,a.HISTORY_VIEW=la,a.HREF_TYPE=J,a.IntrospectionSchemaFieldType=O,a.LANG_CODES=oa,a.LOCALE_LANG_CODES=Aa,a.META_NAMES=q,a.META_RESTRICTION=j,a.META_STATUS=W,a.MINIMIAL_TIMEZONE_LIST=sa,a.MULTIPLE_SELECTION_SEPARATOR=B,a.MYSQL_DATETIME_FORMAT=P,a.MYSQL_DATE_FORMAT=f,a.NOTIFIED_TYPES=aa,a.NO_FILL_STATUS=V,a.NUMBER_TYPE=p,a.NotifiedAboutInfo=Ia,a.OBJECT_TYPE=F,a.PATIENT_CREATION_ABOUT=L,a.QUESTIONNAIRE_DATE=na,a.QUESTIONNAIRE_TYPE=Ea,a.QUESTIONNAIRE_TYPE_OPTIONS=_a,a.QuestionnaireInfoUpdateMode=M,a.ROLES=ta,a.SEED_PRIVILEGE=ra,a.SELECTOR_TYPE=Q,a.SHORT_TIME_FORMAT=D,a.SLIDER_SCALE_ORIENTATION_TYPE=Z,a.SLIDER_SCALE_TYPE=s,a.SLIDER_SELECTOR_TYPE=X,a.SLIDER_TYPE=t,a.STATUS=S,a.STATUS_FIELD_REGEXP=u,a.STATUS_SUFFIX=H,a.TIME_FORMAT=C,a.TIME_SCHEMA=K,a.TYPE=A,a.TriggerAction=i,a.allCountries=N,a.isNotStatusField=z,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/CreateWidgetPayload",
3
+ "$ref": "#/definitions/CreateDashboardWidgetPayload",
4
4
  "definitions": {
5
- "CreateWidgetPayload": {
5
+ "CreateDashboardWidgetPayload": {
6
6
  "anyOf": [
7
7
  {
8
8
  "type": "object",
@@ -33,6 +33,15 @@
33
33
  "$ref": "#/definitions/ColProps"
34
34
  }
35
35
  ]
36
+ },
37
+ "library": {
38
+ "type": "boolean"
39
+ },
40
+ "widgetsBlocks": {
41
+ "type": "array",
42
+ "items": {
43
+ "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
44
+ }
36
45
  }
37
46
  },
38
47
  "required": ["params", "title", "type"]
@@ -66,6 +75,15 @@
66
75
  "$ref": "#/definitions/ColProps"
67
76
  }
68
77
  ]
78
+ },
79
+ "library": {
80
+ "type": "boolean"
81
+ },
82
+ "widgetsBlocks": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
86
+ }
69
87
  }
70
88
  },
71
89
  "required": ["params", "title", "type"]
@@ -99,6 +117,15 @@
99
117
  "$ref": "#/definitions/ColProps"
100
118
  }
101
119
  ]
120
+ },
121
+ "library": {
122
+ "type": "boolean"
123
+ },
124
+ "widgetsBlocks": {
125
+ "type": "array",
126
+ "items": {
127
+ "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
128
+ }
102
129
  }
103
130
  },
104
131
  "required": ["params", "title", "type"]
@@ -132,6 +159,15 @@
132
159
  "$ref": "#/definitions/ColProps"
133
160
  }
134
161
  ]
162
+ },
163
+ "library": {
164
+ "type": "boolean"
165
+ },
166
+ "widgetsBlocks": {
167
+ "type": "array",
168
+ "items": {
169
+ "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
170
+ }
135
171
  }
136
172
  },
137
173
  "required": ["params", "title", "type"]
@@ -149,42 +185,11 @@
149
185
  },
150
186
  "titleBackground": {
151
187
  "type": "string"
152
- },
153
- "title": {
154
- "$ref": "#/definitions/I18nTextTranslation"
155
- },
156
- "widgets": {
157
- "type": "array",
158
- "items": {
159
- "type": "number"
160
- }
161
188
  }
162
189
  },
163
- "required": ["icon", "title", "widgets"],
190
+ "required": ["icon"],
164
191
  "additionalProperties": false
165
192
  },
166
- "I18nTextTranslation": {
167
- "anyOf": [
168
- {
169
- "$ref": "#/definitions/I18nTextLocales"
170
- },
171
- {
172
- "type": "string"
173
- }
174
- ]
175
- },
176
- "I18nTextLocales": {
177
- "type": "object",
178
- "properties": {
179
- "default": {
180
- "type": "string"
181
- }
182
- },
183
- "required": ["default"],
184
- "additionalProperties": {
185
- "type": "string"
186
- }
187
- },
188
193
  "ColProps": {
189
194
  "type": "object",
190
195
  "properties": {
@@ -317,12 +322,44 @@
317
322
  },
318
323
  "additionalProperties": false
319
324
  },
320
- "ValueCardProps": {
325
+ "DashboardWidgetBlockCreatePayload": {
321
326
  "type": "object",
322
327
  "properties": {
323
- "title": {
324
- "$ref": "#/definitions/I18nTextTranslation"
328
+ "parent_id": {
329
+ "type": ["number", "string"]
330
+ },
331
+ "child_id": {
332
+ "type": "number"
325
333
  },
334
+ "position": {
335
+ "type": "number"
336
+ },
337
+ "config": {
338
+ "$ref": "#/definitions/WidgetBlockConfig"
339
+ }
340
+ },
341
+ "required": ["parent_id", "child_id", "position"],
342
+ "additionalProperties": false
343
+ },
344
+ "WidgetBlockConfig": {
345
+ "type": "object",
346
+ "properties": {
347
+ "size": {
348
+ "anyOf": [
349
+ {
350
+ "type": "number"
351
+ },
352
+ {
353
+ "$ref": "#/definitions/ColProps"
354
+ }
355
+ ]
356
+ }
357
+ },
358
+ "additionalProperties": false
359
+ },
360
+ "ValueCardProps": {
361
+ "type": "object",
362
+ "properties": {
326
363
  "icon": {
327
364
  "type": "string"
328
365
  },
@@ -342,13 +379,35 @@
342
379
  "type": "object"
343
380
  },
344
381
  "dataLoader": {
345
- "$ref": "#/definitions/WidgetDataLoader%3CWidgetOutcomesDataLoader%3E"
382
+ "$ref": "#/definitions/DashboardWidgetDataLoader%3CWidgetOutcomesDataLoader%3E"
346
383
  }
347
384
  },
348
- "required": ["title", "icon", "text"],
385
+ "required": ["icon", "text"],
349
386
  "additionalProperties": false
350
387
  },
351
- "WidgetDataLoader<WidgetOutcomesDataLoader>": {
388
+ "I18nTextTranslation": {
389
+ "anyOf": [
390
+ {
391
+ "$ref": "#/definitions/I18nTextLocales"
392
+ },
393
+ {
394
+ "type": "string"
395
+ }
396
+ ]
397
+ },
398
+ "I18nTextLocales": {
399
+ "type": "object",
400
+ "properties": {
401
+ "default": {
402
+ "type": "string"
403
+ }
404
+ },
405
+ "required": ["default"],
406
+ "additionalProperties": {
407
+ "type": "string"
408
+ }
409
+ },
410
+ "DashboardWidgetDataLoader<WidgetOutcomesDataLoader>": {
352
411
  "type": "object",
353
412
  "properties": {
354
413
  "type": {
@@ -563,21 +622,14 @@
563
622
  "DashboardProps": {
564
623
  "type": "object",
565
624
  "properties": {
566
- "title": {
567
- "type": "string"
568
- },
569
625
  "active": {
570
626
  "type": "boolean"
571
627
  },
572
628
  "config": {},
573
629
  "icon": {
574
630
  "type": ["string", "null"]
575
- },
576
- "weight": {
577
- "type": "number"
578
631
  }
579
632
  },
580
- "required": ["title"],
581
633
  "additionalProperties": false
582
634
  }
583
635
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/UpdateWidgetPayload",
3
+ "$ref": "#/definitions/UpdateDashboardWidgetPayload",
4
4
  "definitions": {
5
- "UpdateWidgetPayload": {
5
+ "UpdateDashboardWidgetPayload": {
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "title": {
@@ -24,6 +24,15 @@
24
24
  }
25
25
  ]
26
26
  },
27
+ "library": {
28
+ "type": "boolean"
29
+ },
30
+ "widgetsBlocks": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
34
+ }
35
+ },
27
36
  "type": {
28
37
  "anyOf": [
29
38
  {
@@ -195,59 +204,60 @@
195
204
  },
196
205
  "additionalProperties": false
197
206
  },
198
- "SectionCardProps": {
207
+ "DashboardWidgetBlockCreatePayload": {
199
208
  "type": "object",
200
209
  "properties": {
201
- "icon": {
202
- "type": "string"
203
- },
204
- "background": {
205
- "type": "string"
210
+ "parent_id": {
211
+ "type": ["number", "string"]
206
212
  },
207
- "titleBackground": {
208
- "type": "string"
213
+ "child_id": {
214
+ "type": "number"
209
215
  },
210
- "title": {
211
- "$ref": "#/definitions/I18nTextTranslation"
216
+ "position": {
217
+ "type": "number"
212
218
  },
213
- "widgets": {
214
- "type": "array",
215
- "items": {
216
- "type": "number"
217
- }
219
+ "config": {
220
+ "$ref": "#/definitions/WidgetBlockConfig"
218
221
  }
219
222
  },
220
- "required": ["icon", "title", "widgets"],
223
+ "required": ["parent_id", "child_id", "position"],
221
224
  "additionalProperties": false
222
225
  },
223
- "I18nTextTranslation": {
224
- "anyOf": [
225
- {
226
- "$ref": "#/definitions/I18nTextLocales"
227
- },
228
- {
229
- "type": "string"
226
+ "WidgetBlockConfig": {
227
+ "type": "object",
228
+ "properties": {
229
+ "size": {
230
+ "anyOf": [
231
+ {
232
+ "type": "number"
233
+ },
234
+ {
235
+ "$ref": "#/definitions/ColProps"
236
+ }
237
+ ]
230
238
  }
231
- ]
239
+ },
240
+ "additionalProperties": false
232
241
  },
233
- "I18nTextLocales": {
242
+ "SectionCardProps": {
234
243
  "type": "object",
235
244
  "properties": {
236
- "default": {
245
+ "icon": {
246
+ "type": "string"
247
+ },
248
+ "background": {
249
+ "type": "string"
250
+ },
251
+ "titleBackground": {
237
252
  "type": "string"
238
253
  }
239
254
  },
240
- "required": ["default"],
241
- "additionalProperties": {
242
- "type": "string"
243
- }
255
+ "required": ["icon"],
256
+ "additionalProperties": false
244
257
  },
245
258
  "ValueCardProps": {
246
259
  "type": "object",
247
260
  "properties": {
248
- "title": {
249
- "$ref": "#/definitions/I18nTextTranslation"
250
- },
251
261
  "icon": {
252
262
  "type": "string"
253
263
  },
@@ -267,13 +277,35 @@
267
277
  "type": "object"
268
278
  },
269
279
  "dataLoader": {
270
- "$ref": "#/definitions/WidgetDataLoader%3CWidgetOutcomesDataLoader%3E"
280
+ "$ref": "#/definitions/DashboardWidgetDataLoader%3CWidgetOutcomesDataLoader%3E"
271
281
  }
272
282
  },
273
- "required": ["title", "icon", "text"],
283
+ "required": ["icon", "text"],
274
284
  "additionalProperties": false
275
285
  },
276
- "WidgetDataLoader<WidgetOutcomesDataLoader>": {
286
+ "I18nTextTranslation": {
287
+ "anyOf": [
288
+ {
289
+ "$ref": "#/definitions/I18nTextLocales"
290
+ },
291
+ {
292
+ "type": "string"
293
+ }
294
+ ]
295
+ },
296
+ "I18nTextLocales": {
297
+ "type": "object",
298
+ "properties": {
299
+ "default": {
300
+ "type": "string"
301
+ }
302
+ },
303
+ "required": ["default"],
304
+ "additionalProperties": {
305
+ "type": "string"
306
+ }
307
+ },
308
+ "DashboardWidgetDataLoader<WidgetOutcomesDataLoader>": {
277
309
  "type": "object",
278
310
  "properties": {
279
311
  "type": {
@@ -488,21 +520,14 @@
488
520
  "DashboardProps": {
489
521
  "type": "object",
490
522
  "properties": {
491
- "title": {
492
- "type": "string"
493
- },
494
523
  "active": {
495
524
  "type": "boolean"
496
525
  },
497
526
  "config": {},
498
527
  "icon": {
499
528
  "type": ["string", "null"]
500
- },
501
- "weight": {
502
- "type": "number"
503
529
  }
504
530
  },
505
- "required": ["title"],
506
531
  "additionalProperties": false
507
532
  }
508
533
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persei/perseed-api",
3
- "version": "4.34.16",
3
+ "version": "4.34.18",
4
4
  "private": false,
5
5
  "main": "./dist/perseed-api.umd.js",
6
6
  "module": "./dist/perseed-api.mjs",
@@ -9,7 +9,7 @@
9
9
  "dist"
10
10
  ],
11
11
  "scripts": {
12
- "publish_package": "npm run precommit && npm run build && npm publish",
12
+ "_prepare": "npm run precommit && npm run build",
13
13
  "build": "tsc --noEmit && vite build",
14
14
  "start": "ts-node src/server.ts",
15
15
  "lint": "npm run test:lint",