|
@@ -1570,6 +1570,22 @@ function generateMasterForm(config){
|
|
|
setFormConfig(config);
|
|
|
}
|
|
|
|
|
|
+function populateBasicData(config){
|
|
|
+
|
|
|
+ config.document.getElementById('eudraCTNumber').innerHTML=
|
|
|
+ config.formConfig.crfEntry.EudraCTNumber;
|
|
|
+ config.document.getElementById('studyCoordinator').innerHTML=
|
|
|
+ config.formConfig.crfEntry.StudyCoordinator;
|
|
|
+ config.document.getElementById('studySponsor').innerHTML=
|
|
|
+ config.formConfig.crfEntry.StudySponsor;
|
|
|
+ config.document.getElementById('siteName').innerHTML=
|
|
|
+ config.formConfig.site['siteName'];
|
|
|
+ config.document.getElementById('sitePhone').innerHTML=
|
|
|
+ config.formConfig.site['sitePhone'];
|
|
|
+ config.document.getElementById('investigatorName').innerHTML=
|
|
|
+ config.formConfig.user['DisplayName'];
|
|
|
+}
|
|
|
+
|
|
|
function afterConfig(config){
|
|
|
|
|
|
let debug=true;
|
|
@@ -1593,7 +1609,7 @@ function afterConfig(config){
|
|
|
function afterCrf(config,formConfig,data){
|
|
|
formConfig.crfEntry=data.rows[0];
|
|
|
//schedule basic data for later
|
|
|
- //populateBasicData(config,data);
|
|
|
+ populateBasicData(config);
|
|
|
|
|
|
let selectRows=new Object();
|
|
|
selectRows.containerPath=config.containerPath;
|
|
@@ -1718,14 +1734,16 @@ function setFormConfig(config){
|
|
|
function afterCRFEntry(config,data){
|
|
|
config.formConfig.crfEntry=data.rows[0];
|
|
|
print(config,"Setting crfEntry (x) to "+config.formConfig.crfEntry["entryId"]);
|
|
|
-
|
|
|
+
|
|
|
let selectRows=new Object();
|
|
|
selectRows.containerPath=config.containerPath;
|
|
|
selectRows.schemaName='lists';
|
|
|
selectRows.queryName='site';
|
|
|
- selectRows.filterArray=[LABKEY.Filter.create('siteNumber',config.formConfig.crfEntry.Site)];
|
|
|
+ selectRows.filterArray= [
|
|
|
+ LABKEY.Filter.create('siteNumber',config.formConfig.crfEntry.Site)];
|
|
|
selectRows.success=function(data){afterSite(config,data)};
|
|
|
LABKEY.Query.selectRows(selectRows);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function afterSite(config,data){
|