|
@ -4679,35 +4679,6 @@ public class ImService {
|
|
|
public List<Map<String, Object>> doctorUpcomingList2(String doctorCode, String type) {
|
|
|
String sql = "";
|
|
|
if ("1,15,17".equals(type)) {
|
|
|
/*sql = "SELECT " +
|
|
|
"a.id AS \"id\"," +
|
|
|
"a.type AS \"type\"," +
|
|
|
"a.title AS \"title\"," +
|
|
|
"a.symptoms AS \"symptoms\",";
|
|
|
if("xm_ykyy_wx".equals(wxId)){
|
|
|
if (flag){
|
|
|
sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' ) AS \"czrq\",";
|
|
|
}else{
|
|
|
sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss') AS \"czrq\",";
|
|
|
}
|
|
|
}else{
|
|
|
sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' ) AS \"czrq\",";
|
|
|
}
|
|
|
sql = sql +"b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"b.doctor AS \"doctorCode\"," +
|
|
|
"b.actual_sender AS \"generalDoctor\"," +
|
|
|
"d.name AS \"patientName\"," +
|
|
|
"d.id as \"patientId\"," +
|
|
|
"d.idcard as \"patientIdcard\"," +
|
|
|
"d.sex as \"patientsex\"," +
|
|
|
"d.photo AS \"patientphoto\" " +
|
|
|
"FROM wlyy_consult a," +
|
|
|
"wlyy_consult_team b," +
|
|
|
"base_patient d " +
|
|
|
"WHERE a.id=b.consult " +
|
|
|
"AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (" + type + ") and b.status = 0 and a.pay_status=1 " +
|
|
|
"ORDER BY a.czrq desc ";*/
|
|
|
sql = "SELECT " +
|
|
|
" DISTINCT op.id AS \"outpatientId\"," +
|
|
|
"op.description AS \"title\"," +
|
|
@ -4751,47 +4722,18 @@ public class ImService {
|
|
|
"WHERE op.patient=patient.id " +
|
|
|
"AND op.doctor='" + doctorCode + "' " +
|
|
|
"AND op.status in ('0','1','2') and op.pay_status=1 ";
|
|
|
/*if("9".equals(type)){
|
|
|
//图文复诊
|
|
|
sql =sql +"AND op.type=1 AND op.outpatient_type=1 ";
|
|
|
}else if("16".equals(type)){
|
|
|
//视频复诊
|
|
|
sql =sql +"AND op.type=2 AND op.outpatient_type=1 ";
|
|
|
if("xm_ykyy_wx".equals(wxId)){
|
|
|
if (flag){
|
|
|
sql +=" and op.register_date >= str_to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}else {
|
|
|
sql +=" and op.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}
|
|
|
|
|
|
}else {
|
|
|
sql +=" AND op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
|
|
|
}
|
|
|
}else if("12".equals(type)){
|
|
|
//视频复诊
|
|
|
sql =sql +"AND op.outpatient_type=2";
|
|
|
if("xm_ykyy_wx".equals(wxId)){
|
|
|
if (flag){
|
|
|
sql +=" and op.register_date >= str_to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}else {
|
|
|
sql +=" and op.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}
|
|
|
}else {
|
|
|
sql +=" AND op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
|
|
|
}
|
|
|
}else{}*/
|
|
|
if (!"xm_ihealth_wx".equalsIgnoreCase(wxId)) {
|
|
|
if ("xm_ykyy_wx".equals(wxId)) {
|
|
|
if (flag) {
|
|
|
sql += " and op.register_date >= str_to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
} else {
|
|
|
sql += " and op.register_date >= to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
// sql += " AND op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";//不加今日待办
|
|
|
}
|
|
|
}
|
|
|
// if (!"xm_ihealth_wx".equalsIgnoreCase(wxId)) {
|
|
|
// if ("xm_ykyy_wx".equals(wxId)) {
|
|
|
// if (flag) {
|
|
|
// sql += " and op.register_date >= str_to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
// } else {
|
|
|
// sql += " and op.register_date >= to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
// }
|
|
|
//
|
|
|
// } else {
|
|
|
//// sql += " AND op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";//不加今日待办
|
|
|
// }
|
|
|
// }
|
|
|
sql = sql + " AND op.type in ('1','2') AND op.outpatient_type = 3 ";
|
|
|
sql = sql + " ORDER BY op.create_time DESC";
|
|
|
|
|
@ -4845,32 +4787,32 @@ public class ImService {
|
|
|
} else if ("16".equals(type)) {
|
|
|
//视频复诊
|
|
|
sql = sql + "AND op.type=2 AND op.outpatient_type=1 ";
|
|
|
if (!"xm_ihealth_wx".equalsIgnoreCase(wxId)) {
|
|
|
if ("xm_ykyy_wx".equals(wxId)) {
|
|
|
if (flag) {
|
|
|
sql += " and op.register_date >= str_to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
} else {
|
|
|
sql += " and op.register_date >= to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
sql += " AND op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";
|
|
|
}
|
|
|
}
|
|
|
// if (!"xm_ihealth_wx".equalsIgnoreCase(wxId)) {
|
|
|
// if ("xm_ykyy_wx".equals(wxId)) {
|
|
|
// if (flag) {
|
|
|
// sql += " and op.register_date >= str_to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
// } else {
|
|
|
// sql += " and op.register_date >= to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
// }
|
|
|
//
|
|
|
// } else {
|
|
|
// sql += " AND op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";
|
|
|
// }
|
|
|
// }
|
|
|
} else if ("12".equals(type)) {
|
|
|
//视频复诊
|
|
|
sql = sql + "AND op.outpatient_type=2";
|
|
|
if (!"xm_ihealth_wx".equalsIgnoreCase(wxId)) {
|
|
|
if ("xm_ykyy_wx".equals(wxId)) {
|
|
|
if (flag) {
|
|
|
sql += " and op.register_date >= str_to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
} else {
|
|
|
sql += " and op.register_date >= to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}
|
|
|
} else {
|
|
|
sql += " AND op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";
|
|
|
}
|
|
|
}
|
|
|
// if (!"xm_ihealth_wx".equalsIgnoreCase(wxId)) {
|
|
|
// if ("xm_ykyy_wx".equals(wxId)) {
|
|
|
// if (flag) {
|
|
|
// sql += " and op.register_date >= str_to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
// } else {
|
|
|
// sql += " and op.register_date >= to_date('" + DateUtil.dateToStrShort(new Date()) + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
// }
|
|
|
// } else {
|
|
|
// sql += " AND op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";
|
|
|
// }
|
|
|
// }
|
|
|
} else {
|
|
|
}
|
|
|
|