|  | @ -949,7 +949,7 @@ public class RehabilitationInfoService {
 | 
	
		
			
				|  |  |         return list;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public JSONObject getRehabilitationPatientListNew(String idcard, String doctorId, String status, Integer page, Integer pagesize) {
 | 
	
		
			
				|  |  |     public JSONObject getRehabilitationPatientListNew(String downPatientId, String idcard, String doctorId, String status, Integer page, Integer pagesize) {
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |         List<Map<String, Object>> list = null;
 | 
	
		
			
				|  |  |         String detailSql = "SELECT \n" +
 | 
	
	
		
			
				|  | @ -981,6 +981,10 @@ public class RehabilitationInfoService {
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(idcard)) {
 | 
	
		
			
				|  |  |             filterSql += " and d.idcard='" + idcard + "' ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(downPatientId)) {
 | 
	
		
			
				|  |  |             //wlyy_rehabilitation_patient_info的id
 | 
	
		
			
				|  |  |             filterSql += " and d.id='" + downPatientId + "' ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isBlank(status)) {
 | 
	
		
			
				|  |  |             //看全部数据
 | 
	
		
			
				|  |  |             filterSql += "	AND (d.create_user = '" + doctorId + "'  OR ISNULL(  d.create_user  ) )\n" +
 | 
	
	
		
			
				|  | @ -1215,11 +1219,11 @@ public class RehabilitationInfoService {
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * todo 还需要代办项目还需要重新join一张新表 todayTaskCount 今日任务项,等后面在整
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<Map<String, Object>> getPatientRehabilitationByPatientId(String patientId,String planId) {
 | 
	
		
			
				|  |  |     public List<Map<String, Object>> getPatientRehabilitationByPatientId(String patientId, String planId) {
 | 
	
		
			
				|  |  |         String sql = "SELECT DISTINCT \n" +
 | 
	
		
			
				|  |  |                 "	 a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,c.age,a.idcard,\n" +
 | 
	
		
			
				|  |  |                 "	 b.id 'planId',b.title 'planTitle',b.plan_doctor_name 'planDoctorName',d. `name` 'diseaseName',c.dept_name 'deptName',\n" +
 | 
	
		
			
				|  |  |                 "	 b.`status` 'planStatus', c.hospital_name 'hospitalName',b.medical_records_code medicalRecordsCode,"+
 | 
	
		
			
				|  |  |                 "	 b.`status` 'planStatus', c.hospital_name 'hospitalName',b.medical_records_code medicalRecordsCode," +
 | 
	
		
			
				|  |  |                 "    c.from_source, " +
 | 
	
		
			
				|  |  |                 "       CASE  \n" +
 | 
	
		
			
				|  |  |                 "        WHEN c.from_source='1' THEN '手动添加'\n" +
 | 
	
	
		
			
				|  | @ -1312,7 +1316,7 @@ public class RehabilitationInfoService {
 | 
	
		
			
				|  |  |             sql += " and b.id= '" + itemId + "'";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(status)) {
 | 
	
		
			
				|  |  |             sql += " and a.status =" + status ;
 | 
	
		
			
				|  |  |             sql += " and a.status =" + status;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |         return list;
 |