Jelajahi Sumber

findreoutpatientinfo加入电子病历

wangjun 4 tahun lalu
induk
melakukan
9f32c1c036

+ 10 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -569,6 +569,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        //电子病历
                        vo.setWlyyPrescriptionEmrDO(wlyyPrescriptionEmrDO);
                    }
                } else if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
                    WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO1 = prescriptionEmrDao.findEmrByPrescriptionId(vo.getId());
                    if (wlyyPrescriptionEmrDO1 != null) {
                        vo.setWlyyPrescriptionEmrDO(wlyyPrescriptionEmrDO1);
                    } else {
                        List<WlyyPrescriptionEmrDO> listEmr = xzzxEntranceService.selectHistoryEmr(hisPatient,"");
                        if (null!=listEmr&&listEmr.size()>0){
                            vo.setWlyyPrescriptionEmrDO(listEmr.get(0));
                        }
                    }
                }
                //支付信息
                BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(vo.getId());

+ 17 - 7
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -1726,9 +1726,14 @@ public class XzzxEntranceService{
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(msgBody);
        wlyyHttpLogDO.setName("保存电子病历");
        wlyyHttpLogDO.setCreateTime(new Date());
        logger.info("returnEmrHtmlByHLW params:"+params.toString());
        String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
        logger.info("returnEmrHtmlByHLW json:"+xml);
        wlyyHttpLogDO.setResponse(xml);
        return xml;
    }
@ -3119,7 +3124,7 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
     * @return
     * @throws Exception
     */
    public JSONObject saveEmrToEntrance(String prescriptionId) throws Exception {
    public void saveEmrToEntrance(String prescriptionId) throws Exception {
        Map<String,String> params = new HashedMap();
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
        JSONObject paramRequest = new JSONObject();
@ -3146,8 +3151,7 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
                paramRequest.put("patientAge",IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
                paramRequest.put("patientsex",IdCardUtil.getSexForIdcard(basePatientDO.getIdcard()));
                paramRequest.put("patientName",basePatientDO.getName());
                paramRequest.put("patientClan","0");
            }
                paramRequest.put("patientClan","0"); }
            if (null!=wlyyOutpatientDO){
                paramRequest.put("deptCode",wlyyOutpatientDO.getDept());
                paramRequest.put("outpatientCode","R"+wlyyOutpatientDO.getRegisterNo());
@ -3164,14 +3168,20 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
        JSONObject jsonObject = new JSONObject();
        String response = "";
        String url = entranceUrl+"returnEmrHtmlByHLW";
        logger.info("params"+params.toString());
        response = httpClientUtil.httpPost(url,params);
        JSONObject object = new JSONObject();
        logger.info("保存电子病历"+response);
        JSONObject object = JSONObject.parseObject(response);
        if(object.getInteger("status")==200){
            jsonObject = object.getJSONObject("obj");
        if (response.contains("error:插入失败")){
            logger.info("保存失败:"+response);
        }else {
            object = JSONObject.parseObject(response);
            if(object.getInteger("status")==200){
                jsonObject = object.getJSONObject("obj");
                logger.info("保存成功:"+jsonObject);
            }
        }
        return jsonObject;
    }
    /**
     * 获取历史病历