| | |
| | | import com.ltkj.web.controller.lis.LisApiMethod; |
| | | import com.ltkj.web.controller.pacs.PacsApiMethodService; |
| | | import com.ltkj.web.controller.service.TjSysAsyncServiceImpl; |
| | | import com.ltkj.web.controller.system.TjSamplingController; |
| | | import com.ltkj.web.controller.system.SamplingServiceApi; |
| | | import jdk.nashorn.internal.runtime.logging.Logger; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private ITjSamplingService tjSamplingService; |
| | | @Autowired |
| | | private TjSamplingController samplingController; |
| | | private SamplingServiceApi samplingService; |
| | | |
| | | |
| | | //将方法返回值解析成json格式 |
| | |
| | | @Logger |
| | | public AjaxResult HisApiMethods(TjCustomer customer,TjOrder tjOrder) { |
| | | String jzh=null; |
| | | String dept = configService.selectConfigByKey("request_default_dept"); |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | try { |
| | | // TjOrder tjOrder = orderService.getById(orderId); |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | OutpinregapplyDto outpinregapplyDto = new OutpinregapplyDto(); |
| | | outpinregapplyDto.setPationid(customer.getPationId()); |
| | | outpinregapplyDto.setSqysbm("00029"); |
| | | outpinregapplyDto.setMzksbm("0101"); |
| | | outpinregapplyDto.setCzybm("00029"); |
| | | outpinregapplyDto.setSqysbm(ysbm); |
| | | outpinregapplyDto.setMzksbm(dept); |
| | | outpinregapplyDto.setCzybm(ysbm); |
| | | outpinregapplyDto.setSfjz("0"); |
| | | outpinregapplyDto.setGhzlbm("01"); |
| | | outpinregapplyDto.setYwckbm("0001"); |
| | |
| | | hisApiGetMethodService.save(object4, "Outpinregapply", hisApiConfig, JSONUtil.toJsonStr(BeanUtil.beanToMap(outpinregapplyDto))); |
| | | |
| | | //门诊医生接诊 |
| | | AjaxResult result = controller.Outpinconapply(hisRegistrationId, date, "00029"); |
| | | AjaxResult result = controller.Outpinconapply(hisRegistrationId, date, ysbm); |
| | | String result3 = getAjaxResult(result); |
| | | JSONObject object2 = getJSONObject(result3); |
| | | String code2 = object2.getStr("ResultCode"); |
| | |
| | | OutpinimpapplyDto dto=new OutpinimpapplyDto(); |
| | | dto.setHisRegistrationId(tjOrder.getCardId()); |
| | | dto.setMzzdid(1); |
| | | dto.setSqysbm("00029"); |
| | | dto.setMzksbm("0101"); |
| | | dto.setSqysbm(ysbm); |
| | | dto.setMzksbm(dept); |
| | | dto.setFbrq(date); |
| | | dto.setZdrq(date); |
| | | dto.setCzybm("00029"); |
| | | dto.setCzyksbm("0101"); |
| | | dto.setCzybm(ysbm); |
| | | dto.setCzyksbm(dept); |
| | | dto.setZs("健康查体"); |
| | | dto.setBs("不详"); |
| | | dto.setClyz(""); |
| | |
| | | |
| | | //体检对his申请单调用方法 |
| | | public AjaxResult tijianshenqing(TjCustomer customer, String date,String cardId) { |
| | | |
| | | String dept = configService.selectConfigByKey("request_default_dept"); |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | String ysmc = configService.selectConfigByKey("request_default_ysmc"); |
| | | |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | |
| | |
| | | OutpintestapplyDto dto = new OutpintestapplyDto(); |
| | | dto.setHisRegistrationId(cardId); |
| | | dto.setSfzh(customer.getCusIdcard()); |
| | | dto.setSqysbm("00029"); |
| | | dto.setMzksbm("0101"); |
| | | dto.setSqysbm(ysbm); |
| | | dto.setMzksbm(dept); |
| | | dto.setSjrq(date); |
| | | dto.setCzybm("00029"); |
| | | dto.setCzyksbm("0101"); |
| | | dto.setCzybm(ysbm); |
| | | dto.setCzyksbm(dept); |
| | | dto.setSfjz("0"); |
| | | |
| | | List<OutpintestapplyDetailsDto> detailsDtos = new ArrayList<>(); |
| | |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检验"); |
| | | tree.setService("his"); |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | |
| | | OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); |
| | | outpinexamapplyDto.setHisRegistrationId(cardId); |
| | | outpinexamapplyDto.setSfzh(customer.getCusIdcard()); |
| | | outpinexamapplyDto.setSqysbm("00029"); |
| | | outpinexamapplyDto.setMzksbm("0101"); |
| | | outpinexamapplyDto.setCzybm("00029"); |
| | | outpinexamapplyDto.setCzyksbm("0101"); |
| | | outpinexamapplyDto.setSqysbm(ysbm); |
| | | outpinexamapplyDto.setMzksbm(dept); |
| | | outpinexamapplyDto.setCzybm(ysbm); |
| | | outpinexamapplyDto.setCzyksbm(dept); |
| | | outpinexamapplyDto.setSfjz("0"); |
| | | // List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailsDtoss = new ArrayList<>(); |
| | |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检查"); |
| | | tree.setService("his"); |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | |
| | | OutpintreatapplyDto dao = new OutpintreatapplyDto(); |
| | | dao.setHisRegistrationId(cardId); |
| | | dao.setSfzh(customer.getCusIdcard()); |
| | | dao.setSqysbm("00029"); |
| | | dao.setMzksbm("0101"); |
| | | dao.setSqysbm(ysbm); |
| | | dao.setMzksbm(dept); |
| | | dao.setSjrq(date); |
| | | dao.setCzybm("00029"); |
| | | dao.setCzyksbm("0101"); |
| | | dao.setCzybm(ysbm); |
| | | dao.setCzyksbm(dept); |
| | | dao.setSfjz("0"); |
| | | // List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailDtos = new ArrayList<>(); |
| | |
| | | OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); |
| | | dto1.setHisRegistrationId(cardId); |
| | | dto1.setSfzh(customer.getCusIdcard()); |
| | | dto1.setSqysbm("00029"); |
| | | dto1.setMzksbm("0101"); |
| | | dto1.setSqysbm(ysbm); |
| | | dto1.setMzksbm(dept); |
| | | dto1.setSjrq(date); |
| | | dto1.setCzybm("00029"); |
| | | dto1.setCzyksbm("0101"); |
| | | dto1.setCzybm(ysbm); |
| | | dto1.setCzyksbm(dept); |
| | | dto1.setCflxbm("A"); |
| | | dto1.setYfbm("1"); |
| | | dto1.setFyts("1"); |
| | |
| | | cf.setCardId(cardId); |
| | | cf.setSfzh(customer.getCusIdcard()); |
| | | cf.setCfh(cfh); |
| | | cf.setSqysbm("00029"); |
| | | cf.setSqysxm("王健萍"); |
| | | cf.setMzksbn("0101"); |
| | | cf.setSqysbm(ysbm); |
| | | cf.setSqysxm(ysmc); |
| | | cf.setMzksbn(dept); |
| | | cf.setSqrq(date); |
| | | cf.setCzybm("00029"); |
| | | cf.setCzybm(ysbm); |
| | | cf.setYpbm(detilsDto.getYpbm()); |
| | | cf.setYpmc("尿素[14C]呼气试验药盒"); |
| | | cf.setSl(String.valueOf(detilsDto.getSl())); |
| | |
| | | LambdaQueryWrapper<TjSampling> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjSampling::getTjNum,tjOrder.getTjNumber()); |
| | | List<TjSampling> list = tjSamplingService.list(wrapper); |
| | | // log.info("采样数据 ->{}",list); |
| | | Map<String, List<TjSampling>> listMap = list.stream().collect(Collectors.groupingBy(TjSampling::getSpecimenTypeCode)); |
| | | // log.info("分组后 ->{}",JSONUtil.toJsonStr(listMap)); |
| | | ArrayList<String> ids = new ArrayList<>(); |
| | | for (Map.Entry<String, List<TjSampling>> entry : listMap.entrySet()) { |
| | | // log.info("key ->{},val ->{}",entry.getKey(),entry.getValue()); |
| | | // Lis标本代码 |
| | | String specimenTypeCode = entry.getKey(); |
| | | List<TjSampling> samplings = entry.getValue(); |
| | | if (samplings.size() > 1){ |
| | | // 进行合并 |
| | | List<String> stringList = samplings.stream().map(TjSampling::getId).collect(Collectors.toList()); |
| | | // log.info("提取id ->{}",stringList); |
| | | for (int i = 0; i < stringList.size(); i++) { |
| | | String s = stringList.get(i); |
| | | if (tjSamplingService.isMergeItem(s) != 0) { |
| | | stringList.remove(s); |
| | | ids.add(s); |
| | | log.info("采样数据 ->{}",JSONUtil.toJsonStr(list)); |
| | | if (!list.isEmpty()) { |
| | | Map<String, List<TjSampling>> listMap = list.stream().collect(Collectors.groupingBy(TjSampling::getSpecimenTypeCode)); |
| | | log.info("分组后 ->{}",JSONUtil.toJsonStr(listMap)); |
| | | ArrayList<String> ids = new ArrayList<>(); |
| | | for (Map.Entry<String, List<TjSampling>> entry : listMap.entrySet()) { |
| | | log.info("key ->{},val ->{}",entry.getKey(),entry.getValue()); |
| | | // Lis标本代码 |
| | | String specimenTypeCode = entry.getKey(); |
| | | List<TjSampling> samplings = entry.getValue(); |
| | | if (samplings.size() >= 2) { |
| | | // 进行合并 |
| | | List<String> stringList = samplings.stream().map(TjSampling::getId).collect(Collectors.toList()); |
| | | log.info("提取id ->{}",stringList); |
| | | for (int i = 0; i < stringList.size(); i++) { |
| | | String s = stringList.get(i); |
| | | if (tjSamplingService.isMergeItem(s) != 0) { |
| | | stringList.remove(s); |
| | | ids.add(s); |
| | | } |
| | | } |
| | | if (stringList.size() > 1) { |
| | | String id = tjSamplingService.mergeCaiYangApi(stringList); |
| | | ids.add(id); |
| | | }else { |
| | | ids.add(stringList.get(0)); |
| | | } |
| | | } else { |
| | | ids.add(samplings.get(0).getId()); |
| | | } |
| | | String id = tjSamplingService.mergeCaiYangApi(stringList); |
| | | ids.add(id); |
| | | }else { |
| | | ids.add(samplings.get(0).getId()); |
| | | } |
| | | } |
| | | Boolean confirmed = samplingController.confirmSamplingApi(ids, "Y", "Y"); |
| | | if (!confirmed){ |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("处理失败"); |
| | | Boolean confirmed = samplingService.confirmSamplingApi(ids, "Y", "N"); |
| | | if (!confirmed) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("处理失败"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | //退费后取消接诊作废申请单等操作 |
| | | @Transactional |
| | | public boolean ZfHisApiMethods(TjCustomer customer, TjOrder order,Boolean isUseLisAndPacsRegister) { |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | List<String> jcsqdh = orderService.getHuoQuJcsqdh(order.getCardId()); |
| | | |
| | | List<String> jysqdh = orderService.getHuoQuJysqdh(order.getCardId()); |
| | | |
| | | |
| | | List<String> zlsqdh = orderService.getHuoQuZlsqdh(order.getCardId()); |
| | |
| | | JSONObject object1 = null; |
| | | String code1 = null; |
| | | |
| | | if (isUseLisAndPacsRegister){ |
| | | // if (isUseLisAndPacsRegister){ |
| | | TjCustomer customer1 = customerService.getById(order.getUserId()); |
| | | // 作废检查申请 |
| | | if (jcsqdh != null && !jcsqdh.isEmpty()){ |
| | | for (String sqdh : jcsqdh) { |
| | | AjaxResult cancelPacsAjaxResult = pacsApiMethodService.updatePacsApply(sqdh, order.getCardId(), customer1.getCusName()); |
| | | String result = cancelPacsAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code = object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuJcsqdh(order.getCardId()); |
| | | } |
| | | List<String> bljcsqdhByPacs = orderService.getBljcsqdhByPacs(order.getCardId()); |
| | | if (bljcsqdhByPacs != null && !bljcsqdhByPacs.isEmpty()){ |
| | | for (String sqdh : bljcsqdhByPacs) { |
| | | AjaxResult cancelPacsAjaxResult = pacsApiMethodService.updatePacsApply(sqdh, order.getCardId(), customer1.getCusName()); |
| | | String result = cancelPacsAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code = object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuJcsqdh(order.getCardId()); |
| | | } |
| | | } |
| | | } |
| | | // 作废检验申请 |
| | | if (jysqdh != null && !jysqdh.isEmpty()){ |
| | | for (String sqdh : jysqdh) { |
| | | AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("lis请求返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult)); |
| | | List<String> bljysqdhByLis = orderService.getBljysqdhByLis(order.getCardId()); |
| | | if (bljysqdhByLis != null && !bljysqdhByLis.isEmpty()){ |
| | | for (String sqdh : bljysqdhByLis) { |
| | | AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("lis请求返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult)); |
| | | if (cancelLisAjaxResult.get("code").toString().equals("200")){ |
| | | String result = cancelLisAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code= object.getStr("ResultCode"); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | // }else { |
| | | List<String> jcsqdh = orderService.getHuoQuJcsqdh(order.getCardId()); |
| | | |
| | | List<String> jysqdh = orderService.getHuoQuJysqdh(order.getCardId()); |
| | | //2.1.6.5 作废门诊检查申请 |
| | | if (null != jcsqdh && jcsqdh.size()>0) { |
| | | for (String s : jcsqdh) { |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), "00029", s); |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), ysbm, s); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | //2.1.6.3 作废门诊检验申请 |
| | | if (null != jysqdh && jysqdh.size()>0) { |
| | | for (String s : jysqdh) { |
| | | ajaxResult = controller.Outpindeltestapply(order.getCardId(), "00029", s); |
| | | ajaxResult = controller.Outpindeltestapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | //2.1.6.9 作废门诊治疗处置申请 |
| | | if (null != zlsqdh && zlsqdh.size()>0) { |
| | | for (String s : zlsqdh) { |
| | | ajaxResult = controller.Outpintdelreatapply(order.getCardId(), "00029", s); |
| | | ajaxResult = controller.Outpintdelreatapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | //作废药品申请 |
| | | if(null !=cfhs && cfhs.size()>0){ |
| | | for (String cfh : cfhs) { |
| | | AjaxResult result = controller.Outpindelmedicapply(order.getCardId(), "00029", cfh); |
| | | AjaxResult result = controller.Outpindelmedicapply(order.getCardId(), ysbm, cfh); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | |
| | | //2.1.3 门诊医生取消接诊 |
| | | ajaxResult = controller.Outpinunconapply(order.getCardId(), date, "00029"); |
| | | ajaxResult = controller.Outpinunconapply(order.getCardId(), date, ysbm); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | |
| | | //作废补录项目 |
| | | public boolean ZfBlXm(List<String> bldhs, TjOrder order) { |
| | | |
| | | log.info("bldhs ->{}",JSONUtil.toJsonStr(bldhs)); |
| | | if(null !=bldhs && bldhs.size()>0){ |
| | | log.info("进入判断"); |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | try { |
| | | for (String bldh : bldhs) { |
| | | List<String> jcsqdh = orderService.getHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | |
| | | List<String> jysqdh = orderService.getHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | |
| | | |
| | | List<String> zlsqdh = orderService.getHuoQuBlZlsqdh(order.getCardId(),bldh); |
| | | |
| | |
| | | String result2 = null; |
| | | JSONObject object1 = null; |
| | | String code1 = null; |
| | | |
| | | if (lisApiMethod.isUseLisAndPacsRegister(order)) { |
| | | TjCustomer customer1 = customerService.getById(order.getUserId()); |
| | | // 作废检查申请 |
| | | if (jcsqdh != null && !jcsqdh.isEmpty()){ |
| | | for (String sqdh : jcsqdh) { |
| | | AjaxResult cancelPacsAjaxResult = pacsApiMethodService.updatePacsApply(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("作废检查 pacs返回 ->{}",JSONUtil.toJsonStr(cancelPacsAjaxResult)); |
| | | String result = cancelPacsAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code = object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | }else { |
| | | return false; |
| | | } |
| | | log.info("查询前"); |
| | | // if (lisApiMethod.isUseLisAndPacsRegister(order)) { |
| | | TjCustomer customer1 = customerService.getById(order.getUserId()); |
| | | log.info("customer1 ->{}",customer1); |
| | | List<String> bljcsqdhByPacs = orderService.getBljcsqdhByPacs(order.getCardId(), bldh); |
| | | log.info("bljcsqdhByPacs ->{}",bljcsqdhByPacs); |
| | | // 作废检查申请 |
| | | if (bljcsqdhByPacs != null && !bljcsqdhByPacs.isEmpty()){ |
| | | for (String sqdh : bljcsqdhByPacs) { |
| | | AjaxResult cancelPacsAjaxResult = pacsApiMethodService.updatePacsApply(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("作废检查 pacs返回 ->{}",JSONUtil.toJsonStr(cancelPacsAjaxResult)); |
| | | String result = cancelPacsAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code = object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | // 作废检验申请 |
| | | if (jysqdh != null && !jysqdh.isEmpty()){ |
| | | for (String sqdh : jysqdh) { |
| | | AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("作废检验 pacs返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult)); |
| | | String result = cancelLisAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code= object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | List<String> bljysqdhByLis = orderService.getBljysqdhByLis(order.getCardId(), bldh); |
| | | log.info("bljysqdhByLis ->{}",bljysqdhByLis); |
| | | // 作废检验申请 |
| | | if (bljysqdhByLis != null && !bljysqdhByLis.isEmpty()){ |
| | | for (String sqdh : bljysqdhByLis) { |
| | | AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("作废检验 pacs返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult)); |
| | | String result = cancelLisAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code= object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | //2.1.6.5 作废门诊检查申请 |
| | | List<String> jcsqdh = orderService.getHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | |
| | | List<String> jysqdh = orderService.getHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | // }else { |
| | | // 2.1.6.5 作废门诊检查申请 |
| | | if (null != jcsqdh && jcsqdh.size()>0) { |
| | | for (String s : jcsqdh) { |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), "00029", s); |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), ysbm, s); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | //2.1.6.3 作废门诊检验申请 |
| | | if (null != jysqdh && jysqdh.size()>0) { |
| | | for (String s : jysqdh) { |
| | | ajaxResult = controller.Outpindeltestapply(order.getCardId(), "00029", s); |
| | | ajaxResult = controller.Outpindeltestapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | //2.1.6.9 作废门诊治疗处置申请 |
| | | if (null != zlsqdh && zlsqdh.size()>0) { |
| | | for (String s : zlsqdh) { |
| | | ajaxResult = controller.Outpintdelreatapply(order.getCardId(), "00029", s); |
| | | ajaxResult = controller.Outpintdelreatapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | //作废药品申请 |
| | | if(null !=cfhs && cfhs.size()>0){ |
| | | for (String cfh : cfhs) { |
| | | AjaxResult result = controller.Outpindelmedicapply(order.getCardId(), "00029", cfh); |
| | | AjaxResult result = controller.Outpindelmedicapply(order.getCardId(), ysbm, cfh); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | return true; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | |
| | | //退费后取消接诊作废申请单等操作 |
| | | public boolean ZfHisApiMethod(String jzh) { |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | |
| | | //2.1.6.5 作废门诊检查申请 |
| | | if (null != jcsqdh && jcsqdh.size()>0) { |
| | | for (String s : jcsqdh) { |
| | | AjaxResult result = controller.Outpindelexamapply(jzh, "00029", s); |
| | | AjaxResult result = controller.Outpindelexamapply(jzh, ysbm, s); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | |
| | | if (null != jysqdh && jysqdh.size()>0) { |
| | | for (String s : jysqdh) { |
| | | ajaxResult = controller.Outpindeltestapply(jzh, "00029", s); |
| | | ajaxResult = controller.Outpindeltestapply(jzh, ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | //2.1.6.9 作废门诊治疗处置申请 |
| | | if (null != zlsqdh && zlsqdh.size()>0) { |
| | | for (String s : zlsqdh) { |
| | | ajaxResult = controller.Outpintdelreatapply(jzh, "00029", s); |
| | | ajaxResult = controller.Outpintdelreatapply(jzh, ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | |
| | | //作废药品申请 |
| | | if(null !=cfhs && cfhs.size()>0){ |
| | | for (String cfh : cfhs) { |
| | | AjaxResult result = controller.Outpindelmedicapply(jzh, "00029", cfh); |
| | | AjaxResult result = controller.Outpindelmedicapply(jzh, ysbm, cfh); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | |
| | | |
| | | //2.1.3 门诊医生取消接诊 |
| | | ajaxResult = controller.Outpinunconapply(jzh, date, "00029"); |
| | | ajaxResult = controller.Outpinunconapply(jzh, date, ysbm); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |