| 
					
				 | 
			
			
				@ -1608,7 +1608,7 @@ public class PatientHealthIndexService extends BaseJpaService<DevicePatientHealt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> getErrorHealthIndexPatients(String doctor){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select count(id),patient,photo,mobile,record_date from (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "select idx.id,p.id patient,p.photo,idx.record_date,p.mobile from wlyy_patient_health_index idx,base_patient p " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "select idx.id,p.id patient,p.photo,DATE_FORMAT(idx.record_date,'%Y-%m-%d %H:%i:%S')record_date ,p.mobile from wlyy_patient_health_index idx,base_patient p " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "where  idx.user = p.id and  status=1 and (manage_result=0 or manage_result is null)  and EXISTS ( " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " SELECT 1 from base_service_package_sign_record sr,base_service_package_record r ,base_team_member m where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "idx.user = CONVERT(sr.patient USING utf8) and  sr.id = r.sign_id and sr.status=1 and   m.team_code = r.team_code  " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1619,7 +1619,7 @@ public class PatientHealthIndexService extends BaseJpaService<DevicePatientHealt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> getErrorHealthIndexByPatients(String patient){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select * from  wlyy_patient_health_index where user='"+patient+"' and  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select *,cast(DATE_FORMAT(max(idx.record_date),'%Y-%m-%d %H:%i:%S') as char)record_date  from  wlyy_patient_health_index where user='"+patient+"' and  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "status=1 and (manage_result=0 or manage_result is null) "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 |