| | |
| | | import com.ltkj.common.core.controller.BaseController; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.framework.config.UserHoder; |
| | | import com.ltkj.hosp.domain.LtkjJianchajianyanTree; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.hisDto.*; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.hosp.service.*; |
| | |
| | | import com.ltkj.hosp.vodomain.CsProVo; |
| | | import com.ltkj.web.controller.system.TjCheckController; |
| | | import io.swagger.annotations.Api; |
| | | import jodd.util.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.NoTransactionException; |
| | |
| | | private LtkjHybgdService hybgdService; |
| | | @Autowired |
| | | private ITjCustomerService tjCustomerService; |
| | | @Autowired |
| | | private TjJcycxmService jcycxmService; |
| | | |
| | | /** |
| | | * 获取pacs检查数据 |
| | |
| | | ltkjExamJcsqd.setBw(checkParts); |
| | | ltkjExamJcsqd.setJgzt(pacs.getStr("diagnosis")); |
| | | ltkjExamJcsqd.setJgbx(pacs.getStr("examination")); |
| | | ltkjExamJcsqd.setSgorzd("1"); |
| | | ltkjExamJcsqd.setCreateTime(new Date()); |
| | | |
| | | ltkjExamJcsqdService.deletedLtkjJcsqdByTjhAndXmId(ltkjExamJcsqd.getTjh(),ltkjExamJcsqd.getJcxmid()); |
| | | boolean save1 = ltkjExamJcsqdService.save(ltkjExamJcsqd); |
| | | log.info("手动同步检查结果状态 ->{}",ltkjExamJcsqd.getJgzt()); |
| | | if(StringUtil.isNotBlank(ltkjExamJcsqd.getJgzt())){ |
| | | jcycxmService.deletedByTjh(order.getTjNumber()); |
| | | String[] split = ltkjExamJcsqd.getJgzt().replaceAll("\n", "").split("。|;|;|,|,"); |
| | | log.info("进入检查结果异常提取分割方法体 ->{}->{}",order.getTjNumber(),split); |
| | | for (String jg : split) { |
| | | if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") |
| | | && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见") |
| | | && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){ |
| | | TjJcycxm jcycxm=new TjJcycxm(); |
| | | jcycxm.setTjh(order.getTjNumber()); |
| | | jcycxm.setYqid("jczyy"); |
| | | String[] split1 = ltkjExamJcsqd.getJcxmid().split(";"); |
| | | jcycxm.setProId(split1[0]); |
| | | jcycxm.setProName(ltkjExamJcsqd.getJcxmmc()); |
| | | jcycxm.setCreateTime(new Date()); |
| | | jcycxm.setJcjg(jg); |
| | | jcycxmService.save(jcycxm); |
| | | } |
| | | } |
| | | } |
| | | |
| | | LtkjExamJcbgd ltkjExamJcbgd = new LtkjExamJcbgd(); |
| | | ltkjExamJcbgd.setTjh(ltkjExamJcsqd.getTjh()); |
| | |
| | | ltkjExamJcbgd.setBgNr(ltkjExamJcsqd.getJgbx()); |
| | | ltkjExamJcbgd.setYxbx(ltkjExamJcsqd.getJgzt()); |
| | | ltkjExamJcbgd.setYxzd(ltkjExamJcsqd.getJgzt()); |
| | | ltkjExamJcbgd.setSgorzd("1"); |
| | | ltkjExamJcsqd.setCreateTime(new Date()); |
| | | ltkjExamJcbgdService.deletedLtkjJcbgdByTjhAndTmh(ltkjExamJcsqd.getTjh()); |
| | | ltkjExamJcbgdService.deletedLtkjJcbgdByTjhAndTmhA(ltkjExamJcsqd.getTjh(),ltkjExamJcsqd.getTmh()); |
| | | boolean save2 = ltkjExamJcbgdService.save(ltkjExamJcbgd); |
| | | if (save1 && save2) { |
| | | try { |
| | |
| | | queryWrapper.eq(LtkjJianchajianyanTree::getType,"检验"); |
| | | queryWrapper.eq(LtkjJianchajianyanTree::getHisXmdm,xmdm); |
| | | LtkjJianchajianyanTree tree = ltkjJianchajianyanTreeService.getOne(queryWrapper); |
| | | String tmh; |
| | | if (tree == null) { |
| | | tree = new LtkjJianchajianyanTree(); |
| | | tree.setHisXmdm(xmdm); |
| | |
| | | } |
| | | } |
| | | } |
| | | tmh = tree.getSqdh()+"_"+tree.getHisXmdm(); |
| | | }else{ |
| | | tmh = tree.getSqdh(); |
| | | } |
| | | String tmh = tree.getSqdh()+"_"+tree.getHisXmdm(); |
| | | String shys = ""; |
| | | for (Object o : lis) { |
| | | cn.hutool.json.JSONObject jsonObject = (cn.hutool.json.JSONObject) o; |
| | |
| | | hysqd.setCreateTime(new Date()); |
| | | // hysqd.setBbmc(); |
| | | hysqdService.deletedByTjhAndXmId(hysqd.getTjh(),hysqd.getXmid()); |
| | | hybgdService.deletedLtkjHybgdByTjhAndTmh(tree.getSqdh()+"_"+tree.getHisXmdm()); |
| | | hybgdService.deletedLtkjHybgdByTjhAndTmh(tmh); |
| | | hysqdService.save(hysqd); |
| | | for (Object object : lis) { |
| | | cn.hutool.json.JSONObject jsonObject = (cn.hutool.json.JSONObject) object; |
| | | LtkjHybgd hybgd = new LtkjHybgd(); |
| | | hybgd.setTmh(tree.getSqdh()+"_"+tree.getHisXmdm()); |
| | | hybgd.setTmh(tmh); |
| | | hybgd.setJcxmid(jsonObject.getStr("jcxmid")); |
| | | hybgd.setJcxm(jsonObject.getStr("proName")); |
| | | hybgd.setJyjg(jsonObject.getStr("proResult")); |