wangzhinan 1 éve
szülő
commit
78eed395af

+ 45 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
@ -20,6 +21,7 @@ import com.yihu.jw.hospital.prescription.service.entrance.DsyyEntranceService;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.utils.WebserviceUtil;
@ -45,8 +47,51 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    private static Logger logger = LoggerFactory.getLogger(DsyyPrescriptionService.class);
    @Autowired
    private DsyyEntranceService dsyyEntranceService;
    @Autowired
    private BasePatientDao patientDao;
    @Autowired
    private BasePatientMedicareCardDao patientMedicareCardDao;
    //=============查询视图========================
    /**
     * 通过身份证获取卡号
     *
     *
     * @param patient
     * @return
     * @throws Exception
     */
    public JSONArray findCardNo(String patient) throws Exception {
        BasePatientDO patientDO = patientDao.getOne(patient);
        if (patientDO==null){
            throw new Exception("不存在该患者!");
        }
        patientMedicareCardDao.deleteByPatientId(patient);
        JSONArray array = dsyyEntranceService.findCardNo(patientDO.getIdcard());
        for (int i=0;i<array.size();i++){
            JSONObject object = array.getJSONObject(i);
            String cardType = object.getString("CARD_TYPE");
            String cardNo = object.getString("CARD_NO");
            String cardTypeName = object.getString("CARD_TYPE_NAME");
            PatientMedicareCardDO patientMedicareCardDO = new PatientMedicareCardDO();
            patientMedicareCardDO.setCode(cardNo);
            patientMedicareCardDO.setParentType("A");
            if (cardType.equalsIgnoreCase("D")){
                patientMedicareCardDO.setType("A_01");
            }else {
                patientMedicareCardDO.setType("A_03");
            }
            patientMedicareCardDO.setPatientCode(patient);
            patientMedicareCardDO.setOrgCode("350211A1002");
            patientMedicareCardDO.setCityCode("350200");
            patientMedicareCardDO.setDel("1");
            patientMedicareCardDO.setRemark(cardTypeName);
            patientMedicareCardDao.save(patientMedicareCardDO);
        }
        return array;
    }
    /**
     * 获取诊断
     *
@ -73,7 +118,6 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    /**
     * 获取频次字典
     *
     * @param pydm
     * @return
     * @throws Exception
     */

+ 43 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -443,6 +443,49 @@ public class DsyyEntranceService {
        return "success";
    }
    /**
     * 获取患者卡列表
     *
     *
     * @param idcard
     * @throws Exception
     */
    public JSONArray findCardNo(String idcard) throws Exception {
        String sql ="SELECT\n" +
                "\tPAT_NO AS \"PAT_NO\",\n" +
                "\tSICK_ID AS \"SICK_ID\",\n" +
                "\tCARD_NO AS \"CARD_NO\",\n" +
                "\tCARD_STAT AS \"CARD_STAT\",\n" +
                "\tOP_DATE AS \"OP_DATE\",\n" +
                "\tCARD_TYPE AS \"CARD_TYPE\",\n" +
                "\tXM AS \"XM\",\n" +
                "\tXB AS \"XB\",\n" +
                "\tLXDH AS \"LXDH\",\n" +
                "\tZJHM AS \"ZJHM\",\n" +
                "\tZHYE AS \"ZHYE\" \n" +
                "FROM\n" +
                "\tzhiydba.v_internet_patient_card_info \n" +
                "WHERE\n" +
                " 1=1 ";
        JSONArray array = new JSONArray();
        if (StringUtils.isNoneBlank(idcard)){
            sql +=" and ZJHM = '"+idcard+"' ";
        }
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("cardNo:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            array = rs.getJSONArray("detailModelList");
        }
        return array;
    }
    /**
     * 获取icd10诊断
     *

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/wechat/service/WechatInfoService.java

@ -79,7 +79,7 @@ public class WechatInfoService {
            WxWechatDO wxWechat = null;
            
            //中山医院互联网医院
            if("xm_zsyy_wx".equals(wxId) || "xm_xzzx_wx".equals(wxId) || "xm_ykyy_wx".equals(wxId)||"xm_hcyy_wx".equals(wxId)){
            if("xm_zsyy_wx".equals(wxId) || "xm_xzzx_wx".equals(wxId) || "xm_ykyy_wx".equals(wxId)||"xm_hcyy_wx".equals(wxId)||"xm_dsyy_wx".equals(wxId)){
                jsapiTickets = wxAccessTokenService.findJsapiTicket(wxId);
            }else{
                wxWechat = wxAccessTokenService.getWxInfo(wxId);

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -446,7 +446,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                }
                return success(jsonArray);
            } else if ("xm_tasy_wx".equalsIgnoreCase(wxId)) {
                return success(tasyNatService.findPatientCard(patient));
                return success(dsyyPrescriptionService.findCardNo(patient));
            }else if ("xm_mlwyy_wx".equalsIgnoreCase(wxId)){
                return success(mlwyyPrescriptionService.findPatientCardList(patient));
            } else {