|
@ -6458,6 +6458,55 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 统计医生首页待接诊和已接诊数据量
|
|
|
* @param doctor
|
|
|
* @return
|
|
|
*/
|
|
|
public com.alibaba.fastjson.JSONObject selectInfoByDoctorId(String doctor){
|
|
|
String sql = "SELECT\n" +
|
|
|
"\toutpatient_type as \"outpatientType\",\n" +
|
|
|
"\tstatus as \"status\",\n" +
|
|
|
"\tCOUNT(1) AS \"total\"\n" +
|
|
|
"\n" +
|
|
|
"FROM\n" +
|
|
|
"\twlyy_outpatient\n" +
|
|
|
"WHERE\n" +
|
|
|
"\tdoctor = '"+doctor+"'\n" +
|
|
|
"GROUP BY\n" +
|
|
|
"\toutpatient_type,\n" +
|
|
|
"\tstatus";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
|
|
|
int zxzsDjzTotal = 0;//在线诊室待接诊数量
|
|
|
int zxzsYjzTotal=0;//在线诊室已接诊数量
|
|
|
int zjzxDjztTotal=0;//在线咨询待接诊数量
|
|
|
int zjzxYjzTota= 0; //在线咨询已接诊数量
|
|
|
for (Map<String,Object> map:list){
|
|
|
String outpatientType= map.get("outpatientType").toString();
|
|
|
String status = map.get("status").toString();
|
|
|
if (outpatientType.equalsIgnoreCase("1")) {
|
|
|
if (status.equalsIgnoreCase("0")) {
|
|
|
zxzsDjzTotal += Integer.parseInt(map.get("total").toString());
|
|
|
} else if (status.equalsIgnoreCase("1") || status.equalsIgnoreCase("2")) {
|
|
|
zxzsYjzTotal += Integer.parseInt(map.get("total").toString());
|
|
|
}
|
|
|
}else if (outpatientType.equalsIgnoreCase("3")){
|
|
|
if (status.equalsIgnoreCase("0")){
|
|
|
zjzxDjztTotal +=Integer.parseInt(map.get("total").toString());
|
|
|
}else if (status.equalsIgnoreCase("1")||status.equalsIgnoreCase("2")){
|
|
|
zjzxYjzTota +=Integer.parseInt(map.get("total").toString());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
object.put("zxzsDjzTotal",zxzsDjzTotal);
|
|
|
object.put("zxzsYjzTotal",zxzsYjzTotal);
|
|
|
object.put("zjzxDjztTotal",zjzxDjztTotal);
|
|
|
object.put("zjzxYjzTota",zjzxYjzTota);
|
|
|
return object;
|
|
|
}
|
|
|
|
|
|
public List<Map<String, Object>> findWaitingRoomPatient(String dept, Integer type) {
|
|
|
|
|
|
String sql = "SELECT " +
|