Browse Source

冲突解决

wangjun 4 năm trước cách đây
mục cha
commit
6489a21949

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

@ -659,6 +659,176 @@ public class TnyyEntranceService {
        return wlyyPrescriptionVOList;
    }
    /**
     * 获取检查检验字典
     * @throws Exception
     */
    public JSONArray findVpacsBw(String pyKey) throws Exception{
        String sql = " SELECT bw.DMMC,bw.jcbw,bw.fyxh,bw.FYMC,bw.FYDW,bw.fysl,bw.FYDJ,bw.jclx,bw.JCMC,bw.SRDM FROM V_pacs_BW bw WHERE 1=1   ";
        if (StringUtils.isNoneBlank(pyKey)){
            sql+= " and  lower(bw.SRDM) like '%"+pyKey+"%' ";
        }
        Map<String,Object> params = new HashedMap();
        params.put("sql",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");
        JSONArray array = new JSONArray();
        if(status!=null&&status == 200){
            JSONArray jsonArray = rs.getJSONArray("detailModelList");
            for (int i=0;i<jsonArray.size();i++){
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                JSONObject object = new JSONObject();
                object.put("name",jsonObject.getString("DMMC"));
                object.put("charge_unit",jsonObject.getString("FYDW"));
                object.put("charge_amount",jsonObject.getString("FYDJ"));
                object.put("py_code",jsonObject.getString("SRDM"));
                object.put("code",jsonObject.getString("jcbw"));
                object.put("exec_unit",jsonObject.getString("fyxh"));
                object.put("fysl",jsonObject.getString("fysl"));
                object.put("FYMC",jsonObject.getString("FYMC"));
                object.put("jclx",jsonObject.getString("jclx"));
                object.put("JCMC",jsonObject.getString("JCMC"));
                array.add(object);
            }
        }
        return array;
    }
    /**
     * 查询某个门诊患者记录
     * @param doctor
     * @return
     * @throws Exception
     */
    public JSONArray selectMzRecord(String doctor) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String condition = "";
        if (doctorMappingDO!=null){
            condition = " and mz.YSDM ='"+doctorMappingDO.getMappingCode()+"' ";
        }
        String sql = "SELECT br.BRID,br.BRXM,br.BRXB,CONVERT(varchar(100), br.CSNY, 120) as birthDay,br.MZHM,br.SFZH from MS_BRDA br WHERE br.BRID IN(SELECT mz.BRBH FROM YS_MZ_JZLS mz where 1=1 "+condition+" GROUP BY mz.BRBH ) and br.SFZH is not null and br.BRXM !='作废' ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectMzRecord:"+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");
        JSONArray array = new JSONArray();
        if(status!=null&&status == 200){
            array = rs.getJSONArray("detailModelList");
            logger.info("selectMzRecord size:"+array.size());
        }
        return array;
    }
    /**
     * 查询某个医生住院患者记录
     * @param doctor
     * @return
     * @throws Exception
     */
    public JSONArray selectZyRecord(String doctor) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String condition = "";
        if (doctorMappingDO!=null){
            condition = " and (brry.zyys= '"+doctorMappingDO.getMappingCode()+"' or brry.zzys= '"+doctorMappingDO.getMappingCode()+"' or brry.szys= '"+doctorMappingDO.getMappingCode()+"') ";
        }else {
            return null;
        }
        String sql = "SELECT br.BRID,br.BRXM,br.BRXB,CONVERT(varchar(100), br.CSNY, 120) as birthDay ,br.MZHM,br.SFZH from MS_BRDA br WHERE br.BRID IN(SELECT cast(brry.BAHM as numeric(18,0)) FROM ZY_BRRY brry where 1=1 and isnumeric(brry.BAHM) = 1 "+condition+" GROUP BY brry.BAHM) and br.BRXM !='作废' and br.SFZH is not null ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectZyRecord:"+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");
        JSONArray array = new JSONArray();
        if(status!=null&&status == 200){
            array = rs.getJSONArray("detailModelList");
            logger.info("selectZyRecord size:"+array.size());
        }
        return array;
    }
    /**
     * 健康档案中门诊记录
     * @throws Exception
     */
    public JSONArray findJKTA_V_ZKSG_HZCX_HIS(String brid) 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+" ";
        sql += " order by h.KSSJ desc";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("findJKTA_V_ZKSG_HZCX_HIS:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * 获取健康档案住院记录
     * @param brid
     * @return
     * @throws Exception
     */
    public JSONArray findJKTA_ZY_RECORD(String brid) throws Exception{
        String sql = "SELECT\n" +
                "\tbrry.ZYH,\n" +
                "\tbrry.ZYHM,\n" +
                "\tbrry.ZYDM,\n" +
                "\tbrry.ZYYS,\n" +
                "\tbrry.ZZYS,\n" +
                "\tbrry.SZYS,\n" +
                "\tbrry.zyysxm ,\n" +
                "\tbrry.zzysxm ,\n" +
                "\tbrry.szysxm ,\n" +
                "\tbrry.KSRQ,\n" +
                "\tbrry.JSRQ,\n" +
                "\tbrry.JGDM,\n" +
                "\tbrry.KSMC,\n" +
                "\tbrry.BAHM,\n" +
                "\tbrry.BRXM\n" +
                "FROM\n" +
                "\tV_ZY_BRRY brry\n" +
                "where\n" +
                "  brry.BAHM ='"+brid+"' ";
        sql += " order by h.KSSJ desc";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("findJKTA_ZY_RECORD:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    public List<Map<String,Object>> queryBySql(String sql){
        List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);

+ 8 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -498,6 +498,14 @@ public class BaseHospitalRequestMapping {
        //作废处方
        public static final String disablePrescription="/disablePrescription";
        public static final String selectMzRecord = "/selectMzRecord";
        public static final String selectZyRecord = "/selectZyRecord";
        public static final String findJKTA_V_ZKSG_HZCX_HIS = "/findJKTA_V_ZKSG_HZCX_HIS";
        public static final String findJKTA_ZY_RECORD = "/findJKTA_ZY_RECORD";
        /*
        关注医生信息
         */

+ 1 - 1
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -345,7 +345,7 @@ express:
spring:
  profiles: tnJwprod
  datasource:
    url: jdbc:mysql://10.9.1.247:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false #jdbc:mysql://192.0.33.27:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://10.9.1.247:3310/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false #jdbc:mysql://192.0.33.27:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: wlyy
    password: qY#j2n5O

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

@ -1131,6 +1131,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                //检验
                return success(xzzxEntranceService.selectLisApply(pyKey));
            }
        }if("sd_tnzyy_wx".equalsIgnoreCase(wxId)){
            return  success(tnyyEntranceService.findVpacsBw(pyKey));
        }else {
            return success(prescriptionService.getInspectionDictionary(pyKey,codes,winNo));
        }
@ -2371,5 +2373,44 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        return success(prescriptionService.savePrescriptionToDoorService(orderId,prId));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.selectMzRecord)
    @ApiOperation(value = "查询门诊记录下的患者列表")
    public Envelop selectMzRecord(
            @ApiParam(name = "doctor", value = "doctor")
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor) throws Exception {
        return success(tnyyEntranceService.selectMzRecord(doctor));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.selectZyRecord)
    @ApiOperation(value = "查询住院记录下的患者列表")
    public Envelop selectZyRecord(
            @ApiParam(name = "doctor", value = "doctor")
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor) throws Exception {
        return success(tnyyEntranceService.selectZyRecord(doctor));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findJKTA_V_ZKSG_HZCX_HIS)
    @ApiOperation(value = "查询某个患者的住院记录")
    public Envelop findJKTA_V_ZKSG_HZCX_HIS(
            @ApiParam(name = "brid", value = "患者id")
            @RequestParam(value = "brid",defaultValue = "",required = true) String brid) throws Exception {
        return success(tnyyEntranceService.findJKTA_V_ZKSG_HZCX_HIS(brid));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findJKTA_ZY_RECORD)
    @ApiOperation(value = "查询某个患者的住院记录")
    public Envelop findJKTA_ZY_RECORD(
            @ApiParam(name = "brid", value = "患者id")
            @RequestParam(value = "brid",defaultValue = "",required = true) String brid) throws Exception {
        return success(tnyyEntranceService.findJKTA_ZY_RECORD(brid));
    }
}

+ 1 - 1
svr/svr-internet-hospital/src/main/resources/application.yml

@ -869,7 +869,7 @@ spring:
  profiles: tnJwprod
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://10.9.1.247:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
    url: jdbc:mysql://10.9.1.247:3310/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
    username: wlyy
    password: qY#j2n5O
#  elasticsearch: