@persei/perseed-api 4.34.7 → 4.34.9

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
@@ -718,6 +718,7 @@ export declare const FORM_SUFFIX: {
718
718
  };
719
719
 
720
720
  export declare enum FORM_TYPES {
721
+ STATIC = 0,
721
722
  STANDARD = 1,
722
723
  FOLLOW_UP = 2,
723
724
  ADVERSE_EVENT = 3,
@@ -794,7 +795,7 @@ export declare enum IntrospectionSchemaType {
794
795
 
795
796
  export declare const isNotStatusField: (fieldName: any) => boolean;
796
797
 
797
- declare interface LoadPatientDataType {
798
+ export declare interface LoadPatientDataType {
798
799
  join?: string[];
799
800
  where: Record<string, string> | 'auto';
800
801
  }
@@ -891,7 +892,7 @@ export declare interface MFAMethod {
891
892
  */
892
893
  export declare type MFAMethodCode = 'sms' | 'email';
893
894
 
894
- declare type ModelName = string;
895
+ export declare type ModelName = string;
895
896
 
896
897
  export declare const MULTIPLE_SELECTION_SEPARATOR = "~";
897
898
 
@@ -1,4 +1,4 @@
1
- const d = "YYYY-MM-DD", b = "HH:mm:ss", F = "HH:mm", P = "YYYY-MM-DD HH:mm", y = d, w = "YYYY-MM-DD HH:mm:ss", n = {
1
+ const d = "YYYY-MM-DD", b = "HH:mm:ss", F = "HH:mm", y = "YYYY-MM-DD HH:mm", P = d, w = "YYYY-MM-DD HH:mm:ss", n = {
2
2
  DECIMAL: 1,
3
3
  INTEGER: 2,
4
4
  MULTIPLE_SELECTION: 3,
@@ -49,7 +49,7 @@ const d = "YYYY-MM-DD", b = "HH:mm:ss", F = "HH:mm", P = "YYYY-MM-DD HH:mm", y =
49
49
  PARAGRAPH_NAME: "paragraph",
50
50
  FILE_NAME: "file"
51
51
  };
52
- var p = /* @__PURE__ */ ((e) => (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))(p || {});
52
+ var p = /* @__PURE__ */ ((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))(p || {});
53
53
  const g = () => {
54
54
  let e = {};
55
55
  return Object.keys(n).forEach((a) => {
@@ -270,7 +270,7 @@ const g = () => {
270
270
  }
271
271
  ];
272
272
  var A = /* @__PURE__ */ ((e) => (e.OUTCOMES = "outcomes", e))(A || {}), I = /* @__PURE__ */ ((e) => (e.VALUECARD = "ValueCard", e.SECTIONCARD = "SectionCard", e.PATIENTLIST = "PatientList", e))(I || {}), N = /* @__PURE__ */ ((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))(N || {}), u = /* @__PURE__ */ ((e) => (e.JSON_LOGIC = "jsonLogic", e.CUSTOM = "custom", e))(u || {}), R = /* @__PURE__ */ ((e) => (e.CREATION = "creation", e.UPDATE = "update", e))(R || {}), s = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.DATE = "date", e.TIME = "time", e.BOOLEAN = "boolean", e.NUMBER = "number", e.SELECT = "select", e.MULTISELECT = "multiselect", e))(s || {});
273
- const S = {}, O = {}, L = {}, D = {}, M = {
273
+ const S = {}, O = {}, L = {}, D = {}, U = {
274
274
  hostName: "mysql",
275
275
  ecosystem: {
276
276
  demo: {
@@ -377,14 +377,14 @@ const S = {}, O = {}, L = {}, D = {}, M = {
377
377
  deviceId: "ecoadmin@api"
378
378
  }
379
379
  }
380
- }, U = {}, _ = {};
380
+ }, M = {}, _ = {};
381
381
  let c;
382
382
  _.existsSync("./credentials/local.json") && (c = JSON.parse(_.readFileSync("./credentials/local.json").toString()));
383
383
  const C = {
384
384
  local: c || S,
385
385
  local_tmp: O,
386
- test: M,
387
- testing: U,
386
+ test: U,
387
+ testing: M,
388
388
  preproduction: L,
389
389
  production: D
390
390
  };
@@ -549,7 +549,7 @@ export {
549
549
  N as ApiAction,
550
550
  m as CORE,
551
551
  u as ConditionsFormat,
552
- P as DATETIME_SHORT_FORMAT,
552
+ y as DATETIME_SHORT_FORMAT,
553
553
  d as DATE_FORMAT,
554
554
  H as DATE_TYPE,
555
555
  re as DEFAULT_CONFIGURATION_PATIENT_LIST,
@@ -572,7 +572,7 @@ export {
572
572
  $ as META_STATUS,
573
573
  q as MULTIPLE_SELECTION_SEPARATOR,
574
574
  w as MYSQL_DATETIME_FORMAT,
575
- y as MYSQL_DATE_FORMAT,
575
+ P as MYSQL_DATE_FORMAT,
576
576
  j as NO_FILL_STATUS,
577
577
  Y as NUMBER_TYPE,
578
578
  B as OBJECT_TYPE,
@@ -1 +1 @@
1
- (function(a,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(a=typeof globalThis<"u"?globalThis:a||self,E(a["perseed-api"]={}))})(this,function(a){"use strict";const E="YYYY-MM-DD",R="HH:mm:ss",L="HH:mm",O="YYYY-MM-DD HH:mm",D=E,M="YYYY-MM-DD HH:mm:ss",o={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},t={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 c=(e=>(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))(c||{});const U=()=>{let e={};return Object.keys(o).forEach(n=>{e={...e,[o[n]]:t[`${n}_NAME`]}}),e},C=["number",t.DECIMAL_NAME,t.INTEGER_NAME],F=["date"],f=["object",t.SCAN_CODE_NAME],T={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"},h=Object.values(T),v={added:"A",edited:"E",deleted:"D"},P={PATIENT:"patient",SEPARATOR:"_"},b={AUDIT:"audit"},y="~",g="_status",Y="_status",w={filled:"filled",unk:"UNK",na:"NA",nd:"ND"},d=/^[0-9a-f]{33}_status$/,H=function(e){return!d.test(e)},B=["UNK","NA","ND"],X="^[0-1][0-9]:[0-5][0-9]$|^[0-2][0-3]:[0-5][0-9]$",G={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"},V={STRICT:"strict",FLEXIBLE:"flexible"},k={ACTIVE:"1"},q={SLIDER:"slider",DROPDOWN:"dropdown",RADIO_BUTTON:"radio_button",CHECK_BOX:"check_box"},i={STARS:"0",SCALE_RATING:"1",IMAGES:"2"},Q={[i.STARS]:"stars",[i.SCALE_RATING]:"scale",[i.IMAGES]:"images"},_={HORIZONTAL:"0",VERTICAL:"1"},W={[_.HORIZONTAL]:"horizontal",[_.VERTICAL]:"vertical"},K={NEW_WINDOW:"newwindow",EMBEDDED_HTML:"embeddedhtml"},j={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"]},z=[{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"}];var l=(e=>(e.OUTCOMES="outcomes",e))(l||{}),A=(e=>(e.VALUECARD="ValueCard",e.SECTIONCARD="SectionCard",e.PATIENTLIST="PatientList",e))(A||{}),p=(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))(p||{}),m=(e=>(e.JSON_LOGIC="jsonLogic",e.CUSTOM="custom",e))(m||{}),I=(e=>(e.CREATION="creation",e.UPDATE="update",e))(I||{}),s=(e=>(e.TEXT="text",e.DATE="date",e.TIME="time",e.BOOLEAN="boolean",e.NUMBER="number",e.SELECT="select",e.MULTISELECT="multiselect",e))(s||{});const J={},Z={},$={},x={},ee={hostName:"mysql",ecosystem:{demo:{userLogin:{username:"admin",password:"Sebas3210",deviceId:"abc123",api:!0}},reseaarch:{userLogin:{username:"testapi2",password:"123456",deviceId:"abc123",api:!0}},caaring:{userLogin:{username:"root",password:"pass4mike",deviceId:"abc123",api:!0}},ecoapi:{userLogin:{username:"root",password:"123456",deviceId:"abc123",api:!0}},clinicaal:{},clitinerary:{}},global:{dbCredentials:{username:"root",password:"root",database:"perseed"}},rabbitOptions:{protocol:"amqp",hostname:"localhost",port:5672,username:"perseedweb00-dev",password:"Z8rLHAkw",locale:"en_US",frameMax:0,heartbeat:0,vhost:"/"},AWS:{accessKeyId:"AKIA4Z2DUBRURKXKII5S",secretAccessKey:"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",apiVersion:"latest",tmpPath:"tmp/",bucket:{name:"testing.perseed-files-eu",region:"eu-central-1"},cloudFront:{keypairId:"K1BWQQVLE4YU4F",privateKeyPath:"/var/www/perseed_api/config/private_key.pem",assetsUrl:"https://test.assets.perseed.eu"}},SMS:{apiKey:"4|XildLvmjqzABeekAgj9EaLiwpxdGMWgassPaxewu",defaultSender:"Caaring"},perseedAPI:{caaring:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2@",deviceId:"ecoadmin@api"},clinicaal:{username:"perseedapiCLI",password:"Ukz4s7LL&Ne3KA#",deviceId:"ecoadmin@api"},onqos:{username:"perseedapiCLI",password:"Ukz4s7LL&Ne3KA#",deviceId:"ecoadmin@api"},demo:{username:"admin",password:"Sebas3210",deviceId:"admin@api"},reseaarch:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2@",deviceId:"ecoadmin@api"},testrcr:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2",deviceId:"ecoadmin@api"}}},ae={},N={};let S;N.existsSync("./credentials/local.json")&&(S=JSON.parse(N.readFileSync("./credentials/local.json").toString()));const se={local:S||J,local_tmp:Z,test:ee,testing:ae,preproduction:$,production:x};function Ee(e){return e.replace(/\/$/,"")}const te=process.env.NODE_ENV||"local";process.env.PROXY_FILES,Ee(process.env.API_BASE_URL||"https://api.perseed.eu"),process.env.JWT_SECRET,process.env.REFRESH_JWT_SECRET,process.env.JWT_ISSUERS,process.env.FULL_LOG,(process.env.CSP_FRAME_ANCESTORS||"https://tmp.perseed.eu,https://tmp.api.perseed.eu,https://perseed.eu,https://api.perseed.eu,https://perseed.test,https://app.caaring.com,https://app.clinicaal.com,https://app.onqos.com,https://app.reseaarch.com,https://app.clitinerary.com").split(","),process.env.ZERO_DATES_SUPPORT,process.env.DEBUG_ERRORS?process.env.DEBUG_ERRORS:process.env.NODE_ENV,process.env.DEFAULT_TZ,process.env.SENTRY_DSN,parseInt(process.env.JOB_RETRIES??"5"),process.env.BODY_SIZE_LIMIT;const r=se[te].externalApis;function ne(e){const n={models:{user:{label:e("introspection-schema.models.user.label","User"),relations:[],canJoinPatient:!0,fields:[{name:"username",type:s.TEXT,label:e("introspection-schema.models.user.username","Username")},{name:"created_user",type:s.TEXT,label:e("introspection-schema.models.user.created_user","Created user")},{name:"created_mode",type:s.TEXT,label:e("introspection-schema.models.user.created_mode","Created mode")},{name:"mod_user",type:s.NUMBER,label:e("introspection-schema.models.user.mod_user","User modified")},{name:"mod_time",type:s.DATE,label:e("introspection-schema.models.user.time","Update date")},{name:"email",type:s.TEXT,label:e("introspection-schema.models.user.email","Email")},{name:"password",type:s.TEXT,label:e("introspection-schema.models.user.password","Password")},{name:"displayName",type:s.TEXT,label:e("introspection-schema.models.user.display-name","Display name")},{name:"blocked",type:s.BOOLEAN,label:e("introspection-schema.models.user.blocked","Blocked")},{name:"timestamp",type:s.DATE,label:e("introspection-schema.models.user.timestamp","Creation date")},{name:"state",type:s.BOOLEAN,label:e("introspection-schema.models.user.state","State")},{name:"newRegister",type:s.BOOLEAN,label:e("introspection-schema.models.user.new-register","New register")},{name:"password_changed_date",type:s.DATE,label:e("introspection-schema.models.user.password-changed-date","Password changed date")},{name:"token",type:s.TEXT,label:e("introspection-schema.models.user.token","Token")},{name:"type",type:s.TEXT,label:e("introspection-schema.models.user.type","Type")},{name:"expiry_date",type:s.DATE,label:e("introspection-schema.models.user.expiry-date","Expiry date")},{name:"allow_upload",type:s.BOOLEAN,label:e("introspection-schema.models.user.allow-upload","Allow upload")},{name:"allow_change_color",type:s.BOOLEAN,label:e("introspection-schema.models.user.allow-change-color","Allow change color")},{name:"clinic_request",type:s.BOOLEAN,label:e("introspection-schema.models.user.clinic-request","Clinic request")},{name:"favourite",type:s.BOOLEAN,label:e("introspection-schema.models.user.favourite","Favourite")},{name:"last_access",type:s.DATE,label:e("introspection-schema.models.user.last-access","Last access")},{name:"temporary_password",type:s.TEXT,label:e("introspection-schema.models.user.temporary-password","Temporary password")},{name:"currentFailedCount",type:s.NUMBER,label:e("introspection-schema.models.user.current-failed-count","Current failed count")},{name:"tokenDate",type:s.DATE,label:e("introspection-schema.models.user.token-date","Token date")}]}}};return r&&Object.keys(r).length&&(n.externalApis=Object.entries(r).map(([ie,u])=>({value:ie,label:u.label,methods:u.method}))),n}a.AUDIT_FLAGS=v,a.ApiAction=p,a.CORE=T,a.ConditionsFormat=m,a.DATETIME_SHORT_FORMAT=O,a.DATE_FORMAT=E,a.DATE_TYPE=F,a.DEFAULT_CONFIGURATION_PATIENT_LIST=z,a.DYNAMIC_FILE_VALID_FORMATS=j,a.DashboardWidgetType=A,a.DataLoaderType=l,a.EXCLUDE_FIELDS=h,a.FIELDS=o,a.FIELD_NAMES=t,a.FIELD_NAMES_MAP=U,a.FIELD_STATUS=w,a.FIELD_SUFFIX=g,a.FORM_NAMES=P,a.FORM_SUFFIX=b,a.FORM_TYPES=c,a.HREF_TYPE=K,a.IntrospectionSchemaType=s,a.META_NAMES=G,a.META_RESTRICTION=V,a.META_STATUS=k,a.MULTIPLE_SELECTION_SEPARATOR=y,a.MYSQL_DATETIME_FORMAT=M,a.MYSQL_DATE_FORMAT=D,a.NO_FILL_STATUS=B,a.NUMBER_TYPE=C,a.OBJECT_TYPE=f,a.SELECTOR_TYPE=q,a.SHORT_TIME_FORMAT=L,a.SLIDER_SCALE_ORIENTATION_TYPE=W,a.SLIDER_SCALE_TYPE=_,a.SLIDER_SELECTOR_TYPE=Q,a.SLIDER_TYPE=i,a.STATUS_FIELD_REGEXP=d,a.STATUS_SUFFIX=Y,a.TIME_FORMAT=R,a.TIME_SCHEMA=X,a.TriggerAction=I,a.getIntrospectionSchema=ne,a.isNotStatusField=H,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
1
+ (function(a,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(a=typeof globalThis<"u"?globalThis:a||self,E(a["perseed-api"]={}))})(this,function(a){"use strict";const E="YYYY-MM-DD",R="HH:mm:ss",L="HH:mm",O="YYYY-MM-DD HH:mm",D=E,M="YYYY-MM-DD HH:mm:ss",o={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},t={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 c=(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))(c||{});const U=()=>{let e={};return Object.keys(o).forEach(n=>{e={...e,[o[n]]:t[`${n}_NAME`]}}),e},C=["number",t.DECIMAL_NAME,t.INTEGER_NAME],F=["date"],f=["object",t.SCAN_CODE_NAME],T={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"},h=Object.values(T),v={added:"A",edited:"E",deleted:"D"},P={PATIENT:"patient",SEPARATOR:"_"},b={AUDIT:"audit"},y="~",g="_status",Y="_status",w={filled:"filled",unk:"UNK",na:"NA",nd:"ND"},d=/^[0-9a-f]{33}_status$/,H=function(e){return!d.test(e)},B=["UNK","NA","ND"],X="^[0-1][0-9]:[0-5][0-9]$|^[0-2][0-3]:[0-5][0-9]$",G={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"},V={STRICT:"strict",FLEXIBLE:"flexible"},k={ACTIVE:"1"},q={SLIDER:"slider",DROPDOWN:"dropdown",RADIO_BUTTON:"radio_button",CHECK_BOX:"check_box"},i={STARS:"0",SCALE_RATING:"1",IMAGES:"2"},Q={[i.STARS]:"stars",[i.SCALE_RATING]:"scale",[i.IMAGES]:"images"},_={HORIZONTAL:"0",VERTICAL:"1"},W={[_.HORIZONTAL]:"horizontal",[_.VERTICAL]:"vertical"},K={NEW_WINDOW:"newwindow",EMBEDDED_HTML:"embeddedhtml"},j={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"]},z=[{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"}];var l=(e=>(e.OUTCOMES="outcomes",e))(l||{}),A=(e=>(e.VALUECARD="ValueCard",e.SECTIONCARD="SectionCard",e.PATIENTLIST="PatientList",e))(A||{}),p=(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))(p||{}),I=(e=>(e.JSON_LOGIC="jsonLogic",e.CUSTOM="custom",e))(I||{}),m=(e=>(e.CREATION="creation",e.UPDATE="update",e))(m||{}),s=(e=>(e.TEXT="text",e.DATE="date",e.TIME="time",e.BOOLEAN="boolean",e.NUMBER="number",e.SELECT="select",e.MULTISELECT="multiselect",e))(s||{});const J={},Z={},$={},x={},ee={hostName:"mysql",ecosystem:{demo:{userLogin:{username:"admin",password:"Sebas3210",deviceId:"abc123",api:!0}},reseaarch:{userLogin:{username:"testapi2",password:"123456",deviceId:"abc123",api:!0}},caaring:{userLogin:{username:"root",password:"pass4mike",deviceId:"abc123",api:!0}},ecoapi:{userLogin:{username:"root",password:"123456",deviceId:"abc123",api:!0}},clinicaal:{},clitinerary:{}},global:{dbCredentials:{username:"root",password:"root",database:"perseed"}},rabbitOptions:{protocol:"amqp",hostname:"localhost",port:5672,username:"perseedweb00-dev",password:"Z8rLHAkw",locale:"en_US",frameMax:0,heartbeat:0,vhost:"/"},AWS:{accessKeyId:"AKIA4Z2DUBRURKXKII5S",secretAccessKey:"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",apiVersion:"latest",tmpPath:"tmp/",bucket:{name:"testing.perseed-files-eu",region:"eu-central-1"},cloudFront:{keypairId:"K1BWQQVLE4YU4F",privateKeyPath:"/var/www/perseed_api/config/private_key.pem",assetsUrl:"https://test.assets.perseed.eu"}},SMS:{apiKey:"4|XildLvmjqzABeekAgj9EaLiwpxdGMWgassPaxewu",defaultSender:"Caaring"},perseedAPI:{caaring:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2@",deviceId:"ecoadmin@api"},clinicaal:{username:"perseedapiCLI",password:"Ukz4s7LL&Ne3KA#",deviceId:"ecoadmin@api"},onqos:{username:"perseedapiCLI",password:"Ukz4s7LL&Ne3KA#",deviceId:"ecoadmin@api"},demo:{username:"admin",password:"Sebas3210",deviceId:"admin@api"},reseaarch:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2@",deviceId:"ecoadmin@api"},testrcr:{username:"ecoadmin",password:"1CarefulWithPersonalInfo2",deviceId:"ecoadmin@api"}}},ae={},N={};let S;N.existsSync("./credentials/local.json")&&(S=JSON.parse(N.readFileSync("./credentials/local.json").toString()));const se={local:S||J,local_tmp:Z,test:ee,testing:ae,preproduction:$,production:x};function Ee(e){return e.replace(/\/$/,"")}const te=process.env.NODE_ENV||"local";process.env.PROXY_FILES,Ee(process.env.API_BASE_URL||"https://api.perseed.eu"),process.env.JWT_SECRET,process.env.REFRESH_JWT_SECRET,process.env.JWT_ISSUERS,process.env.FULL_LOG,(process.env.CSP_FRAME_ANCESTORS||"https://tmp.perseed.eu,https://tmp.api.perseed.eu,https://perseed.eu,https://api.perseed.eu,https://perseed.test,https://app.caaring.com,https://app.clinicaal.com,https://app.onqos.com,https://app.reseaarch.com,https://app.clitinerary.com").split(","),process.env.ZERO_DATES_SUPPORT,process.env.DEBUG_ERRORS?process.env.DEBUG_ERRORS:process.env.NODE_ENV,process.env.DEFAULT_TZ,process.env.SENTRY_DSN,parseInt(process.env.JOB_RETRIES??"5"),process.env.BODY_SIZE_LIMIT;const r=se[te].externalApis;function ne(e){const n={models:{user:{label:e("introspection-schema.models.user.label","User"),relations:[],canJoinPatient:!0,fields:[{name:"username",type:s.TEXT,label:e("introspection-schema.models.user.username","Username")},{name:"created_user",type:s.TEXT,label:e("introspection-schema.models.user.created_user","Created user")},{name:"created_mode",type:s.TEXT,label:e("introspection-schema.models.user.created_mode","Created mode")},{name:"mod_user",type:s.NUMBER,label:e("introspection-schema.models.user.mod_user","User modified")},{name:"mod_time",type:s.DATE,label:e("introspection-schema.models.user.time","Update date")},{name:"email",type:s.TEXT,label:e("introspection-schema.models.user.email","Email")},{name:"password",type:s.TEXT,label:e("introspection-schema.models.user.password","Password")},{name:"displayName",type:s.TEXT,label:e("introspection-schema.models.user.display-name","Display name")},{name:"blocked",type:s.BOOLEAN,label:e("introspection-schema.models.user.blocked","Blocked")},{name:"timestamp",type:s.DATE,label:e("introspection-schema.models.user.timestamp","Creation date")},{name:"state",type:s.BOOLEAN,label:e("introspection-schema.models.user.state","State")},{name:"newRegister",type:s.BOOLEAN,label:e("introspection-schema.models.user.new-register","New register")},{name:"password_changed_date",type:s.DATE,label:e("introspection-schema.models.user.password-changed-date","Password changed date")},{name:"token",type:s.TEXT,label:e("introspection-schema.models.user.token","Token")},{name:"type",type:s.TEXT,label:e("introspection-schema.models.user.type","Type")},{name:"expiry_date",type:s.DATE,label:e("introspection-schema.models.user.expiry-date","Expiry date")},{name:"allow_upload",type:s.BOOLEAN,label:e("introspection-schema.models.user.allow-upload","Allow upload")},{name:"allow_change_color",type:s.BOOLEAN,label:e("introspection-schema.models.user.allow-change-color","Allow change color")},{name:"clinic_request",type:s.BOOLEAN,label:e("introspection-schema.models.user.clinic-request","Clinic request")},{name:"favourite",type:s.BOOLEAN,label:e("introspection-schema.models.user.favourite","Favourite")},{name:"last_access",type:s.DATE,label:e("introspection-schema.models.user.last-access","Last access")},{name:"temporary_password",type:s.TEXT,label:e("introspection-schema.models.user.temporary-password","Temporary password")},{name:"currentFailedCount",type:s.NUMBER,label:e("introspection-schema.models.user.current-failed-count","Current failed count")},{name:"tokenDate",type:s.DATE,label:e("introspection-schema.models.user.token-date","Token date")}]}}};return r&&Object.keys(r).length&&(n.externalApis=Object.entries(r).map(([ie,u])=>({value:ie,label:u.label,methods:u.method}))),n}a.AUDIT_FLAGS=v,a.ApiAction=p,a.CORE=T,a.ConditionsFormat=I,a.DATETIME_SHORT_FORMAT=O,a.DATE_FORMAT=E,a.DATE_TYPE=F,a.DEFAULT_CONFIGURATION_PATIENT_LIST=z,a.DYNAMIC_FILE_VALID_FORMATS=j,a.DashboardWidgetType=A,a.DataLoaderType=l,a.EXCLUDE_FIELDS=h,a.FIELDS=o,a.FIELD_NAMES=t,a.FIELD_NAMES_MAP=U,a.FIELD_STATUS=w,a.FIELD_SUFFIX=g,a.FORM_NAMES=P,a.FORM_SUFFIX=b,a.FORM_TYPES=c,a.HREF_TYPE=K,a.IntrospectionSchemaType=s,a.META_NAMES=G,a.META_RESTRICTION=V,a.META_STATUS=k,a.MULTIPLE_SELECTION_SEPARATOR=y,a.MYSQL_DATETIME_FORMAT=M,a.MYSQL_DATE_FORMAT=D,a.NO_FILL_STATUS=B,a.NUMBER_TYPE=C,a.OBJECT_TYPE=f,a.SELECTOR_TYPE=q,a.SHORT_TIME_FORMAT=L,a.SLIDER_SCALE_ORIENTATION_TYPE=W,a.SLIDER_SCALE_TYPE=_,a.SLIDER_SELECTOR_TYPE=Q,a.SLIDER_TYPE=i,a.STATUS_FIELD_REGEXP=d,a.STATUS_SUFFIX=Y,a.TIME_FORMAT=R,a.TIME_SCHEMA=X,a.TriggerAction=m,a.getIntrospectionSchema=ne,a.isNotStatusField=H,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
@@ -34,31 +34,7 @@
34
34
  }
35
35
  },
36
36
  "load_patient": {
37
- "type": "object",
38
- "properties": {
39
- "join": {
40
- "type": "array",
41
- "items": {
42
- "type": "string"
43
- }
44
- },
45
- "where": {
46
- "anyOf": [
47
- {
48
- "type": "object",
49
- "additionalProperties": {
50
- "type": "string"
51
- }
52
- },
53
- {
54
- "type": "string",
55
- "const": "auto"
56
- }
57
- ]
58
- }
59
- },
60
- "required": ["where"],
61
- "additionalProperties": false
37
+ "$ref": "#/definitions/LoadPatientDataType"
62
38
  },
63
39
  "action": {
64
40
  "$ref": "#/definitions/ApiAction"
@@ -158,6 +134,33 @@
158
134
  },
159
135
  "additionalProperties": false
160
136
  },
137
+ "LoadPatientDataType": {
138
+ "type": "object",
139
+ "properties": {
140
+ "join": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ "where": {
147
+ "anyOf": [
148
+ {
149
+ "type": "object",
150
+ "additionalProperties": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ {
155
+ "type": "string",
156
+ "const": "auto"
157
+ }
158
+ ]
159
+ }
160
+ },
161
+ "required": ["where"],
162
+ "additionalProperties": false
163
+ },
161
164
  "ApiAction": {
162
165
  "type": "string",
163
166
  "enum": ["questionnaire.create", "crf.create", "crf.update", "crf.delete", "external_api_call"]
@@ -33,31 +33,7 @@
33
33
  }
34
34
  },
35
35
  "load_patient": {
36
- "type": "object",
37
- "properties": {
38
- "join": {
39
- "type": "array",
40
- "items": {
41
- "type": "string"
42
- }
43
- },
44
- "where": {
45
- "anyOf": [
46
- {
47
- "type": "object",
48
- "additionalProperties": {
49
- "type": "string"
50
- }
51
- },
52
- {
53
- "type": "string",
54
- "const": "auto"
55
- }
56
- ]
57
- }
58
- },
59
- "required": ["where"],
60
- "additionalProperties": false
36
+ "$ref": "#/definitions/LoadPatientDataType"
61
37
  },
62
38
  "action": {
63
39
  "$ref": "#/definitions/ApiAction"
@@ -157,6 +133,33 @@
157
133
  },
158
134
  "additionalProperties": false
159
135
  },
136
+ "LoadPatientDataType": {
137
+ "type": "object",
138
+ "properties": {
139
+ "join": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string"
143
+ }
144
+ },
145
+ "where": {
146
+ "anyOf": [
147
+ {
148
+ "type": "object",
149
+ "additionalProperties": {
150
+ "type": "string"
151
+ }
152
+ },
153
+ {
154
+ "type": "string",
155
+ "const": "auto"
156
+ }
157
+ ]
158
+ }
159
+ },
160
+ "required": ["where"],
161
+ "additionalProperties": false
162
+ },
160
163
  "ApiAction": {
161
164
  "type": "string",
162
165
  "enum": ["questionnaire.create", "crf.create", "crf.update", "crf.delete", "external_api_call"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persei/perseed-api",
3
- "version": "4.34.7",
3
+ "version": "4.34.9",
4
4
  "private": false,
5
5
  "main": "./dist/perseed-api.umd.cjs",
6
6
  "module": "./dist/perseed-api.js",