Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan 3 lat temu
rodzic
commit
ff6d49909c

+ 32 - 27
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -187,37 +187,42 @@ public class HealthCareService {
    /**
     * 2.3.1	医师身份验证(处方权,多点执业等)
     */
    public String doctorAuthentication(String doctorId) throws Exception{
        BaseDoctorDO doctorDO = doctorDao.findOne(doctorId);
        if (doctorDO == null){
            throw new Exception("医生不存在");
        }
        List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(doctorId);
        if(doctorHospitalDOS.size()<=0){
            throw new Exception("未找到医生科室编码");
        }
        BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
        JSONObject data = new JSONObject();
        data.put("his_dept_code",doctorHospitalDO.getDeptCode());//his内部科室编码
        data.put("his_dept_name",doctorHospitalDO.getDeptName());//his内部科室名称
    public String doctorAuthentication(String doctorId){
        try {
            BaseDoctorDO doctorDO = doctorDao.findOne(doctorId);
            if (doctorDO == null){
                throw new Exception("医生不存在");
            }
            List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(doctorId);
            if(doctorHospitalDOS.size()<=0){
                throw new Exception("未找到医生科室编码");
            }
            BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
            JSONObject data = new JSONObject();
            data.put("his_dept_code",doctorHospitalDO.getDeptCode());//his内部科室编码
            data.put("his_dept_name",doctorHospitalDO.getDeptName());//his内部科室名称
//        data.put("dept_code","");//医保科室编码	String	N
//        data.put("dept_name","");//医保科室名称	String	N
        data.put("medical_mode","10");//医疗就诊方式	10	门(急)诊
        data.put("name",doctorDO.getName());//医师姓名
        data.put("idcard",doctorDO.getIdcard());//医师证件号
        data.put("cert_type","01");//医师证件类型
            data.put("medical_mode","10");//医疗就诊方式	10	门(急)诊
            data.put("name",doctorDO.getName());//医师姓名
            data.put("idcard",doctorDO.getIdcard());//医师证件号
            data.put("cert_type","01");//医师证件类型
        String result = requestYlz(data,"N20.17.02.01","医师身份验证");
        if(result == null){
            throw new Exception("医保请求失败");
        }
        logger.info("医师身份验证:"+result);
        JSONObject object = JSONObject.parseObject(result);
        if (object.getString("flag").equalsIgnoreCase("1")){
            JSONObject encryptData = object.getJSONObject("encrypt_data");
            return encryptData.toJSONString();
            String result = requestYlz(data,"N20.17.02.01","医师身份验证");
            if(result == null){
                throw new Exception("医保请求失败");
            }
            logger.info("医师身份验证:"+result);
            JSONObject object = JSONObject.parseObject(result);
            if (object.getString("flag").equalsIgnoreCase("1")){
                JSONObject encryptData = object.getJSONObject("encrypt_data");
                return encryptData.getString("is_prescribe");
            }
            return result;
        }catch (Exception e){
            e.printStackTrace();
        }
        return result;
        return null;
    }
    /**

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

@ -3908,6 +3908,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                rs.put("workTime", null);
            }
            //医保是否有处方权
            if(healthCareService.isHospitalFlag()){
                rs.put("is_prescribe", healthCareService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
            }else{
                rs.put("is_prescribe", null);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
            }
            //医生角色
            String sql = "SELECT " +
@ -4207,6 +4213,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //多科室兼容
            rs.put("hospitalList", hospitalDOList);
            //医保是否有处方权
            if(healthCareService.isHospitalFlag()){
                rs.put("is_prescribe", healthCareService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
            }else{
                rs.put("is_prescribe", null);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
            }
            //医生角色
            String sql = "SELECT " +
@ -9178,8 +9190,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            //调医保接口
                            try {
                                healthCareService.advanceWarning(wlyyPrescriptionDO.getId());
                                healthCareService.doctorPrescriptionUpload(wlyyPrescriptionDO.getId());
                                if(healthCareService.isHospitalFlag()){
                                    healthCareService.advanceWarning(wlyyPrescriptionDO.getId());
                                    healthCareService.doctorPrescriptionUpload(wlyyPrescriptionDO.getId());
                                }
                            }catch (Exception e){
                                e.printStackTrace();
                            }