| 
					
				 | 
			
			
				@ -90,6 +90,18 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "where a.doctorCode = d.id AND a.id = q.relationCode  and q.planId=p.id and a.creater = c.id and a.patientCode = ?1 and a.doctorCode=?2  and a.status > '0'") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    Page<Object> findByPatient(String patient,String doctor, PageRequest pageable); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 查找所有的随访数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Query("select d.id,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode ," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            " p.disease,p.diseaseName,q.planId,q.id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "from Followup a, BaseDoctorDO d, BaseDoctorDO c ,ServiceItemPlanDO q ,PatientRehabilitationPlanDO p " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "where a.doctorCode = d.id AND a.id = q.relationCode  and q.planId=p.id and a.creater = c.id and a.patientCode = ?1  and a.status > '0'") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    Page<Object> findByPatient(String patient, PageRequest pageable); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 查找所有的随访计划(未开始的归类为计划) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -100,6 +112,17 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "where a.doctorCode = d.id AND a.id = q.relationCode  and q.planId=p.id  and a.creater = c.id and a.patientCode = ?1  and a.doctorCode=?2 and a.status = '2' ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    Page<Object> findPlanByPatient(String patient,String doctor, PageRequest pageable); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 查找所有的随访计划(未开始的归类为计划) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Query("select d.id,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode ," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            " p.disease,p.diseaseName,q.planId,q.id  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "from Followup a, BaseDoctorDO d, BaseDoctorDO c,ServiceItemPlanDO q ,PatientRehabilitationPlanDO p  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "where a.doctorCode = d.id AND a.id = q.relationCode  and q.planId=p.id  and a.creater = c.id and a.patientCode = ?1  and a.status = '2' ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    Page<Object> findPlanByPatient(String patient, PageRequest pageable); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 查找所有的随访记录(进行中的,已完整的的归类为计划) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 
			 |