|
@@ -86,7 +86,11 @@ function populateBasicData(config,data){
|
|
|
qconfig.schemaName='lists';
|
|
|
qconfig.queryName='site';
|
|
|
qconfig.filterArray=[LABKEY.Filter.create('siteNumber', data.rows[0].Site)];
|
|
|
- qconfig.success=function(data){setHTML(config,data,'siteName','siteName')};
|
|
|
+ qconfig.success=function(data){
|
|
|
+ setHTML(config,data,'siteName','siteName');
|
|
|
+ setHTML(config,data,'sitePhone','sitePhone');
|
|
|
+ };
|
|
|
+
|
|
|
LABKEY.Query.selectRows(qconfig);
|
|
|
|
|
|
|
|
@@ -947,7 +951,8 @@ function afterRegistration(config,configUpload,data){
|
|
|
print(config,msg);
|
|
|
return;
|
|
|
}
|
|
|
- configUpload.participantId=registrationData.rows[0][config.registrationParticipantIdField];
|
|
|
+ configUpload.participantId=
|
|
|
+ registrationData.rows[0][config.registrationParticipantIdField];
|
|
|
//could be a lookup field
|
|
|
let fields=registrationData.metaData.fields;
|
|
|
let field="NONE";
|
|
@@ -956,7 +961,8 @@ function afterRegistration(config,configUpload,data){
|
|
|
field=fields[f];
|
|
|
}
|
|
|
if ("lookup" in field){
|
|
|
- print(config,"Using lookup for participantId: "+configUpload.participantId);
|
|
|
+ let pid=configUpload.participantId;
|
|
|
+ print(config,"Using lookup for participantId: "+pid);
|
|
|
let lookup=field["lookup"];
|
|
|
print(config,"Lookup: "+lookup);
|
|
|
let qconfig=new Object();
|
|
@@ -964,7 +970,7 @@ function afterRegistration(config,configUpload,data){
|
|
|
qconfig.schemaName=lookup.schemaName;
|
|
|
qconfig.queryName=lookup.queryName;
|
|
|
qconfig.filterArray=
|
|
|
- [LABKEY.Filter.create(lookup.keyColumn,configUpload.participantId)];
|
|
|
+ [LABKEY.Filter.create(lookup.keyColumn,pid)];
|
|
|
qconfig.success=function(data){
|
|
|
afterRegistrationLookup(config,configUpload,data,lookup.displayColumn)};
|
|
|
LABKEY.Query.selectRows(qconfig);
|
|
@@ -1074,6 +1080,7 @@ function afterStudyData(config,configUpload,data){
|
|
|
configUpload.queries[configUpload.queryId].queryStatus="DONE";
|
|
|
configUpload.queryId+=1;
|
|
|
copyToDataset(config,configUpload);
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1205,20 +1212,10 @@ function completeWithFlag(config,data,flag){
|
|
|
if (debug){
|
|
|
if (flag==4) print(config,"complete with review");
|
|
|
}
|
|
|
- let formUrl="begin";
|
|
|
- var params = {
|
|
|
- "name": formUrl, // The destination wiki page. The name of this parameter is not arbitrary.
|
|
|
- };
|
|
|
-
|
|
|
- let containerPath= LABKEY.ActionURL.getContainer();
|
|
|
- // This changes the page after building the URL.
|
|
|
- //Note that the wiki page destination name is set in params.
|
|
|
- var homeURL = LABKEY.ActionURL.buildURL("project", formUrl , containerPath, params);
|
|
|
- print(config,"Redirecting to "+homeURL);
|
|
|
-
|
|
|
- window.location = homeURL;
|
|
|
+ //redirect(config);
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|