anchor.diff:  			
              
   			var temp = "<%=frdTo%>";
  +			<%String forwardToValue = "PrintSpecimenAdd";%>
   			//Bug ID: 4040(Virender)
   			if(checked)
   			{
  -				<% String actionToCall = null;%>
  +				<% String actionToCall = null;
  +				
  +				   %>
   				if(operation == "add")
   				{
  -				  if(temp == "orderDetails")
  +					<%actionToCall = "NewSpecimenAdd.do";
  +					if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
   					{
  -						setSubmitted('ForwardTo','CPQueryPrintSpecimenAdd','orderDetails');
  +					  	actionToCall = Constants.CP_QUERY_SPECIMEN_ADD_ACTION;
  +						forwardToValue = "CPQueryPrintSpecimenAdd";
  +					}%>
  +					
  +				    if(temp == "orderDetails")
  +					{
  +						setSubmitted('ForwardTo','<%=forwardToValue%>','orderDetails');
   					}
   					else
   					{
   					   
  -						setSubmitted('ForwardTo','CPQueryPrintSpecimenAdd','pageOfCreateAliquot');
  +						setSubmitted('ForwardTo','<%=forwardToValue%>','pageOfCreateAliquot');
                       }
  +									
  +					confirmDisable('<%=actionToCall%>',document.forms[0].activityStatus);
  +				}
  +				else
  +				{
   					<%
  -					actionToCall = "NewSpecimenAdd.do";
  +					actionToCall = "NewSpecimenEdit.do";
  +					forwardToValue = "PrintSpecimenEdit";
   					if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
   					{
  -					  	actionToCall = Constants.CP_QUERY_SPECIMEN_ADD_ACTION;
  +						actionToCall = Constants.CP_QUERY_SPECIMEN_EDIT_ACTION;
  +                        forwardToValue = "CPQueryPrintSpecimenEdit";
  +                    
   					}%>
  -					
  -					confirmDisable('<%=actionToCall%>',document.forms[0].activityStatus);
  -				}
  -				else
  -				{
  +				
   					if(temp == "orderDetails")
   					{
  -						setSubmitted('ForwardTo','CPQueryPrintSpecimenEdit','orderDetails');
  +						setSubmitted('ForwardTo','<%=forwardToValue%>','orderDetails');
   					}
   					else
   					{
  -						setSubmitted('ForwardTo','CPQueryPrintSpecimenEdit','pageOfCreateAliquot');
  +						setSubmitted('ForwardTo','<%=forwardToValue%>','pageOfCreateAliquot');
   					}
  -					<%
  -					actionToCall = "NewSpecimenEdit.do";
  -					if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
  -					{
  -						actionToCall = Constants.CP_QUERY_SPECIMEN_EDIT_ACTION;
  -                    
  -					}%>
  +					
   					
   					confirmDisable('<%=actionToCall%>',document.forms[0].activityStatus);
   				}
  
positive.code: 	String tab = (String)request.getAttribute(Constants.SELECTED_TAB);
  	String exceedsMaxLimit = (String)request.getAttribute(Constants.EXCEEDS_MAX_LIMIT);
  	String submittedFor=(String)request.getAttribute(Constants.SUBMITTED_FOR);
  	boolean isAddNew = false;
  	String signedConsentDate = "";
  	String selectProperty="";
  
negative.code: 		}
  		
  		
  	function onDeriveSubmit()
  	{
  	var operation = document.forms[0].operation.value;
  		<%String forwardToPrintPath = "PrintSpecimenAdd";%>
  	
  		if(document.getElementById("deriveChk").checked == true)
  		{
  			document.forms[0].derivedClicked.value=true;
  			document.forms[0].checkedButton.value=false;
  			if(document.getElementById("numberOfSpecimens").value > 1)
  			{
  				if(operation == "add")
  				{
  					<%								
  				    if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
  				   {
  				  	    forwardToPrintPath = "CPQueryPrintSpecimenAdd";
  				    }%>
  					setSubmitted("ForwardTo",'<%=forwardToPrintPath%>',"deriveMultiple");
  					confirmDisable("<%=formName%>","document.forms[0].activityStatus");
  				}
  				else
  				{
  					<%								
  				    if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
  				   {
  				  	    forwardToPrintPath = "CPQueryPrintSpecimenEdit";
  				    }%>
  					setSubmitted("ForwardTo",'<%=forwardToPrintPath%>',"deriveMultiple");
  					confirmDisable("<%=formName%>","document.forms[0].activityStatus");
  				}
  				
  				
  			}
  			else
  			{
  				if(operation == "add")
  				{
  						<%								
  				    if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
  				   {
  				  	    forwardToPrintPath = "CPQueryPrintSpecimenAdd";
  				    }%>
  					setSubmitted("ForwardTo",'<%=forwardToPrintPath%>',"createNew");
  				    confirmDisable("<%=formName%>","document.forms[0].activityStatus");
  				}
  				else
  				{
  					<%
  					forwardToPrintPath = "PrintSpecimenEdit";		
  				    if(pageOf.equals(Constants.PAGE_OF_SPECIMEN_CP_QUERY))
  				   {
  				  	      forwardToPrintPath = "CPQueryPrintSpecimenEdit";
  				    }%>
  											
  					setSubmitted("ForwardTo",'<%=forwardToPrintPath%>',"createNew");
  					confirmDisable("<%=formName%>","document.forms[0].activityStatus");
  				}
  				
  			}
  
  
  		}
  		else
  		{
  			if(operation =="add")
  				onNormalSubmit();
  			else
  			{
  			document.forms[0].checkedButton.value=false;
  			document.forms[0].derivedClicked.value=false;
  			<%	ConsentTierData consentForm =(ConsentTierData)form;
  			List consentTier=(List)consentForm.getConsentTiers();
  			
  			if(consentTier.size()>0)
  			{%>
  				popupWindow("<%=consentTier.size()%>");
  			<%}else{%>
  				onNormalSubmit();
  			<%}%>
  			}
  		}
  	}
  	
  
  		function onNormalSubmit()
  		{
  