|
@ -392,16 +392,22 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
// if (p == null) {
|
|
// if (p == null) {
|
|
// continue;
|
|
// continue;
|
|
// }
|
|
// }
|
|
|
|
|
|
PatientVO p = new PatientVO();
|
|
PatientVO p = new PatientVO();
|
|
|
|
List<PatientVO> plist = new ArrayList<>();
|
|
if(sign.get("patient") != null){
|
|
if(sign.get("patient") != null){
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
|
|
|
|
p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
|
|
plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
if(plist.isEmpty()){
|
|
|
|
continue;
|
|
|
|
}else{
|
|
|
|
p = plist.get(0);
|
|
|
|
}
|
|
}else{
|
|
}else{
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@ -3821,14 +3827,21 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
// }
|
|
// }
|
|
//查找居民 改造成获取绑定的设备和疾病类型--huangwenjie-2017.11.21
|
|
//查找居民 改造成获取绑定的设备和疾病类型--huangwenjie-2017.11.21
|
|
PatientVO p = new PatientVO();
|
|
PatientVO p = new PatientVO();
|
|
|
|
List<PatientVO> plist = new ArrayList<>();
|
|
if(sign.get("patient") != null){
|
|
if(sign.get("patient") != null){
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 AND status =1 " +
|
|
|
|
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
|
|
|
|
p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
|
|
plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
if(plist.isEmpty()){
|
|
|
|
continue;
|
|
|
|
}else{
|
|
|
|
p = plist.get(0);
|
|
|
|
}
|
|
}else{
|
|
}else{
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@ -4259,14 +4272,21 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
if (signList != null && signList.size() > 0) {
|
|
if (signList != null && signList.size() > 0) {
|
|
for (Map<String, Object> sign : signList) {
|
|
for (Map<String, Object> sign : signList) {
|
|
PatientVO p = new PatientVO();
|
|
PatientVO p = new PatientVO();
|
|
|
|
List<PatientVO> plist = new ArrayList<>();
|
|
if(sign.get("patient") != null){
|
|
if(sign.get("patient") != null){
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
|
|
|
|
p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
|
|
plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
if(plist.isEmpty()){
|
|
|
|
continue;
|
|
|
|
}else{
|
|
|
|
p = plist.get(0);
|
|
|
|
}
|
|
}else{
|
|
}else{
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@ -4463,14 +4483,21 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
if (signList != null && signList.size() > 0) {
|
|
if (signList != null && signList.size() > 0) {
|
|
for (Map<String, Object> sign : signList) {
|
|
for (Map<String, Object> sign : signList) {
|
|
PatientVO p = new PatientVO();
|
|
PatientVO p = new PatientVO();
|
|
|
|
List<PatientVO> plist = new ArrayList<>();
|
|
if(sign.get("patient") != null){
|
|
if(sign.get("patient") != null){
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
" where a.status =1 and a.code = '"+sign.get("patient").toString()+"'";
|
|
|
|
|
|
p = (PatientVO)jdbcTemplate.queryForObject(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
|
|
plist = jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
|
|
|
|
|
|
|
|
if(plist.isEmpty()){
|
|
|
|
continue;
|
|
|
|
}else{
|
|
|
|
p = plist.get(0);
|
|
|
|
}
|
|
}else{
|
|
}else{
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|