소스 검색

泰安bug修改

wangjun 4 년 전
부모
커밋
9147e62e44

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -82,6 +82,9 @@ public class PatientMappingService {
    public String findYkyyPatNoByPatient(String patient,boolean demoFlag)throws Exception{
        logger.info("findYkyyPatNoByPatient:"+patient);
        BasePatientDO patientDO = basePatientDao.findById(patient);
        if(patientDO == null){
            return patient;
        }
        logger.info("patientDO:"+patientDO.toString());
        PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
        PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patient,"1");

+ 5 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/TnPrescriptionService.java

@ -232,9 +232,11 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
        if (wlyyOutpatientVOS!=null&&wlyyOutpatientVOS.size()!=0){
            WlyyOutpatientVO outpatientVO = wlyyOutpatientVOS.get(0);
            BasePatientDO patientDO = basePatientDao.findById(patient);
            outpatientVO.setSex(patientDO.getSex()+"");
            outpatientVO.setBirthday(patientDO.getBirthday());
            outpatientVO.setIdcard(patientDO.getIdcard());
            if (patientDO!=null){
                outpatientVO.setSex(patientDO.getSex()+"");
                outpatientVO.setBirthday(patientDO.getBirthday());
                outpatientVO.setIdcard(patientDO.getIdcard());
            }
            return outpatientVO;
        }
       return null;

+ 10 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java

@ -408,7 +408,8 @@ public class TnyyEntranceService {
     * @throws Exception
     */
    public JSONArray findV_ZKSG_HZCX_HIS(String brid,String conNo,String startTime,String endTime,String ksdm) throws Exception{
        String sql = "SELECT h.JZXH,h.GHXH,h.BRBH,h.KSDM,h.YSDM,h.ZYZD,h.KSSJ,h.JSSJ,h.JZZT,h.FZRQ,h.GHFZ,ks.KSMC,yg.YGXM  from YS_MZ_JZLS h,GY_KSDM ks,GY_YGDM yg WHERE yg.YGDM=h.YSDM and ks.KSDM=h.KSDM and  h.BRBH = "+brid+" ";
        String sql = "SELECT h.JZXH,h.GHXH,h.BRBH,h.KSDM,h.YSDM,zd.JBMC as ZYZD,h.KSSJ,h.JSSJ,h.JZZT,h.FZRQ,h.GHFZ,ks.KSMC,yg.YGXM  from YS_MZ_JZLS h,GY_KSDM ks,GY_YGDM yg " +
                " ,GY_JBBM zd  WHERE yg.YGDM=h.YSDM and ks.KSDM=h.KSDM and h.ZYZD = zd.JBXH and  h.BRBH = "+brid+" ";
        if(!StringUtil.isBlank(conNo)){
            sql += " and h.JZXH = " + conNo;
        }
@ -455,19 +456,17 @@ public class TnyyEntranceService {
        logger.info("EntranceService " + fid + " PAT_NO :" + PAT_NO + " conNo:" + conNo + " startTime:" + startTime + " endTime:" + endTime);
        String resp = "";
        String orgCode = "350211A5004";
        String orgName = "厦门大学附属厦门眼科中心";
        String orgCode = "350211A1002";
        String orgName = "泰安市中医医院";
        //居民id转化
        PatientMappingDO patientMappingDO = patientMappingDao.findByMappingCodeAndSource(PAT_NO,"1");
        if(patientMappingDO == null){
            return null;
        }
//KSSJ,h.BRID,h.BRXM,h.SJHM,h.JZKH,h.SFZH,h.BRXZ,h.YSDM,h.KDYS" +
//                ",h.KSDM,h.KSMC,h.ZDMC,h.JZXH
        JSONArray jsonArray = new JSONArray();
        jsonArray = findV_ZKSG_HZCX_HIS(patientMappingDO.getMappingCode(),conNo,startTime,endTime,ksdm);
        jsonArray = findV_ZKSG_HZCX_HIS(PAT_NO,conNo,startTime,endTime,ksdm);
        //查找眼科数据
        if (jsonArray.size() == 0) {
            return null;
@ -485,8 +484,10 @@ public class TnyyEntranceService {
                //wlyyOutpatientVO.setRegisterNo(null == jsonObjectMgsInfo.get("REGISTER_SN") ? "" : jsonObjectMgsInfo.get("REGISTER_SN") + "");
                wlyyOutpatientVO.setDept(null == jsonObjectMgsInfo.get("KSDM") ? "" : jsonObjectMgsInfo.get("KSDM") + "");
                wlyyOutpatientVO.setDeptName(null == jsonObjectMgsInfo.get("KSMC") ? "" : jsonObjectMgsInfo.get("KSMC") + "");
                wlyyOutpatientVO.setPatient(patientMappingDO.getPatient());
                wlyyOutpatientVO.setPatientName(patientMappingDO.getPatientName());
                if (patientMappingDO!=null){
                    wlyyOutpatientVO.setPatient(patientMappingDO.getPatient());
                    wlyyOutpatientVO.setPatientName(patientMappingDO.getPatientName());
                }
                wlyyOutpatientVO.setConNo(null == jsonObjectMgsInfo.get("JZXH") ? "" : jsonObjectMgsInfo.get("JZXH") + "");
                String doctor = null == jsonObjectMgsInfo.get("YSDM") ? "" : jsonObjectMgsInfo.get("YSDM") + "";

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/utils/hibernate/HibenateUtils.java

@ -47,7 +47,7 @@ public class HibenateUtils {
        SQLQuery query = session.createSQLQuery(sql);
        query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
        if(page!=null&&size!=null){
            query.setFirstResult(page * size);
            query.setFirstResult((page - 1) * size);
            query.setMaxResults(size);
        }
        List<Map<String, Object>> list = query.list();

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

@ -143,8 +143,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                              @RequestParam(value = "cardNo",required = false)String cardNo,
                                          @ApiParam(name = "flag", value = "标识", required = false)
                                              @RequestParam(value = "flag",required = false)String flag) throws Exception {
        startTime = startTime+" 00:00:00";
        endTime =endTime+" 23:59:59";
        if(StringUtils.isNoneBlank(startTime)){
            startTime = startTime+" 00:00:00";
        }
        if(StringUtils.isNoneBlank(endTime)){
            endTime =endTime+" 23:59:59";
        }
        List<WlyyOutpatientVO> vos = new ArrayList<>();
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
            vos = prescriptionService.findOutpatientList(patient, startTime, endTime, demoFlag,ksdm,cardNo);