| 
					
				 | 
			
			
				@ -3642,10 +3642,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " Left join ( select count(id) as total,doctor from wlyy_outpatient where status = 2 GROUP BY doctor ) a on a.doctor = d.id "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (isAttention.equalsIgnoreCase("1")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+="Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient ='"+patientid+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient ='"+patientid+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (isAttention.equalsIgnoreCase("0")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += "Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient !='" + patientid + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " Left join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient !='" + patientid + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(diseaseKey)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" left join wlyy_doctor_special_disease sp on d.id = sp.doctor_code "; 
			 |