主业务添加代码
This commit is contained in:
parent
ed9b3f8eb1
commit
b1fdb0f795
@ -266,7 +266,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
String f_check1 = commonUtil.getComOptValue(yq, "f_check1");
|
||||
if ("1".equals(f_check1)) return new Result("-1", "审核前必须先初审!");
|
||||
}
|
||||
if(checkWorkTime(labPat)==1)return new Result("-1", "核对医生不允许与检验医生相同!");
|
||||
if (checkWorkTime(labPat) == 1) return new Result("-1", "核对医生不允许与检验医生相同!");
|
||||
String limit_brly = commonUtil.getHISOPT("limit_brly");
|
||||
String brly = labPat.getBrly();
|
||||
if ("1".equals(limit_brly) && (brly == null || "".equals(brly)))
|
||||
@ -294,7 +294,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
if ("1".equals(limit_brpatno) && (brdh == null || "".equals(brdh))) {
|
||||
if ("1".equals(brly) || "3".equals(brly)) return new Result("-1", "门诊住院的病历号不能为空,禁止审核!");
|
||||
}
|
||||
|
||||
String yqdl = commonUtil.getYqdl(yq);
|
||||
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||
if (labResultList == null || labResultList.size() == 0) return new Result("-1", "结果为空禁止审核!");
|
||||
for (LabResult labResult : labResultList) {
|
||||
@ -313,7 +313,6 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
//多做结果判断
|
||||
String otherresultmsg = commonUtil.getComOptValue(yq, "otherresultmsg");
|
||||
if ("1".equals(otherresultmsg)) {
|
||||
String yqdl = commonUtil.getYqdl(yq);
|
||||
if (!"细菌仪".equals(yqdl)) {
|
||||
int nullcount = lisWorkOperMapper.checkresultsqxmdh(jyrq, yq, ybh, labPat.getSqh());
|
||||
if (nullcount > 0) return new Result("5", "结果有多做的项目,是否审核?", 2);
|
||||
@ -355,9 +354,32 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
SetReport setReport = new SetReport();
|
||||
setReport.setIp(IpUtils.getIpAddr());
|
||||
setReport.setJyrq(DateFormatUtils.format(jyrq, "yyyy-MM-dd"));
|
||||
setReport.setYq(yq.trim());
|
||||
setReport.setYbh(ybh);
|
||||
setReport.setUserid(Userid);
|
||||
setReport.setYq(yq.trim());
|
||||
setReport.setStatus(LisinterfaceNameConstants.REPORTSTART);
|
||||
if (!"细菌仪".equals(yqdl)) {
|
||||
if (!"1".equals(commonUtil.getHISOPT("wswcbbgbl"))) {
|
||||
String ls_cbbgyq = commonUtil.getComOptValue(yq, "cbbgyq");
|
||||
if (ls_cbbgyq != null && !"".equals(ls_cbbgyq)) {
|
||||
String ls_ejbgyq = "EJBG" + ls_cbbgyq;
|
||||
ls_cbbgyq = "CBBG" + ls_cbbgyq;
|
||||
int count = commonUtil.getCountByKey(jyrq, ls_cbbgyq, ybh);
|
||||
if (count > 0) {
|
||||
setReport.setYq(ls_cbbgyq);
|
||||
setReport.setStatus(LisinterfaceNameConstants.REPORTCANCAL);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREPORT, setReport);
|
||||
}
|
||||
count = commonUtil.getCountByKey(jyrq, ls_ejbgyq, ybh);
|
||||
if (count > 0) {
|
||||
setReport.setYq(ls_ejbgyq);
|
||||
setReport.setStatus(LisinterfaceNameConstants.REPORTCANCAL);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREPORT, setReport);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
setReport.setYq(yq.trim());
|
||||
setReport.setStatus(LisinterfaceNameConstants.REPORTSTART);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREPORT, setReport);
|
||||
if (result.getCode().equals("5")) {
|
||||
@ -367,6 +389,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
return new Result("0", "保存成功!");
|
||||
}
|
||||
if (!result.getCode().equals("0")) return result;
|
||||
checkxpywrgjz(labPat);
|
||||
return new Result("0", "保存成功!");
|
||||
}
|
||||
|
||||
@ -444,12 +467,12 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
if (!result.getCode().equals("0")) return result;
|
||||
//最后完成
|
||||
String finish=labPat.getFinish();
|
||||
if (!"细菌仪".equals(yqdl) && finish !=null) labPat.setFinish("1");
|
||||
String finish = labPat.getFinish();
|
||||
if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1");
|
||||
labPat.setJgbz(ReportStatusConstants.CONFIRM);
|
||||
Integer shcs=labPat.getShcs();
|
||||
if(shcs==null)shcs=0;
|
||||
shcs=shcs+1;
|
||||
Integer shcs = labPat.getShcs();
|
||||
if (shcs == null) shcs = 0;
|
||||
shcs = shcs + 1;
|
||||
labPat.setShcs(shcs);
|
||||
commonUtil.updateLabPat(labPat);
|
||||
return new Result("0", "保存成功!");
|
||||
@ -553,26 +576,26 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
*/
|
||||
@Override
|
||||
public Result saveallresult(Date jyrq, String yq, String ybh) {
|
||||
int finsh=1;
|
||||
int finsh = 1;
|
||||
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||
if (labResultList == null || labResultList.size() == 0) return new Result("-1", "结果为空!");
|
||||
for (LabResult labResult : labResultList) {
|
||||
String csjg = labResult.getCsjg();
|
||||
if ("未做".equals(csjg)) {
|
||||
finsh=0;
|
||||
finsh = 0;
|
||||
}
|
||||
if (csjg != null) {
|
||||
if (csjg.contains("ERR")) finsh=0;
|
||||
if (csjg.contains("需稀释")) finsh=0;
|
||||
if (csjg.contains("需复做")) finsh=0;
|
||||
if (csjg.contains("ERR")) finsh = 0;
|
||||
if (csjg.contains("需稀释")) finsh = 0;
|
||||
if (csjg.contains("需复做")) finsh = 0;
|
||||
|
||||
}
|
||||
}
|
||||
String yqdl = commonUtil.getYqdl(yq);
|
||||
//查询病人信息
|
||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
String finish=labPat.getFinish();
|
||||
if (!"细菌仪".equals(yqdl) && finish !=null && finsh==1) labPat.setFinish("1");
|
||||
String finish = labPat.getFinish();
|
||||
if (!"细菌仪".equals(yqdl) && finish != null && finsh == 1) labPat.setFinish("1");
|
||||
int wjz = saveallresult(labPat);
|
||||
//同步主表危急值标识
|
||||
String alarmflag = labPat.getAlarmflag();
|
||||
@ -585,6 +608,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
return new Result("0", "保存成功!");
|
||||
}
|
||||
|
||||
//内部使用
|
||||
private int saveallresult(LabPat labPat) {
|
||||
Date jyrq = labPat.getJyrq();
|
||||
@ -610,6 +634,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
if (sqh != null && !"".equals(sqh)) setItemSqxmdh(jyrq, yq, ybh, sqh);
|
||||
return wjz;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结果表补充申请单项目代码
|
||||
*
|
||||
@ -625,6 +650,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
setItemSqxmdh(jyrq, yq, ybh, sqh);
|
||||
}
|
||||
}
|
||||
|
||||
//内部使用
|
||||
private void setItemSqxmdh(Date jyrq, String yq, String ybh, String sqh) {
|
||||
if (sqh != null && !"".equals(sqh)) {
|
||||
@ -637,6 +663,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算项目增加及重新计算
|
||||
*
|
||||
@ -650,6 +677,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
calcsample(labPat);
|
||||
return new Result("0", "保存成功!");
|
||||
}
|
||||
|
||||
//内部使用
|
||||
private void calcsample(LabPat labPat) {
|
||||
Date jyrq = labPat.getJyrq();
|
||||
@ -706,6 +734,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算项目参考值结果异常标志
|
||||
*
|
||||
@ -729,6 +758,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
return new Result("0", "保存成功!");
|
||||
}
|
||||
//内部使用
|
||||
|
||||
/**
|
||||
* 计算项目参考值结果异常标志(内部使用)
|
||||
*
|
||||
@ -784,21 +814,23 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
//危急值标识去除原则
|
||||
String brxm = labPat.getBrxm();
|
||||
if(brxm !=null)if (brxm.contains("质控") || brxm.contains("复查") || brxm.contains("QC") || brxm.contains("qc") || brxm.contains("软化水") || brxm.contains("锅炉水")) {
|
||||
if (brxm != null)
|
||||
if (brxm.contains("质控") || brxm.contains("复查") || brxm.contains("QC") || brxm.contains("qc") || brxm.contains("软化水") || brxm.contains("锅炉水")) {
|
||||
lb_wjz = false;
|
||||
}
|
||||
;
|
||||
String brly = labPat.getBrly();
|
||||
if(brly !=null)brly = commonUtil.getComDictNameById("PT", brly);
|
||||
if(brly !=null)if (brly.contains("质控")) lb_wjz = false;
|
||||
if (brly != null) brly = commonUtil.getComDictNameById("PT", brly);
|
||||
if (brly != null) if (brly.contains("质控")) lb_wjz = false;
|
||||
String ksdh = labPat.getKsdh();
|
||||
if(ksdh !=null)ksdh = commonUtil.getComDictNameById("DP", ksdh);
|
||||
if(ksdh !=null)if (ksdh.contains("检验科")) lb_wjz = false;
|
||||
if (ksdh != null) ksdh = commonUtil.getComDictNameById("DP", ksdh);
|
||||
if (ksdh != null) if (ksdh.contains("检验科")) lb_wjz = false;
|
||||
//同步主表危急值标识
|
||||
if (lb_wjz) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细结果计算参考值异常标志危急值标志并更新
|
||||
*
|
||||
@ -843,7 +875,9 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
String zd = null;
|
||||
if ("Y".equals(ygzd)) {
|
||||
zd = labPat.getZd();
|
||||
if (zd == null) {zd="";}
|
||||
if (zd == null) {
|
||||
zd = "";
|
||||
}
|
||||
}
|
||||
String slzq = null;
|
||||
if ("Y".equals(ygzq)) {
|
||||
@ -914,6 +948,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
if (!"".equals(wjzflag)) wjz = 1;
|
||||
return wjz;
|
||||
}
|
||||
|
||||
/**
|
||||
* 特定条件危急值判断
|
||||
*
|
||||
@ -987,6 +1022,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
if (lb_hasval) return 0;
|
||||
else return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取常用取值结果标志
|
||||
*
|
||||
@ -1018,26 +1054,28 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
|
||||
/**
|
||||
* 工作时间校验检验者审核者不允许相同 上班时间上午8点-12点下午2点到5点,周末不算
|
||||
*
|
||||
* @param labPat
|
||||
* @return 返回0通过,返回1不允许相同
|
||||
* @return 返回0通过, 返回1不允许相同
|
||||
*/
|
||||
private int checkWorkTime(LabPat labPat){
|
||||
private int checkWorkTime(LabPat labPat) {
|
||||
String yhdh = labPat.getYhdh();
|
||||
String hdys = labPat.getHdys();
|
||||
if(yhdh==null || yhdh.isEmpty()) return 0;
|
||||
if(hdys==null || hdys.isEmpty()) return 0;
|
||||
if(!yhdh.equals(hdys)) return 0;
|
||||
String sb1=commonUtil.getHISOPT("SHTIME1");
|
||||
String sb2=commonUtil.getHISOPT("SHTIME2");
|
||||
String sb3=commonUtil.getHISOPT("SHTIME3");
|
||||
String sb4=commonUtil.getHISOPT("SHTIME4");
|
||||
if((sb1==null || sb1.isEmpty()) && (sb2==null || sb2.isEmpty()) && (sb3==null || sb3.isEmpty()) && (sb4==null || sb4.isEmpty())) return 0;
|
||||
Date currenttime=DateUtils.getNowDate();
|
||||
if (yhdh == null || yhdh.isEmpty()) return 0;
|
||||
if (hdys == null || hdys.isEmpty()) return 0;
|
||||
if (!yhdh.equals(hdys)) return 0;
|
||||
String sb1 = commonUtil.getHISOPT("SHTIME1");
|
||||
String sb2 = commonUtil.getHISOPT("SHTIME2");
|
||||
String sb3 = commonUtil.getHISOPT("SHTIME3");
|
||||
String sb4 = commonUtil.getHISOPT("SHTIME4");
|
||||
if ((sb1 == null || sb1.isEmpty()) && (sb2 == null || sb2.isEmpty()) && (sb3 == null || sb3.isEmpty()) && (sb4 == null || sb4.isEmpty()))
|
||||
return 0;
|
||||
Date currenttime = DateUtils.getNowDate();
|
||||
int weekDay = DateUtils.getWeekDay(currenttime);
|
||||
//周末不算
|
||||
if(weekDay==6 && weekDay==7) return 0;
|
||||
int lt_now= Integer.parseInt(DateUtils.time(currenttime,"HH:mm").replace(":", ""));
|
||||
if((sb1==null || sb1.isEmpty()) && (sb2==null || sb2.isEmpty())) {
|
||||
if (weekDay == 6 && weekDay == 7) return 0;
|
||||
int lt_now = Integer.parseInt(DateUtils.time(currenttime, "HH:mm").replace(":", ""));
|
||||
if ((sb1 == null || sb1.isEmpty()) && (sb2 == null || sb2.isEmpty())) {
|
||||
sb1 = sb1.replace(":", "");
|
||||
sb2 = sb2.replace(":", "");
|
||||
|
||||
@ -1054,25 +1092,42 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
private int checkxpywrgjz(LabPat labPat){
|
||||
String ls_bz=labPat.getBz();
|
||||
String ls_sqh=labPat.getSqh();
|
||||
String yq=labPat.getYq();
|
||||
if(ls_sqh==null || ls_sqh.isEmpty()) return 0;
|
||||
if(ls_bz==null || ls_bz.isEmpty()) return 0;
|
||||
String ls_xpywr=commonUtil.getComOptValue(yq,"xpywrgjz");
|
||||
if(ls_xpywr==null || ls_xpywr.isEmpty()) return 0;
|
||||
if(ls_bz.contains(ls_xpywr)){
|
||||
String ls_yblx=labPat.getYblx();
|
||||
if(ls_yblx==null || ls_yblx.isEmpty()) return 0;
|
||||
String ls_yblxmc=commonUtil.getComDictNameById("BT",ls_yblx);
|
||||
if(ls_yblxmc==null || ls_yblxmc.isEmpty()) return 0;
|
||||
if(ls_yblxmc.contains("血")||ls_yblx.contains("血")){
|
||||
String ls_xpywrdh=commonUtil.getComOptValue(yq,"xpywrdh");
|
||||
if(ls_xpywrdh==null || ls_xpywrdh.isEmpty()) return 0;
|
||||
String ls_hdys=labPat.getHdys();
|
||||
if(ls_hdys==null || ls_hdys.isEmpty())ls_hdys=labPat.getYhdh();
|
||||
|
||||
/**
|
||||
* 备注自动登记血培养污染记录
|
||||
*
|
||||
* @param labPat
|
||||
* @return
|
||||
*/
|
||||
private int checkxpywrgjz(LabPat labPat) {
|
||||
String ls_bz = labPat.getBz();
|
||||
String ls_sqh = labPat.getSqh();
|
||||
String yq = labPat.getYq();
|
||||
if (ls_sqh == null || ls_sqh.isEmpty()) return 0;
|
||||
if (ls_bz == null || ls_bz.isEmpty()) return 0;
|
||||
String ls_xpywr = commonUtil.getComOptValue(yq, "xpywrgjz");
|
||||
if (ls_xpywr == null || ls_xpywr.isEmpty()) return 0;
|
||||
if (ls_bz.contains(ls_xpywr)) {
|
||||
String ls_yblx = labPat.getYblx();
|
||||
if (ls_yblx == null || ls_yblx.isEmpty()) return 0;
|
||||
String ls_yblxmc = commonUtil.getComDictNameById("BT", ls_yblx);
|
||||
if (ls_yblxmc == null || ls_yblxmc.isEmpty()) return 0;
|
||||
if (ls_yblxmc.contains("血") || ls_yblx.contains("血")) {
|
||||
String ls_xpywrdh = commonUtil.getComOptValue(yq, "xpywrdh");
|
||||
if (ls_xpywrdh == null || ls_xpywrdh.isEmpty()) return 0;
|
||||
String ls_hdys = labPat.getHdys();
|
||||
if (ls_hdys == null || ls_hdys.isEmpty()) ls_hdys = labPat.getYhdh();
|
||||
LabRefused labRefused = new LabRefused();
|
||||
labRefused.setSqh(ls_sqh);
|
||||
labRefused.setRefusetext(ls_xpywrdh);
|
||||
List<LabRefused> labRefusedList = commonUtil.getLabRefusedList(labRefused);
|
||||
if (labRefusedList.size() == 0) {
|
||||
labRefused.setRefusedtime(new Date());
|
||||
labRefused.setKsdh(labPat.getKsdh());
|
||||
labRefused.setBz("0");
|
||||
labRefused.setRefuseder(ls_hdys);
|
||||
commonUtil.insertLabRefused(labRefused);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user