| | |
| | | private HisApiGetMethodService hisApiGetMethodService; |
| | | @Resource |
| | | private ISysConfigService configService; |
| | | @Resource |
| | | private ITbTransitionService transitionService; |
| | | |
| | | //将方法返回值解析成json格式 |
| | | public JSONObject getJSONObject(String builder) { |
| | |
| | | @Transactional |
| | | public AjaxResult HisApiMethods(TjCustomer customer, Long orderId) { |
| | | |
| | | TjOrder tjOrder = orderService.getById(orderId); |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | AjaxResult result = controller.Outpincreateapply(customer); |
| | |
| | | String pationid = resultData.get("PationId").toString(); |
| | | if (null != pationid) { |
| | | customer.setPationId(pationid); |
| | | // customerService.updateById(customer); |
| | | /* OutpinregapplyDto outpinregapplyDto = new OutpinregapplyDto(); |
| | | outpinregapplyDto.setPationid(pationid); |
| | | outpinregapplyDto.setSqysbm(SecurityUtils.getUsername()); |
| | | outpinregapplyDto.setMzksbm("0101"); |
| | | outpinregapplyDto.setCzybm("00029"); |
| | | outpinregapplyDto.setSfjz("0"); |
| | | outpinregapplyDto.setGhzlbm("01"); |
| | | outpinregapplyDto.setYwckbm("0001"); |
| | | outpinregapplyDto.setSflstd("0"); |
| | | outpinregapplyDto.setGhrq(date); |
| | | //门诊挂号 |
| | | AjaxResult ajaxResult = controller.Outpinregapply(outpinregapplyDto); |
| | | String result2 = getAjaxResult(ajaxResult); |
| | | JSONObject object1 = getJSONObject(result2); |
| | | String code1 = object1.getStr("ResultCode"); |
| | | if (code1.equals("0")) { |
| | | JSONArray resultDatas = object1.getJSONArray("ResultData"); |
| | | if (null != resultDatas && resultDatas.size() > 0) { |
| | | Map<String, Object> resultDatasss = (Map<String, Object>) resultDatas.get(0); |
| | | String hisRegistrationId = resultDatasss.get("his_registration_id").toString(); |
| | | //门诊医生接诊 |
| | | controller.Outpinconapply(hisRegistrationId, date, SecurityUtils.getUsername()); |
| | | customer.setCardId(hisRegistrationId); |
| | | customerService.updateById(customer); |
| | | transitionService.updateCardIdByTjNumAndIdCard(customer.getCusIdcard(),hisRegistrationId); |
| | | if(null !=tjOrder){ |
| | | tjOrder.setCardId(hisRegistrationId); |
| | | orderService.updateById(tjOrder); |
| | | } |
| | | } |
| | | }*/ |
| | | AjaxResult error = tijianshenqing(customer, date); |
| | | if (error != null) return error; |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | |
| | | //体检对his申请单调用方法 |
| | | private AjaxResult tijianshenqing(TjCustomer customer, String date) { |
| | | //检验申请 |
| | | OutpintestapplyDto dto = new OutpintestapplyDto(); |
| | | dto.setHisRegistrationId(customer.getCardId()); |
| | |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.error(); |
| | | return null; |
| | | } |
| | | |
| | | |