| | |
| | | package com.ltkj.web.controller.his; |
| | | |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.domain.TjOrderDetail; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.hisDto.OutpinexamapplyDto; |
| | |
| | | return result.get("data").toString(); |
| | | } |
| | | |
| | | //对接his总接口 |
| | | //对接his总接口 注册挂号接诊申请单操作 |
| | | @Transactional |
| | | public void HisApiMethods(TjCustomer customer, Long orderId) { |
| | | HisApiGetMethodService hisApiGetMethodService=new HisApiGetMethodService(); |
| | | HisApiGetMethodService hisApiGetMethodService = new HisApiGetMethodService(); |
| | | |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | |
| | | String code3 = object3.getStr("ResultCode"); |
| | | if (code3.equals("0")) { |
| | | Map<String, Object> datas = object3.getJSONObject("ResultData"); |
| | | datas.put("cardId",hisRegistrationId); |
| | | datas.put("cardId", hisRegistrationId); |
| | | JSONObject object4 = JSONUtil.parseObj(datas); |
| | | hisApiGetMethodService.save(object4,"Outpintestapply"); |
| | | if(null ==orderService.getHuoQuJysqdh(hisRegistrationId)){ |
| | | hisApiGetMethodService.save(object4, "Outpintestapply"); |
| | | } |
| | | //门诊检查申请 |
| | | OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); |
| | | outpinexamapplyDto.setHisRegistrationId(hisRegistrationId); |
| | |
| | | String result6 = getAjaxResult(ajaxResult2); |
| | | JSONObject object5 = getJSONObject(result6); |
| | | String code4 = object5.getStr("ResultCode"); |
| | | if(code4.equals("0")){ |
| | | if (code4.equals("0")) { |
| | | Map<String, Object> map = object5.getJSONObject("ResultData"); |
| | | map.put("cardId",hisRegistrationId); |
| | | map.put("cardId", hisRegistrationId); |
| | | JSONObject jsonObject = JSONUtil.parseObj(map); |
| | | hisApiGetMethodService.save(jsonObject,"Outpinexamapply"); |
| | | if(null ==orderService.getHuoQuJcsqdh(hisRegistrationId)) |
| | | hisApiGetMethodService.save(jsonObject, "Outpinexamapply"); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //退费后取消接诊作废申请单等操作 |
| | | @Transactional |
| | | public void ZfHisApiMethods(TjCustomer customer, TjOrder order) { |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | String jcsqdh= orderService.getHuoQuJcsqdh(order.getCardId()); |
| | | |
| | | String jysqdh= orderService.getHuoQuJysqdh(order.getCardId()); |
| | | |
| | | //作废门诊检查申请 |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), "00029", jcsqdh); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(code.equals("0")){ |
| | | orderService.delHuoQuJcsqdh(order.getCardId()); |
| | | } |
| | | |
| | | //作废门诊申请 |
| | | AjaxResult ajaxResult = controller.Outpindeltestapply(order.getCardId(), "00029", jysqdh); |
| | | String result2 = getAjaxResult(ajaxResult); |
| | | JSONObject object1 = getJSONObject(result2); |
| | | String code1 = object1.getStr("ResultCode"); |
| | | if(code1.equals("0")){ |
| | | orderService.delHuoQuJysqdh(order.getCardId()); |
| | | } |
| | | |
| | | controller.Outpinunconapply(order.getCardId(),date,"00029"); |
| | | |
| | | } |
| | | } |