Merge remote-tracking branch 'lis8.0/master'
This commit is contained in:
commit
f242b8c8af
@ -32,11 +32,11 @@ public class LabResult extends BaseEntity {
|
|||||||
private String refs;
|
private String refs;
|
||||||
private String flag;
|
private String flag;
|
||||||
private String dw;
|
private String dw;
|
||||||
private String resultFlag;
|
private String result_flag;
|
||||||
private String alarmFlag;
|
private String alarm_flag;
|
||||||
private String redoFlag;
|
private String redo_flag;
|
||||||
private String sqxmdh;
|
private String sqxmdh;
|
||||||
private String redoText;
|
private String redo_text;
|
||||||
private String bz3;
|
private String bz3;
|
||||||
private String textresult;
|
private String textresult;
|
||||||
private String xmmc;
|
private String xmmc;
|
||||||
|
|||||||
@ -83,8 +83,8 @@
|
|||||||
#{cutoff,jdbcType=VARCHAR}, #{jgbz,jdbcType=CHAR}, #{bz1,jdbcType=VARCHAR}, #{bz2,jdbcType=VARCHAR},
|
#{cutoff,jdbcType=VARCHAR}, #{jgbz,jdbcType=CHAR}, #{bz1,jdbcType=VARCHAR}, #{bz2,jdbcType=VARCHAR},
|
||||||
#{yhdh,jdbcType=VARCHAR}, #{instrid,jdbcType=INTEGER}, #{operdt,jdbcType=TIMESTAMP},
|
#{yhdh,jdbcType=VARCHAR}, #{instrid,jdbcType=INTEGER}, #{operdt,jdbcType=TIMESTAMP},
|
||||||
#{operna,jdbcType=VARCHAR}, #{refs,jdbcType=VARCHAR}, #{flag,jdbcType=VARCHAR},
|
#{operna,jdbcType=VARCHAR}, #{refs,jdbcType=VARCHAR}, #{flag,jdbcType=VARCHAR},
|
||||||
#{dw,jdbcType=VARCHAR}, #{resultFlag,jdbcType=CHAR}, #{alarmFlag,jdbcType=CHAR},
|
#{dw,jdbcType=VARCHAR}, #{result_flag,jdbcType=CHAR}, #{alarm_flag,jdbcType=CHAR},
|
||||||
#{redoFlag,jdbcType=CHAR}, #{sqxmdh,jdbcType=VARCHAR}, #{redoText,jdbcType=VARCHAR},
|
#{redo_flag,jdbcType=CHAR}, #{sqxmdh,jdbcType=VARCHAR}, #{redo_text,jdbcType=VARCHAR},
|
||||||
#{bz3,jdbcType=VARCHAR}, #{textresult,jdbcType=LONGVARCHAR})
|
#{bz3,jdbcType=VARCHAR}, #{textresult,jdbcType=LONGVARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
<insert id="insertSelective" parameterType="com.czlis.common.core.domain.entity.lis.LabResult">
|
||||||
@ -144,19 +144,19 @@
|
|||||||
<if test="dw != null">
|
<if test="dw != null">
|
||||||
dw,
|
dw,
|
||||||
</if>
|
</if>
|
||||||
<if test="resultFlag != null">
|
<if test="result_flag != null">
|
||||||
result_flag,
|
result_flag,
|
||||||
</if>
|
</if>
|
||||||
<if test="alarmFlag != null">
|
<if test="alarm_flag != null">
|
||||||
alarm_flag,
|
alarm_flag,
|
||||||
</if>
|
</if>
|
||||||
<if test="redoFlag != null">
|
<if test="redo_flag != null">
|
||||||
redo_flag,
|
redo_flag,
|
||||||
</if>
|
</if>
|
||||||
<if test="sqxmdh != null">
|
<if test="sqxmdh != null">
|
||||||
sqxmdh,
|
sqxmdh,
|
||||||
</if>
|
</if>
|
||||||
<if test="redoText != null">
|
<if test="redo_text != null">
|
||||||
redo_text,
|
redo_text,
|
||||||
</if>
|
</if>
|
||||||
<if test="bz3 != null">
|
<if test="bz3 != null">
|
||||||
@ -221,20 +221,20 @@
|
|||||||
<if test="dw != null">
|
<if test="dw != null">
|
||||||
#{dw,jdbcType=VARCHAR},
|
#{dw,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="resultFlag != null">
|
<if test="result_flag != null">
|
||||||
#{resultFlag,jdbcType=CHAR},
|
#{result_flag,jdbcType=CHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="alarmFlag != null">
|
<if test="alarm_flag != null">
|
||||||
#{alarmFlag,jdbcType=CHAR},
|
#{alarm_flag,jdbcType=CHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="redoFlag != null">
|
<if test="redo_flag != null">
|
||||||
#{redoFlag,jdbcType=CHAR},
|
#{redo_flag,jdbcType=CHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="sqxmdh != null">
|
<if test="sqxmdh != null">
|
||||||
#{sqxmdh,jdbcType=VARCHAR},
|
#{sqxmdh,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="redoText != null">
|
<if test="redo_text != null">
|
||||||
#{redoText,jdbcType=VARCHAR},
|
#{redo_text,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="bz3 != null">
|
<if test="bz3 != null">
|
||||||
#{bz3,jdbcType=VARCHAR},
|
#{bz3,jdbcType=VARCHAR},
|
||||||
@ -289,20 +289,20 @@
|
|||||||
<if test="dw != null">
|
<if test="dw != null">
|
||||||
dw = #{dw,jdbcType=VARCHAR},
|
dw = #{dw,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="resultFlag != null">
|
<if test="result_flag != null">
|
||||||
result_flag = #{resultFlag,jdbcType=CHAR},
|
result_flag = #{result_flag,jdbcType=CHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="alarmFlag != null">
|
<if test="alarm_flag != null">
|
||||||
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
alarm_flag = #{alarm_flag,jdbcType=CHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="redoFlag != null">
|
<if test="redo_flag != null">
|
||||||
redo_flag = #{redoFlag,jdbcType=CHAR},
|
redo_flag = #{redo_flag,jdbcType=CHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="sqxmdh != null">
|
<if test="sqxmdh != null">
|
||||||
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="redoText != null">
|
<if test="redo_text != null">
|
||||||
redo_text = #{redoText,jdbcType=VARCHAR},
|
redo_text = #{redo_text,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="bz3 != null">
|
<if test="bz3 != null">
|
||||||
bz3 = #{bz3,jdbcType=VARCHAR},
|
bz3 = #{bz3,jdbcType=VARCHAR},
|
||||||
@ -332,11 +332,11 @@
|
|||||||
refs = #{refs,jdbcType=VARCHAR},
|
refs = #{refs,jdbcType=VARCHAR},
|
||||||
flag = #{flag,jdbcType=VARCHAR},
|
flag = #{flag,jdbcType=VARCHAR},
|
||||||
dw = #{dw,jdbcType=VARCHAR},
|
dw = #{dw,jdbcType=VARCHAR},
|
||||||
result_flag = #{resultFlag,jdbcType=CHAR},
|
result_flag = #{result_flag,jdbcType=CHAR},
|
||||||
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
alarm_flag = #{alarm_flag,jdbcType=CHAR},
|
||||||
redo_flag = #{redoFlag,jdbcType=CHAR},
|
redo_flag = #{redo_flag,jdbcType=CHAR},
|
||||||
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
||||||
redo_text = #{redoText,jdbcType=VARCHAR},
|
redo_text = #{redo_text,jdbcType=VARCHAR},
|
||||||
bz3 = #{bz3,jdbcType=VARCHAR},
|
bz3 = #{bz3,jdbcType=VARCHAR},
|
||||||
textresult = #{textresult,jdbcType=LONGVARCHAR}
|
textresult = #{textresult,jdbcType=LONGVARCHAR}
|
||||||
where jyrq = #{jyrq}
|
where jyrq = #{jyrq}
|
||||||
@ -360,11 +360,11 @@
|
|||||||
refs = #{refs,jdbcType=VARCHAR},
|
refs = #{refs,jdbcType=VARCHAR},
|
||||||
flag = #{flag,jdbcType=VARCHAR},
|
flag = #{flag,jdbcType=VARCHAR},
|
||||||
dw = #{dw,jdbcType=VARCHAR},
|
dw = #{dw,jdbcType=VARCHAR},
|
||||||
result_flag = #{resultFlag,jdbcType=CHAR},
|
result_flag = #{result_flag,jdbcType=CHAR},
|
||||||
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
alarm_flag = #{alarm_flag,jdbcType=CHAR},
|
||||||
redo_flag = #{redoFlag,jdbcType=CHAR},
|
redo_flag = #{redo_flag,jdbcType=CHAR},
|
||||||
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
||||||
redo_text = #{redoText,jdbcType=VARCHAR},
|
redo_text = #{redo_text,jdbcType=VARCHAR},
|
||||||
bz3 = #{bz3,jdbcType=VARCHAR}
|
bz3 = #{bz3,jdbcType=VARCHAR}
|
||||||
where jyrq = #{jyrq}
|
where jyrq = #{jyrq}
|
||||||
and yq = #{yq,jdbcType=CHAR}
|
and yq = #{yq,jdbcType=CHAR}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
and yq = #{yq,jdbcType=CHAR}
|
and yq = #{yq,jdbcType=CHAR}
|
||||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteLabPatwarning">
|
<delete id="deleteLabResultwarning">
|
||||||
delete from lab_resultwarning
|
delete from lab_resultwarning
|
||||||
where jyrq = #{jyrq}
|
where jyrq = #{jyrq}
|
||||||
and yq = #{yq}
|
and yq = #{yq}
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getXmValJgbz" resultType="com.czlis.common.core.domain.entity.lis.XmVal">
|
<select id="getXmValJgbz" resultType="String">
|
||||||
select TOP 1 jgbz from xm_val
|
select TOP 1 jgbz from xm_val
|
||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq != ''">
|
<if test="yq != null and yq != ''">
|
||||||
|
|||||||
@ -64,5 +64,9 @@ public class LisWorkOperController extends BaseController {
|
|||||||
public Result unconfirmlog( Date jyrq, String yq, String ybh, String yhdh,String reason){
|
public Result unconfirmlog( Date jyrq, String yq, String ybh, String yhdh,String reason){
|
||||||
return lisWorkOperService.unconfirmlog(jyrq, yq, ybh, yhdh,reason);
|
return lisWorkOperService.unconfirmlog(jyrq, yq, ybh, yhdh,reason);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/reglimit")
|
||||||
|
public Result reglimit( Date jyrq, String yq, String ybh, String yhdh,String qrr,String phone,String tzfs){
|
||||||
|
return lisWorkOperService.reglimit(jyrq, yq, ybh, yhdh,qrr,phone,tzfs);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,5 +20,4 @@ public interface LisWorkOperMapper {
|
|||||||
Integer checkresultwxh(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh);
|
Integer checkresultwxh(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh);
|
||||||
LabPat checkdublereport(@Param("sqh") String sqh, @Param("ybh") String ybh);
|
LabPat checkdublereport(@Param("sqh") String sqh, @Param("ybh") String ybh);
|
||||||
LabPat checkyqdublereport(@Param("sqh") String sqh,@Param("yq") String yq, @Param("ybh") String ybh);
|
LabPat checkyqdublereport(@Param("sqh") String sqh,@Param("yq") String yq, @Param("ybh") String ybh);
|
||||||
Integer getxsws(@Param("yq") String yq, @Param("xmdh") String xmdh);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,8 +6,10 @@ import com.czlis.common.core.domain.entity.lis.LabPat;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public interface LisWorkOperService {
|
public interface LisWorkOperService {
|
||||||
Result newPatInfo(Date jyrq,String ybh, String sqh, String yq, Long userId);
|
Result newPatInfo(Date jyrq, String ybh, String sqh, String yq, Long userId);
|
||||||
|
|
||||||
Result changePat(LabPat labPat);
|
Result changePat(LabPat labPat);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新
|
* 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新
|
||||||
*
|
*
|
||||||
@ -17,6 +19,7 @@ public interface LisWorkOperService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Result saveallresult(Date jyrq, String yq, String ybh);
|
Result saveallresult(Date jyrq, String yq, String ybh);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结果表补充申请单项目代码
|
* 结果表补充申请单项目代码
|
||||||
*
|
*
|
||||||
@ -25,8 +28,10 @@ public interface LisWorkOperService {
|
|||||||
* @param ybh
|
* @param ybh
|
||||||
*/
|
*/
|
||||||
void setItemSqxmdh(Date jyrq, String yq, String ybh);
|
void setItemSqxmdh(Date jyrq, String yq, String ybh);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核报告
|
* 审核报告
|
||||||
|
*
|
||||||
* @param jyrq
|
* @param jyrq
|
||||||
* @param yq
|
* @param yq
|
||||||
* @param ybh
|
* @param ybh
|
||||||
@ -37,6 +42,7 @@ public interface LisWorkOperService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 解除审核
|
* 解除审核
|
||||||
|
*
|
||||||
* @param jyrq
|
* @param jyrq
|
||||||
* @param yq
|
* @param yq
|
||||||
* @param ybh
|
* @param ybh
|
||||||
@ -44,7 +50,9 @@ public interface LisWorkOperService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Result unconfirm(Date jyrq, String yq, String ybh, String hdys);
|
Result unconfirm(Date jyrq, String yq, String ybh, String hdys);
|
||||||
Result unconfirmlog(Date jyrq, String yq, String ybh, String hdys,String reason);
|
|
||||||
|
Result unconfirmlog(Date jyrq, String yq, String ybh, String hdys, String reason);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算项目参考值结果异常标志
|
* 计算项目参考值结果异常标志
|
||||||
*
|
*
|
||||||
@ -53,6 +61,7 @@ public interface LisWorkOperService {
|
|||||||
* @param ybh
|
* @param ybh
|
||||||
*/
|
*/
|
||||||
Result saverefs(Date jyrq, String yq, String ybh);
|
Result saverefs(Date jyrq, String yq, String ybh);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算项目增加及重新计算
|
* 计算项目增加及重新计算
|
||||||
*
|
*
|
||||||
@ -61,6 +70,7 @@ public interface LisWorkOperService {
|
|||||||
* @param ybh
|
* @param ybh
|
||||||
*/
|
*/
|
||||||
Result calcsample(Date jyrq, String yq, String ybh);
|
Result calcsample(Date jyrq, String yq, String ybh);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取常用取值结果标志
|
* 获取常用取值结果标志
|
||||||
*
|
*
|
||||||
@ -70,4 +80,18 @@ public interface LisWorkOperService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getitemlmtflag(String yq, String xmdh, String csjg);
|
String getitemlmtflag(String yq, String xmdh, String csjg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登记危急值
|
||||||
|
*
|
||||||
|
* @param jyrq
|
||||||
|
* @param yq
|
||||||
|
* @param ybh
|
||||||
|
* @param yhdh
|
||||||
|
* @param qrr
|
||||||
|
* @param phone
|
||||||
|
* @param tzfs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Result reglimit(Date jyrq, String yq, String ybh, String yhdh, String qrr, String phone, String tzfs);
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.czlis.liswork.service.impl;
|
package com.czlis.liswork.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.SysUser;
|
||||||
import com.czlis.common.core.domain.entity.lis.*;
|
import com.czlis.common.core.domain.entity.lis.*;
|
||||||
import com.czlis.common.utils.DateUtils;
|
import com.czlis.common.utils.DateUtils;
|
||||||
import com.czlis.common.utils.SecurityUtils;
|
import com.czlis.common.utils.SecurityUtils;
|
||||||
@ -19,6 +20,7 @@ import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
|
|||||||
import com.czlis.interfaceCommon.pojo.inter.SetReport;
|
import com.czlis.interfaceCommon.pojo.inter.SetReport;
|
||||||
import com.czlis.interfaceCommon.pojo.inter.SetReqStatus;
|
import com.czlis.interfaceCommon.pojo.inter.SetReqStatus;
|
||||||
import com.czlis.interfaceCommon.utils.*;
|
import com.czlis.interfaceCommon.utils.*;
|
||||||
|
import com.czlis.liswork.mapper.LisWorkMapper;
|
||||||
import com.czlis.liswork.mapper.LisWorkOperMapper;
|
import com.czlis.liswork.mapper.LisWorkOperMapper;
|
||||||
import com.czlis.liswork.mapper.dict.LabInstrvsreqclassMapper;
|
import com.czlis.liswork.mapper.dict.LabInstrvsreqclassMapper;
|
||||||
import com.czlis.liswork.pojo.DTO.ResultCalcDTO;
|
import com.czlis.liswork.pojo.DTO.ResultCalcDTO;
|
||||||
@ -38,7 +40,8 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class LisWorkOperServiceImpl implements LisWorkOperService {
|
public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||||
|
@Autowired
|
||||||
|
private LisWorkMapper lisWorkMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
LisWorkOperMapper lisWorkOperMapper;
|
LisWorkOperMapper lisWorkOperMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -238,22 +241,25 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
labResultList = saveallresult(labPat, labResultList);
|
labResultList = saveallresult(labPat, labResultList);
|
||||||
boolean wjz = getAlarmFlag(labResultList);
|
boolean wjz = getAlarmFlag(labResultList);
|
||||||
//同步主表危急值标识
|
//同步主表危急值标识
|
||||||
String alarmflag = labPat.getAlarmflag();
|
String alarmflag = labPat.getAlarmflag().trim();
|
||||||
if (("1".equals(alarmflag) && !wjz)) {
|
if (("1".equals(alarmflag) && !wjz)) {
|
||||||
labPat.setAlarmflag("1");
|
|
||||||
commonUtil.updateLabPat(labPat);
|
|
||||||
} else if (("".equals(alarmflag) || alarmflag == null) && wjz) {
|
|
||||||
labPat.setAlarmflag("");
|
labPat.setAlarmflag("");
|
||||||
commonUtil.updateLabPat(labPat);
|
commonUtil.updateLabPat(labPat);
|
||||||
|
} else if (("".equals(alarmflag) || alarmflag == null) && wjz) {
|
||||||
|
labPat.setAlarmflag("1");
|
||||||
|
commonUtil.updateLabPat(labPat);
|
||||||
|
}
|
||||||
|
if(wjz){
|
||||||
|
return new Result("4", getAlarmMsg(labResultList),4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (problemId < 4) problemId = 4;
|
if (problemId < 5) problemId = 5;
|
||||||
if (problemId < 5) {
|
if (problemId < 6) {
|
||||||
//医学审核条件判断
|
//医学审核条件判断
|
||||||
Result result = chksample(labPat, labResultList, problemId);
|
Result result = chksample(labPat, labResultList, problemId);
|
||||||
if (!"0".equals(result.getCode())) return result;
|
if (!"0".equals(result.getCode())) return result;
|
||||||
}
|
}
|
||||||
if (problemId < 5) problemId = 5;
|
if (problemId < 6) problemId = 6;
|
||||||
if (problemId < 99) {
|
if (problemId < 99) {
|
||||||
//高级医学审核条件判断
|
//高级医学审核条件判断
|
||||||
Result result = chksamplenew(labPat, labResultList, problemId);
|
Result result = chksamplenew(labPat, labResultList, problemId);
|
||||||
@ -434,10 +440,10 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
*/
|
*/
|
||||||
private Result chksample(LabPat labPat, List<LabResult> labResultList, Integer problemId) {
|
private Result chksample(LabPat labPat, List<LabResult> labResultList, Integer problemId) {
|
||||||
//医学审核条件判断
|
//医学审核条件判断
|
||||||
if (problemId < 5) {
|
if (problemId < 6) {
|
||||||
String checkvalue = checkResultUtils.chksample(labPat, labResultList);
|
String checkvalue = checkResultUtils.chksample(labPat, labResultList);
|
||||||
if (checkvalue != null && !"".equals(checkvalue)) {
|
if (checkvalue != null && !"".equals(checkvalue)) {
|
||||||
return new Result("5", checkvalue, 5);
|
return new Result("5", checkvalue, 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Result("0", "保存成功!");
|
return new Result("0", "保存成功!");
|
||||||
@ -454,10 +460,11 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
//医学审核条件判断
|
//医学审核条件判断
|
||||||
Boolean setbz = false;
|
Boolean setbz = false;
|
||||||
String bz = labPat.getBz();
|
String bz = labPat.getBz();
|
||||||
|
int startid=6;
|
||||||
//医学审核条件判断(新规则),预留99个递归ID
|
//医学审核条件判断(新规则),预留99个递归ID
|
||||||
if (problemId < 5) problemId = 5;
|
if (problemId < startid) problemId = startid;
|
||||||
if (problemId < 99) {
|
if (problemId < 99) {
|
||||||
int xh = problemId - 5;
|
int xh = problemId - startid;
|
||||||
Map<String, Object> chksamplenewvalue = checkResultUtils.chksamplenew(labPat, labResultList, xh);
|
Map<String, Object> chksamplenewvalue = checkResultUtils.chksamplenew(labPat, labResultList, xh);
|
||||||
String chkCode = (String) chksamplenewvalue.get("code");
|
String chkCode = (String) chksamplenewvalue.get("code");
|
||||||
String chkMsg = (String) chksamplenewvalue.get("msg");
|
String chkMsg = (String) chksamplenewvalue.get("msg");
|
||||||
@ -465,7 +472,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
labPat.setBz(bz);
|
labPat.setBz(bz);
|
||||||
xh = (Integer) chksamplenewvalue.get("xh");
|
xh = (Integer) chksamplenewvalue.get("xh");
|
||||||
setbz = (Boolean) chksamplenewvalue.get("setbz");
|
setbz = (Boolean) chksamplenewvalue.get("setbz");
|
||||||
problemId = 5 + xh;
|
problemId = startid + xh;
|
||||||
if ("5".equals(chkCode)) {
|
if ("5".equals(chkCode)) {
|
||||||
if (setbz) {
|
if (setbz) {
|
||||||
commonUtil.updateLabPat(labPat);
|
commonUtil.updateLabPat(labPat);
|
||||||
@ -682,11 +689,11 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
//同步主表危急值标识
|
//同步主表危急值标识
|
||||||
String alarmflag = labPat.getAlarmflag();
|
String alarmflag = labPat.getAlarmflag();
|
||||||
if (("1".equals(alarmflag) && !wjz)) {
|
if (("1".equals(alarmflag) && !wjz)) {
|
||||||
labPat.setAlarmflag("1");
|
|
||||||
commonUtil.updateLabPat(labPat);
|
|
||||||
} else if (("".equals(alarmflag) || alarmflag == null) && wjz) {
|
|
||||||
labPat.setAlarmflag("");
|
labPat.setAlarmflag("");
|
||||||
commonUtil.updateLabPat(labPat);
|
commonUtil.updateLabPat(labPat);
|
||||||
|
} else if (("".equals(alarmflag.trim()) || alarmflag == null) && wjz) {
|
||||||
|
labPat.setAlarmflag("1");
|
||||||
|
commonUtil.updateLabPat(labPat);
|
||||||
}
|
}
|
||||||
return new Result("0", "保存成功!");
|
return new Result("0", "保存成功!");
|
||||||
}
|
}
|
||||||
@ -766,7 +773,6 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
if (!jsxmold.equals(jsxm)) {
|
if (!jsxmold.equals(jsxm)) {
|
||||||
jsxmold = jsxm;
|
jsxmold = jsxm;
|
||||||
String jsgs = xmCalc.getJsgs();
|
String jsgs = xmCalc.getJsgs();
|
||||||
String xmdh = xmCalc.getXmdh();
|
|
||||||
boolean setjgsg = true;
|
boolean setjgsg = true;
|
||||||
boolean lb_jsx = false;
|
boolean lb_jsx = false;
|
||||||
Map<String, String> variables = new HashMap<>();
|
Map<String, String> variables = new HashMap<>();
|
||||||
@ -813,7 +819,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
commonUtil.updateLabResult(labResult);
|
commonUtil.updateLabResult(labResult);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
XmInfo xmInfo = commonUtil.getXmInfo(yq, xmdh);
|
XmInfo xmInfo = commonUtil.getXmInfo(yq, jsxm);
|
||||||
if (LisUtil.isNumber(result)) {
|
if (LisUtil.isNumber(result)) {
|
||||||
Integer xsws = xmInfo.getXsws();
|
Integer xsws = xmInfo.getXsws();
|
||||||
if (xsws >= 0) result = LisUtil.round(result, xsws);
|
if (xsws >= 0) result = LisUtil.round(result, xsws);
|
||||||
@ -829,7 +835,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
labResult.setYgzd(xmInfo.getYgzd());
|
labResult.setYgzd(xmInfo.getYgzd());
|
||||||
labResult.setYgzq(xmInfo.getYgzq());
|
labResult.setYgzq(xmInfo.getYgzq());
|
||||||
labResult.setXmmc(xmInfo.getXmmc());
|
labResult.setXmmc(xmInfo.getXmmc());
|
||||||
labResultList.set(labResultList.size(), labResult);
|
labResultList.add(labResult);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -875,7 +881,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
String yq = labPat.getYq();
|
String yq = labPat.getYq();
|
||||||
String ybh = labPat.getYbh();
|
String ybh = labPat.getYbh();
|
||||||
String yqdl = commonUtil.getYqdl(yq);
|
String yqdl = commonUtil.getYqdl(yq);
|
||||||
boolean lb_setbj = true, lb_wjz = false, nowjz = false;
|
boolean lb_setbj = true, nowjz = false;
|
||||||
//危急值标识去除原则 nowjz = true 不能算做危急值
|
//危急值标识去除原则 nowjz = true 不能算做危急值
|
||||||
String brxm = labPat.getBrxm();
|
String brxm = labPat.getBrxm();
|
||||||
if (brxm != null) {
|
if (brxm != null) {
|
||||||
@ -918,29 +924,32 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
//当结果为数值并且与周期诊断无关,计算存储过程保存成功后,只进行危急值判断
|
//当结果为数值并且与周期诊断无关,计算存储过程保存成功后,只进行危急值判断
|
||||||
if (lb_nummode && lb_setbj && !"Y".equals(ygzd) && !"Y".equals(ygzq)) {
|
if (lb_nummode && lb_setbj && !"Y".equals(ygzd) && !"Y".equals(ygzq)) {
|
||||||
if (nowjz) {
|
if (nowjz) {
|
||||||
String resultalarmflag1 = labResult.getAlarmFlag();
|
String resultalarmflag1 = labResult.getAlarm_flag().trim();
|
||||||
if (!"".equals(resultalarmflag1) && resultalarmflag1 != null) {
|
if (!"".equals(resultalarmflag1) && resultalarmflag1 != null) {
|
||||||
labResult.setAlarmFlag("");
|
labResult.setAlarm_flag("");
|
||||||
commonUtil.updateLabResult(labResult);
|
commonUtil.updateLabResult(labResult);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String xmdh = labResult.getXmdh();
|
String xmdh = labResult.getXmdh();
|
||||||
List<XmAlarmdetail> getXmAlarmdetail = xmAlarmdetailList.stream().filter(detail -> detail.getXmdh().equals(xmdh)).collect(Collectors.toList());
|
List<XmAlarmdetail> getXmAlarmdetail = xmAlarmdetailList.stream().filter(detail -> detail.getXmdh().equals(xmdh)).collect(Collectors.toList());
|
||||||
int wjz = alarmcondition(labPat, labResult, getXmAlarmdetail);
|
int wjz = alarmcondition(labPat, labResult, getXmAlarmdetail);
|
||||||
if (wjz != -1) {//危急值标识特殊判断存在时优先使用特殊结果
|
if (wjz == 1) {//危急值标识特殊判断存在时优先使用特殊结果
|
||||||
String resultalarmflag = labResult.getAlarmFlag();
|
String jgbz = labResult.getResult_flag();
|
||||||
if (("".equals(resultalarmflag) && lb_wjz)) {
|
if ("".equals(jgbz)||jgbz==null)jgbz="H";
|
||||||
String jgbz = labResult.getJgbz();
|
if (!"L".equals(jgbz))jgbz="H";
|
||||||
if (jgbz == null || !"L".equals(jgbz)) jgbz = "H";
|
String resultalarmflag = labResult.getAlarm_flag().trim();
|
||||||
labResult.setAlarmFlag(jgbz);
|
if(!jgbz.equals(resultalarmflag)) {
|
||||||
|
labResult.setAlarm_flag(jgbz);
|
||||||
commonUtil.updateLabResult(labResult);
|
commonUtil.updateLabResult(labResult);
|
||||||
} else if (!"".equals(resultalarmflag) && !lb_wjz) {
|
}
|
||||||
labResult.setAlarmFlag("");
|
}else if (wjz == 0) {
|
||||||
|
String jgbz = "";
|
||||||
|
String resultalarmflag = labResult.getAlarm_flag().trim();
|
||||||
|
if(!jgbz.equals(resultalarmflag)) {
|
||||||
|
labResult.setAlarm_flag(jgbz);
|
||||||
commonUtil.updateLabResult(labResult);
|
commonUtil.updateLabResult(labResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String resultalarmflag1 = labResult.getAlarmFlag();
|
|
||||||
if (!"".equals(resultalarmflag1) && resultalarmflag1 != null) lb_wjz = true;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String xmdh = labResult.getXmdh();
|
String xmdh = labResult.getXmdh();
|
||||||
@ -952,9 +961,9 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
labResult.setCsjg(csjg);
|
labResult.setCsjg(csjg);
|
||||||
labResult.setDw(labResult0.getDw());
|
labResult.setDw(labResult0.getDw());
|
||||||
labResult.setRefs(labResult0.getRefs());
|
labResult.setRefs(labResult0.getRefs());
|
||||||
labResult.setResultFlag(labResult0.getResultFlag());
|
labResult.setResult_flag(labResult0.getResult_flag());
|
||||||
labResult.setJgbz(labResult0.getJgbz());
|
labResult.setJgbz(labResult0.getJgbz());
|
||||||
labResult.setAlarmFlag(labResult0.getAlarmFlag());
|
labResult.setAlarm_flag(labResult0.getAlarm_flag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -978,10 +987,10 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
if (csjg == null || csjg.trim().isEmpty()) return labResult;
|
if (csjg == null || csjg.trim().isEmpty()) return labResult;
|
||||||
String csjgnew = LisUtil.getOverNumber(csjg.trim());
|
String csjgnew = LisUtil.getOverNumber(csjg.trim());
|
||||||
boolean lb_nummode = LisUtil.isNumber(csjgnew);
|
boolean lb_nummode = LisUtil.isNumber(csjgnew);
|
||||||
|
String dw = xmInfo.getDw();
|
||||||
|
String refs = xmInfo.getDyckz();
|
||||||
//当结果为数值时计算上下限
|
//当结果为数值时计算上下限
|
||||||
if (lb_nummode) {
|
if (lb_nummode) {
|
||||||
String dw = xmInfo.getDw();
|
|
||||||
String refs = xmInfo.getDyckz();
|
|
||||||
Double ckxx = xmInfo.getCkxx();
|
Double ckxx = xmInfo.getCkxx();
|
||||||
Double cksx = xmInfo.getCksx();
|
Double cksx = xmInfo.getCksx();
|
||||||
Double llimit = xmInfo.getLlimit();
|
Double llimit = xmInfo.getLlimit();
|
||||||
@ -1038,7 +1047,6 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
if (alterxx != null) llimit = alterxx;
|
if (alterxx != null) llimit = alterxx;
|
||||||
if (altersx != null) hlimit = altersx;
|
if (altersx != null) hlimit = altersx;
|
||||||
}
|
}
|
||||||
if (lb_nummode) {
|
|
||||||
//数值型结果判断
|
//数值型结果判断
|
||||||
Double csjgnum = Double.valueOf(csjgnew);
|
Double csjgnum = Double.valueOf(csjgnew);
|
||||||
if (ckxx != null) if (csjgnum < ckxx) resultflag = "L";
|
if (ckxx != null) if (csjgnum < ckxx) resultflag = "L";
|
||||||
@ -1069,15 +1077,21 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
//小数保留位数计算
|
//小数保留位数计算
|
||||||
Integer xsws = xmInfo.getXsws();
|
Integer xsws = xmInfo.getXsws();
|
||||||
if (xsws >= 0) csjg = LisUtil.round(csjg, xsws);
|
if (xsws >= 0) csjg = LisUtil.round(csjg, xsws);
|
||||||
labResult.setCsjg(csjg);
|
if(csjg==null)csjg="";
|
||||||
labResult.setDw(dw);
|
if(dw==null)dw="";
|
||||||
labResult.setRefs(refs);
|
if(refs==null)refs="";
|
||||||
labResult.setResultFlag(resultflag);
|
if(resultflag==null)resultflag="";
|
||||||
labResult.setJgbz(resultflag);
|
if(wjzflag==null)wjzflag="";
|
||||||
labResult.setAlarmFlag(wjzflag);
|
if(!csjg.equals(labResult.getCsjg())||!dw.equals(labResult.getDw())||!refs.equals(labResult.getRefs())||
|
||||||
|
!resultflag.equals(labResult.getResult_flag().trim())||!resultflag.equals(labResult.getJgbz().trim())||!wjzflag.equals(labResult.getAlarm_flag().trim())) {
|
||||||
commonUtil.updateLabResult(labResult);
|
labResult.setCsjg(csjg);
|
||||||
}
|
labResult.setDw(dw);
|
||||||
|
labResult.setRefs(refs);
|
||||||
|
labResult.setResult_flag(resultflag);
|
||||||
|
labResult.setJgbz(resultflag);
|
||||||
|
labResult.setAlarm_flag(wjzflag);
|
||||||
|
commonUtil.updateLabResult(labResult);
|
||||||
|
}
|
||||||
return labResult;
|
return labResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1272,13 +1286,36 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
*/
|
*/
|
||||||
private boolean getAlarmFlag(List<LabResult> labResultList) {
|
private boolean getAlarmFlag(List<LabResult> labResultList) {
|
||||||
boolean wjz = false;
|
boolean wjz = false;
|
||||||
List<LabResult> labResultList0 = labResultList.stream().filter(xm -> !"".equals(xm.getAlarmFlag()) && xm.getAlarmFlag() != null).collect(Collectors.toList());
|
List<LabResult> labResultList0 = labResultList.stream().filter(xm -> !"".equals(xm.getAlarm_flag().trim()) && xm.getAlarm_flag() != null).collect(Collectors.toList());
|
||||||
if (labResultList0.size() > 0) {
|
if (labResultList0.size() > 0) {
|
||||||
wjz = true;
|
wjz = true;
|
||||||
}
|
}
|
||||||
return wjz;
|
return wjz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取危急值信息集合
|
||||||
|
* @param labResultList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getAlarmMsg(List<LabResult> labResultList) {
|
||||||
|
String wjzmsg = "";
|
||||||
|
List<LabResult> labResultList0 = labResultList.stream().filter(xm -> !"".equals(xm.getAlarm_flag().trim()) && xm.getAlarm_flag() != null).collect(Collectors.toList());
|
||||||
|
if (labResultList0.size() > 0) {
|
||||||
|
for (LabResult labResult : labResultList0) {
|
||||||
|
String xmmc = labResult.getXmmc();
|
||||||
|
String cjsg = labResult.getCsjg();
|
||||||
|
if (!"".equals(cjsg) && cjsg != null) {
|
||||||
|
cjsg = ",结果:" + cjsg;
|
||||||
|
} else {
|
||||||
|
cjsg = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
wjzmsg = wjzmsg + "项目:" + xmmc + cjsg + LisUtil.LINE_SEPARATOR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return wjzmsg;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 解除审核原因登记
|
* 解除审核原因登记
|
||||||
*
|
*
|
||||||
@ -1409,4 +1446,65 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
comLog.setRzdt(new Date());
|
comLog.setRzdt(new Date());
|
||||||
commonUtil.insertComLog(comLog);
|
commonUtil.insertComLog(comLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result reglimit( Date jyrq, String yq, String ybh, String yhdh,String qrr,String phone,String tzfs){
|
||||||
|
log.info("登记危急值{}",tzfs);
|
||||||
|
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
||||||
|
if(problemId<5) {
|
||||||
|
LabPatwarning labPatwarning0=commonUtil.getLabPatwarning(jyrq, yq, ybh);
|
||||||
|
if (labPatwarning0 != null) {
|
||||||
|
return new Result("4", "该标本已经登记,是否重新登记?", 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonUtil.deleteLabPatwarning(jyrq, yq, ybh);
|
||||||
|
commonUtil.deleteLabResultwarning(jyrq, yq, ybh);
|
||||||
|
LabPatwarning labPatwarning =new LabPatwarning();
|
||||||
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
|
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||||
|
String jzbz=labPat.getJzbz().trim();
|
||||||
|
if(!"1".equals(jzbz)) {jzbz="0";}
|
||||||
|
if("".equals(yhdh)||yhdh==null) {yhdh=labPat.getHdys();}
|
||||||
|
if("".equals(yhdh)||yhdh==null) {
|
||||||
|
SysUser sysUser= SecurityUtils.getLoginUser().getUser();
|
||||||
|
yhdh=sysUser.getNickName();
|
||||||
|
}else{
|
||||||
|
SysUser sysUser=lisWorkMapper.getSysUser(yhdh);
|
||||||
|
yhdh=sysUser.getNickName();
|
||||||
|
}
|
||||||
|
String sjys=labPat.getSjys();
|
||||||
|
String sjysname=commonUtil.getComDictNameById("SRD",sjys);
|
||||||
|
if(sjysname==null||"".equals(sjysname)) {sjysname=sjys;}
|
||||||
|
if("".equals(qrr)||qrr==null) {qrr=labPat.getSjys();}
|
||||||
|
labPatwarning.setJyrq(jyrq);
|
||||||
|
labPatwarning.setYq(yq);
|
||||||
|
labPatwarning.setYbh(ybh);
|
||||||
|
labPatwarning.setLb(jzbz);
|
||||||
|
labPatwarning.setBgr(yhdh);
|
||||||
|
labPatwarning.setBtzr(sjysname);
|
||||||
|
labPatwarning.setTzsj(new Date());
|
||||||
|
if("2".equals(tzfs)){
|
||||||
|
labPatwarning.setTzfs("电话通知");
|
||||||
|
labPatwarning.setQrr(qrr);
|
||||||
|
labPatwarning.setQrsj(new Date());
|
||||||
|
}else{
|
||||||
|
labPatwarning.setTzfs("系统通知");
|
||||||
|
}
|
||||||
|
commonUtil.insertLabPatwarning(labPatwarning);
|
||||||
|
List<LabResult> labResultList0 = labResultList.stream().filter(xm -> !"".equals(xm.getAlarm_flag().trim()) && xm.getAlarm_flag() != null).collect(Collectors.toList());
|
||||||
|
if (labResultList0.size() > 0) {
|
||||||
|
for (LabResult labResult : labResultList0) {
|
||||||
|
LabResultwarning labResultwarning = new LabResultwarning();
|
||||||
|
labResultwarning.setJyrq(jyrq);
|
||||||
|
labResultwarning.setYq(yq);
|
||||||
|
labResultwarning.setYbh(ybh);
|
||||||
|
labResultwarning.setXmdh(labResult.getXmdh());
|
||||||
|
labResultwarning.setCsjg(labResult.getCsjg());
|
||||||
|
labResultwarning.setJgbz("J");
|
||||||
|
labResultwarning.setBz("");
|
||||||
|
commonUtil.insertLabResultwarning(labResultwarning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Result("0", "登记成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user