|
@@ -252,8 +252,32 @@ function(formSetupEntry){
|
|
|
|
|
|
//for data queries, limit to present CRF only
|
|
//for data queries, limit to present CRF only
|
|
ad.filters=new Object();
|
|
ad.filters=new Object();
|
|
- ad.filters['crfRef']=this.getCRFref();
|
|
|
|
|
|
|
|
|
|
+ let crfValues=this.getCRFref();
|
|
|
|
+
|
|
|
|
+ let settings=this.config.formConfig.settings;
|
|
|
|
+ let doMerge=false;
|
|
|
|
+ if ("mergeListData" in settings){
|
|
|
|
+ let ar=settings["mergeListData"].split(',');
|
|
|
|
+ if (ar.includes(ad.queryName))
|
|
|
|
+ doMerge=true;
|
|
|
|
+ }
|
|
|
|
+ let idField='participantStudyId';
|
|
|
|
+ let id=this.config.formConfig.crfEntry[idField];
|
|
|
|
+ this.print(fName+": studyId "+id+" doMerge "+doMerge);
|
|
|
|
+
|
|
|
|
+ if (doMerge){
|
|
|
|
+ let entries=config.formConfig.crfEntries.rows;
|
|
|
|
+ for (let i=0;i<entries.length;i++){
|
|
|
|
+ let e=entries[i];
|
|
|
|
+ if (e[idField]==id){
|
|
|
|
+ crfValues+=";"+e['entryId'];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.print(fName+": crfValues "+crfValues);
|
|
|
|
+ ad.filters['crfRef']=crfValues;
|
|
//compose a long debug message
|
|
//compose a long debug message
|
|
let msg=fName+": flag "+ad.showFlag;
|
|
let msg=fName+": flag "+ad.showFlag;
|
|
msg+=" value "+ad.showFlagValue;
|
|
msg+=" value "+ad.showFlagValue;
|
|
@@ -584,7 +608,7 @@ function(divName,queryName,filters,readonlyFlag){
|
|
let div=this.getElement(divName);
|
|
let div=this.getElement(divName);
|
|
|
|
|
|
this.print(fName+": generating WebPart: "+queryName);
|
|
this.print(fName+": generating WebPart: "+queryName);
|
|
-
|
|
|
|
|
|
+
|
|
var qconfig=new Object();
|
|
var qconfig=new Object();
|
|
qconfig.renderTo=divName;
|
|
qconfig.renderTo=divName;
|
|
//point to data container
|
|
//point to data container
|
|
@@ -2857,6 +2881,10 @@ function(){
|
|
queryArray.push(runQuery.makeQuery(targetObject,'data','crfEntry','parentCrfData',[crfFilter]));
|
|
queryArray.push(runQuery.makeQuery(targetObject,'data','crfEntry','parentCrfData',[crfFilter]));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //crfEntries
|
|
|
|
+ queryArray.push(
|
|
|
|
+ runQuery.makeQuery(targetObject,'data','crfEntry','crfEntries',[]));
|
|
|
|
+
|
|
this.print('running getDataFromQueries');
|
|
this.print('running getDataFromQueries');
|
|
let that=this;
|
|
let that=this;
|
|
//let action=function(data){that.doNothing();};
|
|
//let action=function(data){that.doNothing();};
|