|
@@ -406,7 +406,7 @@ function(name){
|
|
|
}
|
|
|
|
|
|
participantIdManager.verifyCrfStudyId=
|
|
|
-function(){
|
|
|
+function(formId=0){
|
|
|
let fName='[verifyCrfStatusId]';
|
|
|
//is studyId already set for the crf
|
|
|
let studyId=this.getParticipantIdFromCrfEntry('STUDY');
|
|
@@ -426,12 +426,12 @@ function(){
|
|
|
this.setLabelMode('STUDY',this.setup.getParticipantLabel(this.data.getCrfEntry()));
|
|
|
//get registration map to fill local id
|
|
|
let that=this;
|
|
|
- let completeVerification=function(){that.completeVerification(studyId);}
|
|
|
+ let completeVerification=function(){that.completeVerification(studyId,formId);}
|
|
|
this.data.setRegistration(completeVerification);
|
|
|
}
|
|
|
|
|
|
participantIdManager.completeVerification=
|
|
|
-function(studyId){
|
|
|
+function(studyId,formId=0){
|
|
|
let fName='[completeVerification]';
|
|
|
//subject to content of localId
|
|
|
let rMapEntry=this.data.getRegistrationEntryMap(this.getCrfEntryFieldName('STUDY'))[studyId];
|
|
@@ -440,15 +440,12 @@ function(studyId){
|
|
|
this.print(fName+' localId '+localId+' isNull '+(localId==null)+' is"null" '+(localId=="null"));
|
|
|
|
|
|
let localIdFromEntry=this.getParticipantIdFromCrfEntry('LOCAL');
|
|
|
- if (localIdFromEntry!=localId){
|
|
|
+//don't touch localId in registration form (typically 0)
|
|
|
+ if (localIdFromEntry!=localId && formId!=0){
|
|
|
//update mismatches
|
|
|
this.setParticipantIdToCrfEntry('LOCAL',localId);
|
|
|
this.updateCrfEntry();
|
|
|
}
|
|
|
- //ignore the one set in the crfEntry, studyId prevails
|
|
|
- //if (!this.isValid(localId)) {
|
|
|
- // let localId=this.getParticipantIdFromCrfEntry('LOCAL');
|
|
|
- //}
|
|
|
if (this.isValid(localId)) {
|
|
|
this.setReadonly('LOCAL');
|
|
|
this.setLabelMode('LOCAL',localId);
|