Compare commits

..

No commits in common. "92dbfb27f2b4c037e254e14daca76a2e7bcf604a" and "f8d625ae337a060dcb9a0a42b2698435ede44242" have entirely different histories.

9 changed files with 23 additions and 151 deletions

View File

@ -48,5 +48,4 @@ public class LabResult extends BaseEntity {
private String cp_compa;
private String cp_lastflag;
private Date cp_lastjyrq;
private String germclass;
}

View File

@ -24,5 +24,4 @@ public class LabResultMed {
private String txtresult;
private String ckz;
private String cp_bz;
private String ywmc;
}

View File

@ -90,7 +90,7 @@ public class LisWorkBase {
* @param labPat 病人信息
* @return 返回
*/
public boolean checknowjz(LabPat labPat) {
boolean checknowjz(LabPat labPat) {
//危急值标识去除原则 nowjz = true 不能算做危急值
String brxm = labPat.getBrxm();
if (brxm != null) {

View File

@ -397,7 +397,7 @@ public class LisWorkcom extends LisWorkBase{
* @param labResult
* @return
*/
public LabResult setxmdhrefs(LabPat labPat, LabResult labResult, XmInfo xmInfo, List<XmAlarmdetail> getXmAlarmdetail, boolean nowjz) {
private LabResult setxmdhrefs(LabPat labPat, LabResult labResult, XmInfo xmInfo, List<XmAlarmdetail> getXmAlarmdetail, boolean nowjz) {
String yq = labPat.getYq();
String resultflag = "M", wjzflag = "";
String xmdh = labResult.getXmdh();

View File

@ -24,7 +24,7 @@
select
lab_result.jyrq, lab_result.yq, lab_result.ybh, lab_result.xmdh, wyh, csjg, od, cutoff, lab_result.jgbz, bz1, bz2, yhdh, instrid, operdt,
operna, refs, flag, lab_result.dw, result_flag, alarm_flag, redo_flag, sqxmdh, redo_text,xm_info.xmmc,xm_info.ygzq,xm_info.ygzd
,textresult,xm_info.xsws,xm_info.germclass
,textresult,xm_info.xsws
from lab_result join xm_info on xm_info.yq=lab_result.yq and xm_info.xmdh=lab_result.xmdh
<where>
<if test="jyrq != null ">

View File

@ -1,14 +1,11 @@
package com.czlis.liswork.controller.work;
import com.czlis.common.annotation.Log;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabPat;
import com.czlis.common.core.domain.entity.lis.LabResult;
import com.czlis.common.core.domain.entity.lis.LabResultMed;
import com.czlis.common.core.page.TableDataInfo;
import com.czlis.common.enums.BusinessType;
import com.czlis.interfaceCommon.constants.SysLogConstants;
import com.czlis.liswork.service.LisWorkGermService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -26,39 +23,11 @@ import java.util.List;
public class LisWorkGermController extends BaseController {
@Autowired
LisWorkGermService lisWorkGermService;
@ApiOperation("获取药敏数据")
@GetMapping("/getresultmedlist")
public Result getresultmedlist(Date jyrq, String yq, String ybh,String xmdh) {
return lisWorkGermService.sampleMedInfo(jyrq, yq, ybh,xmdh);
@ApiOperation("获取微生物样本信息")
@GetMapping("/sampleMedInfo")
public Result sampleMedInfo(Date jyrq, String yq, String ybh) {
return lisWorkGermService.sampleMedInfo(jyrq, yq, ybh);
}
@ApiOperation("获取检验结果")
@GetMapping("/getresultlist")
public Result getresultlist(LabResult labResult) {
Date jyrq = labResult.getJyrq();
String yq = labResult.getYq();
String ybh = labResult.getYbh();
return lisWorkGermService.getresultinfo(jyrq, yq, ybh);
}
@Log(title = SysLogConstants.LISWORK_LOG,businessType = BusinessType.UPDATE_DETAIL)
@ApiOperation("修改微生物结果")
@PostMapping("/changeresult")
public Result changeresult(@RequestBody LabResult labResult) {
return lisWorkGermService.changeresult(labResult);
}
@Log(title = SysLogConstants.LISWORK_LOG,businessType = BusinessType.INSERT_DETAIL)
@ApiOperation("新增微生物结果")
@PostMapping("/newresult")
public Result newresult(@RequestBody LabResult labResult) {
return lisWorkGermService.newresult(labResult);
}
@Log(title = SysLogConstants.LISWORK_LOG,businessType = BusinessType.UPDATE_DETAIL)
@ApiOperation("保存微生物结果")
@PostMapping("/saveresult")
public Result saveresult(@RequestBody List<LabResult> labResult) {
return lisWorkGermService.saveallresult(labResult);
}
@ApiOperation("获取仪器ID")
@GetMapping("/getinstrid")
public Result getInstrid(String yq){

View File

@ -10,7 +10,6 @@ import java.util.List;
public interface LisWorkGermService {
Result saveTestResult(LabResult labResult);
Result getresultinfo(Date jyrq, String yq, String ybh);
Result getInstrid(String yq);
Result getmedium(Date jyrq, String yq, String ybh);
Result getcomlog(Date jyrq, String yq, String ybh);
@ -18,10 +17,7 @@ public interface LisWorkGermService {
Result savemedresult(LabResultMed labResultmed);
Result savemedresultall(List<LabResultMed> labResultmedlist);
Result deletemedresult(LabResultMed labResultmed);
Result sampleMedInfo(Date jyrq, String yq, String ybh,String xmdh);
Result sampleMedInfo(Date jyrq, String yq, String ybh);
List<LabPat> getSampleList(Date jyrq, String yq, Integer days);
Result changeresult(LabResult labResult);
Result newresult(LabResult labResult);
Result saveallresult(List<LabResult> labResult);
}

View File

@ -8,7 +8,6 @@ import com.czlis.interfaceCommon.mapper.ComDictMapper;
import com.czlis.interfaceCommon.mapper.LabResultMedMapper;
import com.czlis.interfaceCommon.utils.CommonUtil;
import com.czlis.interfaceCommon.utils.LisUtil;
import com.czlis.interfaceCommon.utils.LisWorkUtils;
import com.czlis.liswork.mapper.LisWorkGermMapper;
import com.czlis.liswork.mapper.LisWorkMapper;
import com.czlis.liswork.mapper.xtwh.XmMedgroupMapper;
@ -29,25 +28,23 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
@Autowired
CommonUtil commonUtil;
@Autowired
LisWorkUtils lisWorkUtils;
@Autowired
LisWorkGermMapper lisWorkGermMapper;
@Autowired
XmMedgroupMapper xmMedgroupMapper;
@Override
public Result getresultinfo(Date jyrq, String yq, String ybh){
public Result sampleMedInfo(Date jyrq, String yq, String ybh) {
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
return new Result("0", "成功!", labResultList);
}
@Override
public Result sampleMedInfo(Date jyrq, String yq, String ybh,String xmdh) {
LabResultMed labResultMed = new LabResultMed();
labResultMed.setJyrq(jyrq);
labResultMed.setYq(yq);
labResultMed.setYbh(ybh);
labResultMed.setXmdh(xmdh);
List<LabResultMed> labResultMedInfoList = lisWorkGermMapper.getLabResultMedInfo(labResultMed);
return new Result("0", "获取药敏数据成功!", labResultMedInfoList);
List<Map<String, Object>> queryList = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
map.put("labResultList", labResultList);
map.put("labResultMedInfoList", labResultMedInfoList);
queryList.add(map);
return new Result("0", "获取微生物数据成功!", queryList);
}
/**
* 保存专家评语
@ -186,93 +183,6 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
xmMedgroup.setYwzmc(mbmc);
return new Result("0","成功",xmMedgroupMapper.query(xmMedgroup));
}
/**
* 修改结果
*
* @param labResult 一行结果
* @return 返回状态
*/
@Override
public Result changeresult(LabResult labResult) {
String yq = labResult.getYq();
Date jyrq = labResult.getJyrq();
String ybh = labResult.getYbh();
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
if ("2".equals(labPat.getJgbz())) return new Result("-1", "结果已审核禁止修改!");
if ("5".equals(labPat.getJgbz())) return new Result("-1", "结果已锁定禁止修改!");
if ("1".equals(labPat.getJgbz())) return new Result("-1", "结果已初审禁止修改!");
if(!lisWorkUtils.canmodifysample(labPat))return new Result("-1","目标标本不可修改");
commonUtil.updateLabResult(labResult);
return new Result("0", "保存成功");
}
/**
* 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新
*
* @param labResultList 结果集合
* @return 返回
*/
@Override
public Result saveallresult(List<LabResult> labResultList) {
if (labResultList == null || labResultList.isEmpty()) return new Result("-1", "结果集为空!");
Date jyrq0 = labResultList.get(0).getJyrq();
String yq0 = labResultList.get(0).getYq();
String ybh0 = labResultList.get(0).getYbh();
if (jyrq0 == null) return new Result("-1", "主键为空!");
if (yq0 == null || yq0.isEmpty()) return new Result("-1", "主键为空!");
if (ybh0 == null || ybh0.isEmpty()) return new Result("-1", "主键为空!");
LabPat labPat = commonUtil.getLabPatOne(jyrq0, yq0, ybh0);
if (!lisWorkUtils.canmodifysample(labPat)) return new Result("-1", "目标标本不可修改");
for (LabResult labResult : labResultList) {
Date jyrq = labResult.getJyrq();
String yq = labResult.getYq();
String ybh = labResult.getYbh();
String xmdh = labResult.getXmdh();
if (jyrq == null) return new Result("-1", "主键为空!");
if (yq == null || yq.isEmpty()) return new Result("-1", "主键为空!");
if (ybh == null || ybh.isEmpty()) return new Result("-1", "主键为空!");
if (xmdh == null || xmdh.isEmpty()) return new Result("-1", "主键为空!");
LabResult labResult0=commonUtil.getLabResult(jyrq, yq, ybh,xmdh);
if(labResult0==null){
commonUtil.insertLabResult(labResult);
}else {
commonUtil.updateLabResult(labResult);
}
}
return new Result("0", "保存成功");
}
@Override
public Result newresult(LabResult labResult) {
String yq = labResult.getYq();
Date jyrq = labResult.getJyrq();
String ybh = labResult.getYbh();
String xmdh = labResult.getXmdh();
if ("".equals(xmdh) || xmdh == null) return new Result("-1", "项目代号不能为空!");
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
if(labPat==null){
labPat=new LabPat();
labPat.setJyrq(jyrq);
labPat.setYbh(ybh);
labPat.setYq(yq);
labPat.setJgbz("0");
}
if ("2".equals(labPat.getJgbz())) return new Result("-1", "结果已审核禁止修改!");
if ("5".equals(labPat.getJgbz())) return new Result("-1", "结果已锁定禁止修改!");
if ("1".equals(labPat.getJgbz())) return new Result("-1", "结果已初审禁止修改!");
if(!lisWorkUtils.canmodifysample(labPat))return new Result("-1","目标标本不可修改");
XmInfo xmInfo = commonUtil.getXmInfo(yq, xmdh);
String mrz=xmInfo.getMrz();
if("阳性".equals(mrz))mrz="P";
if("阴性".equals(mrz))mrz="N";
labResult.setJgbz(mrz);
boolean nowjz = lisWorkUtils.checknowjz(labPat);
List<XmAlarmdetail> getXmAlarmdetail = commonUtil.getXmAlarmdetail(yq, xmdh);
labResult = lisWorkUtils.setxmdhrefs(labPat, labResult, xmInfo, getXmAlarmdetail, nowjz);
commonUtil.insertLabResult(labResult);
return new Result("0", "保存成功");
}
@Override
public Result savemedresult(LabResultMed labResultmed) {
Date jyrq=labResultmed.getJyrq();

View File

@ -7,21 +7,20 @@
</sql>
<select id="getLabResultMedInfo" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
select a.*,m.ywmc,
select a.*,
case
when isnull(a.mic,'')!='' then isnull(c.micref,d.micref)
when isnull(a.rad,'')!='' then isnull(c.radref,d.radref)
when isnull(a.mic)!='' then isnull(c.micref,d.micref)
when isnull(a.rad)!='' then isnull(c.radref,d.radref)
else '' end as ckz,e.bz as cp_bz from lab_resultmed a
join xm_info b on b.yq=a.yq and b.xmdh=a.xmdh
left join xm_med m on m.ywdh=a.ywdh
left join com_dict e on e.zdlb='germclass' and e.zddh=b.germclass
left join xm_meddetail c on b.germclass=c.xmdh and c.ywdh=a.ywdh
left join xm_meddetail d on d.ywzmc = '细菌' and d.yq=a.yq and d.ywdh=a.ywdh
where a.jyrq = #{jyrq} and a.yq = #{yq}
<if test="ybh != null and ybh !=''">and a.ybh = #{ybh}</if>
<if test="xmdh != null and xmdh !=''">and a.xmdh = #{xmdh}</if>
<if test="xh != null">and a.xh = #{xh}</if>
<if test="ywdh != null and ywdh != ''">and a.ywdh = #{ywdh}</if>
where jyrq = #{jyrq} and yq = #{yq}
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
<if test="xmdh != null and xmdh !=''">and xmdh = #{xmdh}</if>
<if test="xh != null">and xh = #{xh}</if>
<if test="ywdh != null and ywdh != ''">and ywdh = #{ywdh}</if>
</select>
<select id="getSampleListWSW" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
<include refid="selectLabPatVoWSW"></include>