|
@ -8,7 +8,6 @@ import com.yihu.wlyy.entity.doctor.scheme.DoctorSchemeBloodPressure;
|
|
|
import com.yihu.wlyy.entity.doctor.scheme.DoctorSchemeBloodSugger;
|
|
|
import com.yihu.wlyy.entity.doctor.scheme.vo.DoctorSchemeBloodPressureVO;
|
|
|
import com.yihu.wlyy.entity.doctor.scheme.vo.DoctorSchemeBloodSuggerVO;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.PatientSchemeList;
|
|
|
import com.yihu.wlyy.entity.patient.vo.PatientVO;
|
|
|
import com.yihu.wlyy.health.repository.DevicePatientHealthIndexDao;
|
|
@ -80,7 +79,7 @@ public class DoctorSchemeService {
|
|
|
if(-1 != deviceType){
|
|
|
sql = sql + " LEFT JOIN wlyy_patient_device dev on dev.user = p.code ";
|
|
|
}
|
|
|
|
|
|
|
|
|
sql = sql+ " RIGHT JOIN wlyy_sign_patient_label_info sp on sp.patient = p.code and sp.status =1 ";
|
|
|
|
|
|
sql = sql+ " LEFT JOIN wlyy_sign_family sf on sf.patient = p.code where sf.admin_team_code = "+teamCode;
|
|
@ -394,7 +393,7 @@ public class DoctorSchemeService {
|
|
|
public JSONObject getSlowDiseaseTeaminfos(String teamCode, int getcolor, int getstands, int gethealthindex, String startdate, String enddate,String doctorcode) throws Exception{
|
|
|
|
|
|
// List<Patient> patients = patientDao.findAllSignPatientTeamcode(teamCode,doctorcode);
|
|
|
|
|
|
|
|
|
List<PatientVO> patients = new ArrayList<>();
|
|
|
String patientsql = "select p.*,b.deviceType as deviceType,group_concat(sp.label) diseaseType from wlyy_patient p " +
|
|
|
" LEFT JOIN wlyy_sign_family s on s.patient = p.code " +
|
|
@ -403,8 +402,8 @@ public class DoctorSchemeService {
|
|
|
"WHERE s.status > 0 and s.admin_team_code ='"+teamCode+"' and (s.doctor = '"+doctorcode+"' or s.doctor_health ='"+doctorcode+"') GROUP BY p.code";
|
|
|
|
|
|
patients= jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
JSONObject green = new JSONObject();//绿标
|
|
@ -462,7 +461,7 @@ public class DoctorSchemeService {
|
|
|
bloodpressure_patientcodes.add(patient.getCode());
|
|
|
}
|
|
|
|
|
|
if( "2" == patient.getDisease() || "1,2".equals(patient.getDisease()) || "2,1".equals(patient.getDisease())){
|
|
|
if( "2".equals(patient.getDisease()) || "1,2".equals(patient.getDisease()) || "2,1".equals(patient.getDisease())){
|
|
|
bloodsugar_patientcodes.add(patient.getCode());
|
|
|
}
|
|
|
}
|