|
@ -105,8 +105,8 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
// 社保号
|
|
|
json.put("ssc", p.getSsc());
|
|
|
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(patient,1);
|
|
|
SignFamily familySign = signFamilyDao.findSignByPatient(patient,2);
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(patient, 1);
|
|
|
SignFamily familySign = signFamilyDao.findSignByPatient(patient, 2);
|
|
|
|
|
|
if (ssSign != null) {
|
|
|
// 设置患者紧急联系人
|
|
@ -1146,6 +1146,7 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" join " : " left join ") +
|
|
|
" wlyy_sign_patient_label_info t2 " +
|
|
|
" ON t1.patient = t2.patient " +
|
|
|
(teamCode > 0 ? " join (select * from wlyy_sign_patient_label where label_type != '4' or team_code = " + teamCode + " or (label_type = '4' and (label_code in (1,2)))) lb on t2.label = lb.label_code and t2.label_type = lb.label_type " : "") +
|
|
|
" WHERE " +
|
|
|
" t1.repdoctor = ? " +
|
|
|
" AND t1.status > 0 " +
|
|
@ -1164,7 +1165,7 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
}
|
|
|
|
|
|
String sqlDoc = sql.replaceAll("repdoctor", "doctor");
|
|
|
String sqlDocHealth = sql.replaceAll("repdoctor", "doctor_health").replaceAll("t1", "t3").replaceAll("t2", "t4");
|
|
|
String sqlDocHealth = sql.replaceAll("repdoctor", "doctor_health").replaceAll("t1", "t3").replaceAll("t2", "t4").replaceAll("lb", "lb1");
|
|
|
sql = "select DISTINCT t.* from (" + sqlDoc + " union all " + sqlDocHealth + ") t limit " + page + "," + pagesize;
|
|
|
signList = jdbcTemplate.queryForList(sql, args);
|
|
|
|
|
@ -1218,7 +1219,13 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
List<SignPatientLabelInfo> labels = labelInfoDao.findByPatientAndStatus(sign.get("patient").toString(), 1);
|
|
|
List<SignPatientLabelInfo> labels = null;
|
|
|
if (teamCode > 0) {
|
|
|
labels = labelInfoDao.findByPatientAndStatusByTeam(sign.get("patient").toString(), 1, teamCode);
|
|
|
} else {
|
|
|
labels = labelInfoDao.findByPatientAndStatus(sign.get("patient").toString(), 1);
|
|
|
}
|
|
|
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|