| | |
| | | } |
| | | |
| | | //对接his总接口 注册挂号接诊申请单操作 |
| | | @Transactional |
| | | @Logger |
| | | public AjaxResult HisApiMethods(TjCustomer customer, Long orderId) { |
| | | |
| | |
| | | Map<String, Object> resultDatasss = (Map<String, Object>) resultDatas.get(0); |
| | | String hisRegistrationId = resultDatasss.get("his_registration_id").toString(); |
| | | //保存挂号入参出参 |
| | | resultDatasss.put("cardId", customer.getCardId()); |
| | | resultDatasss.put("cardId",hisRegistrationId); |
| | | JSONObject object4 = JSONUtil.parseObj(resultDatasss); |
| | | LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpinregapply"); |
| | |
| | | |
| | | //门诊医生接诊 |
| | | controller.Outpinconapply(hisRegistrationId, date, "00029"); |
| | | customer.setCardId(hisRegistrationId); |
| | | if(null != tjOrder.getTjCategory() && !tjOrder.getTjCategory().equals("13")){ |
| | | customer.setCardId(hisRegistrationId); |
| | | }else { |
| | | customer.setCardId("0"); |
| | | } |
| | | customerService.updateById(customer); |
| | | transitionService.updateCardIdByTjNumAndIdCard(customer.getCusIdcard(), hisRegistrationId, tjOrder.getTjNumber()); |
| | | tjOrder.setCardId(hisRegistrationId); |
| | |
| | | dto.setJzqk(9); |
| | | controller.Outpinimpapply(dto); |
| | | |
| | | return tijianshenqing(customer, date); |
| | | return tijianshenqing(customer, date,tjOrder.getCardId()); |
| | | } |
| | | |
| | | // } |
| | |
| | | |
| | | |
| | | //体检对his申请单调用方法 |
| | | private AjaxResult tijianshenqing(TjCustomer customer, String date) { |
| | | private AjaxResult tijianshenqing(TjCustomer customer, String date,String cardId) { |
| | | //检验申请 |
| | | OutpintestapplyDto dto = new OutpintestapplyDto(); |
| | | dto.setHisRegistrationId(customer.getCardId()); |
| | | dto.setHisRegistrationId(cardId); |
| | | dto.setSfzh(customer.getCusIdcard()); |
| | | dto.setSqysbm("00029"); |
| | | dto.setMzksbm("0101"); |
| | |
| | | dto.setCzybm("00029"); |
| | | dto.setCzyksbm("0101"); |
| | | dto.setSfjz("0"); |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), customer.getCardId()); |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailsDtos = new ArrayList<>(); |
| | | List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos =new ArrayList<>(); |
| | | if (null != detailList && detailList.size() > 0) { |
| | |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDto.setProjg(project.getProPrice()); |
| | | detailsDtos.add(detailsDto); |
| | | } |
| | | if(project.getProId()==1740177341251154377L){ |
| | |
| | | detilsDto.setDcjl("1"); |
| | | detilsDto.setPj("60"); |
| | | detilsDto.setJj("60"); |
| | | detilsDto.setJldw(""); |
| | | detilsDto.setTjbm(""); |
| | | detilsDto.setPs(""); |
| | | detilsDto.setPsbm(""); |
| | | detilsDto.setYyts(""); |
| | | detilsDto.setXtph(""); |
| | | detilsDto.setScph(""); |
| | | detilsDto.setYpxq(""); |
| | | detilsDto.setCdbm(""); |
| | | detilsDto.setKfdw(""); |
| | | detilsDto.setYfdw(""); |
| | | detilsDto.setYysm(""); |
| | | detilsDto.setFzbl("1"); |
| | | detilsDto.setZh("0"); |
| | | outpinmedicapplyDetilsDtos.add(detilsDto); |
| | | } |
| | | } |
| | |
| | | for (OutpintestapplyDetailsDto detail : details) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(dto.getHisRegistrationId()); |
| | | LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); |
| | | wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); |
| | | TjCustomer tjCustomer = customerService.getOne(wrapper4); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | tree.setPationid(customer.getPationId()); |
| | | JSONObject resultData = object3.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("jysqdh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检验"); |
| | | LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | List<TjProject> list = projectService.list(wrapper); |
| | | String tj_price = ""; |
| | | for (TjProject project : list) { |
| | | tj_price += project.getProPrice() + "、"; |
| | | } |
| | | tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // List<TjProject> list = projectService.list(wrapper); |
| | | // String tj_price = ""; |
| | | // for (TjProject project : list) { |
| | | // tj_price += project.getProPrice() + "、"; |
| | | // } |
| | | // tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // wrapper.eq(TjProject::getSl,1); |
| | | // wrapper.groupBy(TjProject::getHisXmbm); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if(null !=project){ |
| | | // BigDecimal decimal = project.getProPrice().multiply(BigDecimal.valueOf(detail.getSl())); |
| | | // tree.setTjPrice(String.valueOf(decimal)); |
| | | // } |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | |
| | | //药品申请 |
| | | if(outpinmedicapplyDetilsDtos.size()>0){ |
| | | OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); |
| | | dto1.setHisRegistrationId(customer.getCardId()); |
| | | dto1.setHisRegistrationId(cardId); |
| | | dto1.setSfzh(customer.getCusIdcard()); |
| | | dto1.setSqysbm("00029"); |
| | | dto1.setMzksbm("0101"); |
| | |
| | | dto1.setCzyksbm("0101"); |
| | | dto1.setCflxbm("A"); |
| | | dto1.setYfbm("1"); |
| | | dto1.setFyts("1"); |
| | | dto1.setMzzd(""); |
| | | dto1.setDetails(outpinmedicapplyDetilsDtos); |
| | | AjaxResult result = controller.Outpinmedicapply(dto1); |
| | | String result1 = getAjaxResult(result); |
| | |
| | | |
| | | for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { |
| | | TjCf cf=new TjCf(); |
| | | cf.setCardId(customer.getCardId()); |
| | | cf.setCardId(cardId); |
| | | cf.setSfzh(customer.getCusIdcard()); |
| | | cf.setCfh(cfh); |
| | | cf.setSqysbm("00029"); |
| | |
| | | |
| | | //门诊检查申请 |
| | | OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); |
| | | outpinexamapplyDto.setHisRegistrationId(customer.getCardId()); |
| | | outpinexamapplyDto.setHisRegistrationId(cardId); |
| | | outpinexamapplyDto.setSfzh(customer.getCusIdcard()); |
| | | outpinexamapplyDto.setSqysbm("00029"); |
| | | outpinexamapplyDto.setMzksbm("0101"); |
| | | outpinexamapplyDto.setCzybm("00029"); |
| | | outpinexamapplyDto.setCzyksbm("0101"); |
| | | outpinexamapplyDto.setSfjz("0"); |
| | | List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), customer.getCardId()); |
| | | List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailsDtoss = new ArrayList<>(); |
| | | if (null != detailLists && detailLists.size() > 0) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDto.setProjg(project.getProPrice()); |
| | | detailsDtoss.add(detailsDto); |
| | | } |
| | | |
| | |
| | | for (OutpintestapplyDetailsDto detail : details) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(outpinexamapplyDto.getHisRegistrationId()); |
| | | LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); |
| | | wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); |
| | | TjCustomer tjCustomer = customerService.getOne(wrapper4); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | tree.setPationid(customer.getPationId()); |
| | | JSONObject resultData = object5.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("jcsqdh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检查"); |
| | | LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | List<TjProject> list = projectService.list(wrapper); |
| | | String tj_price = ""; |
| | | for (TjProject project : list) { |
| | | tj_price += project.getProPrice() + "、"; |
| | | } |
| | | tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // List<TjProject> list = projectService.list(wrapper); |
| | | // String tj_price = ""; |
| | | // for (TjProject project : list) { |
| | | // tj_price += project.getProPrice() + "、"; |
| | | // } |
| | | // tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // wrapper.eq(TjProject::getSl,1); |
| | | // wrapper.groupBy(TjProject::getHisXmbm); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if(null !=project){ |
| | | // BigDecimal decimal = project.getProPrice().multiply(BigDecimal.valueOf(detail.getSl())); |
| | | // tree.setTjPrice(String.valueOf(decimal)); |
| | | // } |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | |
| | | |
| | | //门诊治疗处置申请 |
| | | OutpintreatapplyDto dao = new OutpintreatapplyDto(); |
| | | dao.setHisRegistrationId(customer.getCardId()); |
| | | dao.setHisRegistrationId(cardId); |
| | | dao.setSfzh(customer.getCusIdcard()); |
| | | dao.setSqysbm("00029"); |
| | | dao.setMzksbm("0101"); |
| | |
| | | dao.setCzybm("00029"); |
| | | dao.setCzyksbm("0101"); |
| | | dao.setSfjz("0"); |
| | | List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), customer.getCardId()); |
| | | List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailDtos = new ArrayList<>(); |
| | | if (null != details && details.size() > 0) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDto.setProjg(project.getProPrice()); |
| | | detailDtos.add(detailsDto); |
| | | } |
| | | } |
| | |
| | | for (OutpintestapplyDetailsDto detail : details1) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(dao.getHisRegistrationId()); |
| | | LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); |
| | | wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); |
| | | TjCustomer tjCustomer = customerService.getOne(wrapper4); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | tree.setPationid(customer.getPationId()); |
| | | JSONObject resultData = mzylyzsq3.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("zlczh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("处置"); |
| | | LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | List<TjProject> list = projectService.list(wrapper); |
| | | String tj_price = ""; |
| | | for (TjProject project : list) { |
| | | tj_price += project.getProPrice() + "、"; |
| | | } |
| | | tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // wrapper.eq(TjProject::getSl,1); |
| | | // wrapper.groupBy(TjProject::getHisXmbm); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if(null !=project){ |
| | | // BigDecimal decimal = project.getProPrice().multiply(BigDecimal.valueOf(detail.getSl())); |
| | | // tree.setTjPrice(String.valueOf(decimal)); |
| | | // } |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |