浏览代码

[医保代码]

wangzhinan 3 年之前
父节点
当前提交
7497f74bba

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

@ -2789,7 +2789,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                outpatientDao.save(outpatientDO);
                outpatientDao.save(outpatientDO);
                //先下单
                //先下单
                businessOrderService.savePrescriptionOrder(prescription.getId());
                businessOrderService.savePrescriptionOrder(prescription.getId());
                if(!demoFlag) {
                /*if(!demoFlag) {
                    //同步his
                    //同步his
                    ykyyEntranceService.findByRealOrder(prescription.getId(), demoFlag);
                    ykyyEntranceService.findByRealOrder(prescription.getId(), demoFlag);
                    List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
                    List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
@ -2808,7 +2808,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            ykyySMSService.sendSmsByTempcode("prescription_remind", outpatientDO, wlyyPrescriptionDO, "");
                            ykyySMSService.sendSmsByTempcode("prescription_remind", outpatientDO, wlyyPrescriptionDO, "");
                        }
                        }
                    }
                    }
                }
                }*/
                /*if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
                /*if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
                    if (StringUtils.isNotBlank(inspectionJson)) {
                    if (StringUtils.isNotBlank(inspectionJson)) {
                        if (StringUtils.isNotBlank(infoJsons)) {
                        if (StringUtils.isNotBlank(infoJsons)) {
@ -9330,6 +9330,27 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }*/
            }*/
            if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
            if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
                wlyyPrescriptionDO.setStatus(10);
                wlyyPrescriptionDO.setStatus(10);
                if(!demoFlag) {
                    //同步his
                    try {
                        WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
                        ykyyEntranceService.findByRealOrder(prescriptionId, demoFlag);
                        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
                        logger.info("cfsb", wlyyPrescriptionDO.getRealOrder());
                        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL");
                        if (null != hospitalSysDictDO && "0".equalsIgnoreCase(hospitalSysDictDO.getDictValue())) {
                        } else {
                            ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(), wlyyPrescriptionDO.getOrderId(), wlyyPrescriptionDO.getRealOrder());
                        }
                        List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
                        if (list!=null&&list.size()>0){
                            ykyySMSService.sendSmsByTempcode("prescription_remind", outpatientDO, wlyyPrescriptionDO, "");
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
                List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
                List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
                List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
                List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
                if (list!=null&&list.size()>0){
                if (list!=null&&list.size()>0){
@ -11499,7 +11520,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
    public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
                                   String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
                                   String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
                                  String checkPart,String chargeFlag,String chargeCode,String icdCode) throws Exception {
                                  String checkPart,String chargeFlag,String chargeCode,String icdCode,String preNo) throws Exception {
        Map returnMap = new HashMap();
        Map returnMap = new HashMap();
        Integer winNo = 6;
        Integer winNo = 6;
        if (checkPart==null||checkPart==""){
        if (checkPart==null||checkPart==""){
@ -11844,7 +11865,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            format2 = new SimpleDateFormat("yyyy-MM-dd").parse(natTime);
            format2 = new SimpleDateFormat("yyyy-MM-dd").parse(natTime);
            String shortDate = new SimpleDateFormat("yyyyMMdd").format(format2);
            String shortDate = new SimpleDateFormat("yyyyMMdd").format(format2);
            System.out.println("yyyy-MM-dd转yyyyMMdd:"+shortDate);
            System.out.println("yyyy-MM-dd转yyyyMMdd:"+shortDate);
            String regRes=tasyNatService.saveRegOrder(regDept,shortDate,pm,"",cardNo,mobile,name,"3");
            String regRes=tasyNatService.saveRegOrder(regDept,shortDate,pm,preNo,cardNo,mobile,name,"3");
            com.alibaba.fastjson.JSONObject regObj = com.alibaba.fastjson.JSONObject.parseObject(regRes);
            com.alibaba.fastjson.JSONObject regObj = com.alibaba.fastjson.JSONObject.parseObject(regRes);
            String HisSeqNo="";
            String HisSeqNo="";
            String orderNum="";
            String orderNum="";
@ -11862,7 +11883,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //先进行核算检测预约
            //先进行核算检测预约
            String realOrder="";
            String realOrder="";
            String addressNow=provinceName+cityName+townName+streetName+address;
            String addressNow=provinceName+cityName+townName+streetName+address;
            String result = tasyNatService.initNatParams("",name.trim(),mediaCard.trim(),addressNow,firstJobCode,secondJobCode);
            String result = tasyNatService.initNatParams(HisSeqNo,name.trim(),mediaCard.trim(),addressNow,firstJobCode,secondJobCode);
            Boolean flag = false;
            Boolean flag = false;
            if (StringUtils.isNoneBlank(result)){
            if (StringUtils.isNoneBlank(result)){
                com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
                com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
@ -11873,7 +11894,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    if ("0".equalsIgnoreCase(returnCode)){
                    if ("0".equalsIgnoreCase(returnCode)){
                        returnMap.put("msg",object.getString("data"));
                        returnMap.put("msg",object.getString("data"));
                        returnMap.put("status","-1");
                        returnMap.put("status","-1");
                        //tasyNatService.cancleOrder(cardNo,HisSeqNo,orderNum);
                        tasyNatService.cancleOrder(cardNo,HisSeqNo,orderNum);
                        return  returnMap;
                        return  returnMap;
                    }else {
                    }else {
                        flag = true;
                        flag = true;
@ -11889,13 +11910,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
                BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
                baseNatAppointmentDO.setChargeAmount(itemPrice);
                baseNatAppointmentDO.setChargeAmount(itemPrice);
                baseNatAppointmentDO.setMedicare(mediaCard.trim());
                baseNatAppointmentDO.setMedicare(mediaCard.trim());
                //baseNatAppointmentDO.setRegisterNo(HisSeqNo);
                baseNatAppointmentDO.setRegisterNo(HisSeqNo);
                baseNatAppointmentDO.setName(name);
                baseNatAppointmentDO.setName(name);
                baseNatAppointmentDO.setCardNo(cardNo.trim());
                baseNatAppointmentDO.setCardNo(cardNo.trim());
                baseNatAppointmentDO.setCardType(cardType);
                baseNatAppointmentDO.setCardType(cardType);
                baseNatAppointmentDO.setAddress(address);
                baseNatAppointmentDO.setAddress(address);
                //baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
                //baseNatAppointmentDO.setOderNum(orderNum);
                baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
                baseNatAppointmentDO.setOderNum(orderNum);
                baseNatAppointmentDO.setCityName(cityName);
                baseNatAppointmentDO.setCityName(cityName);
                baseNatAppointmentDO.setFirstJobCode(firstJobCode);
                baseNatAppointmentDO.setFirstJobCode(firstJobCode);
                baseNatAppointmentDO.setFirstJobName(firstJobName);
                baseNatAppointmentDO.setFirstJobName(firstJobName);

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/util/SFUtils.java

@ -335,7 +335,7 @@ public class SFUtils {
        order.put("destProvince",sfexpress_obj.getProvinceName());
        order.put("destProvince",sfexpress_obj.getProvinceName());
        order.put("destCity",sfexpress_obj.getCityName());
        order.put("destCity",sfexpress_obj.getCityName());
        order.put("destDistrict",sfexpress_obj.getTownName());
        order.put("destDistrict",sfexpress_obj.getTownName());
        order.put("destAddress",sfexpress_obj.getAddress());
        order.put("destAddress",sfexpress_obj.getStreetName()+sfexpress_obj.getAddress());
        
        
        order.put("packagesNo",1);
        order.put("packagesNo",1);
        order.put("depositumInfo","药品");
        order.put("depositumInfo","药品");

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -976,7 +976,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                                        if (StringUtils.isNoneBlank(wlyyPrescriptionDO.getAdmNo())){
                                        if (StringUtils.isNoneBlank(wlyyPrescriptionDO.getAdmNo())){
                                            condition = " t.JZXH = '"+wlyyPrescriptionDO.getAdmNo()+"' and ";
                                            condition = " t.JZXH = '"+wlyyPrescriptionDO.getAdmNo()+"' and ";
                                        }
                                        }
                                        String address =wlyyPrescriptionExpressageDO.getProvinceName()+ wlyyPrescriptionExpressageDO.getCityName()+wlyyPrescriptionExpressageDO.getTownName()+wlyyPrescriptionExpressageDO.getAddress();
                                        String address =wlyyPrescriptionExpressageDO.getProvinceName()+ wlyyPrescriptionExpressageDO.getCityName()+wlyyPrescriptionExpressageDO.getTownName()+wlyyPrescriptionExpressageDO.getStreetName()+wlyyPrescriptionExpressageDO.getAddress();
                                        //同步his写入自取信息
                                        //同步his写入自取信息
                                        String updatesql = "update v_ms_dd01 t set t.PSFS = 0 ,t.FKZT=1 ,t.SJR= '"+wlyyPrescriptionExpressageDO.getName()+"' ," +
                                        String updatesql = "update v_ms_dd01 t set t.PSFS = 0 ,t.FKZT=1 ,t.SJR= '"+wlyyPrescriptionExpressageDO.getName()+"' ," +
@ -1008,7 +1008,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                                            JSONObject json = JSONObject.parseObject(sfResult.toString());
                                            JSONObject json = JSONObject.parseObject(sfResult.toString());
                                            String sfOrder =  json.getString("mailNo");
                                            String sfOrder =  json.getString("mailNo");
                                            logger.info("---获取订单号为:"+sfOrder);
                                            logger.info("---获取订单号为:"+sfOrder);
                                            String address = wlyyPrescriptionExpressageDO.getProvinceName()+wlyyPrescriptionExpressageDO.getCityName()+wlyyPrescriptionExpressageDO.getTownName()+wlyyPrescriptionExpressageDO.getAddress();
                                            String address = wlyyPrescriptionExpressageDO.getProvinceName()+wlyyPrescriptionExpressageDO.getCityName()+wlyyPrescriptionExpressageDO.getTownName()+wlyyPrescriptionExpressageDO.getStreetName()+wlyyPrescriptionExpressageDO.getAddress();
                                            String updatesql = "update v_ms_dd01 t set t.PSFS = 1 ,t.FKZT=1 ,t.YFSB = 6 ,t.KDDH ='"+sfOrder+"',t.SJR = '"+wlyyPrescriptionExpressageDO.getName()+"' ," +
                                            String updatesql = "update v_ms_dd01 t set t.PSFS = 1 ,t.FKZT=1 ,t.YFSB = 6 ,t.KDDH ='"+sfOrder+"',t.SJR = '"+wlyyPrescriptionExpressageDO.getName()+"' ," +
                                                    " t.SJRDH = '"+wlyyPrescriptionExpressageDO.getMobile()+"' ,"+
                                                    " t.SJRDH = '"+wlyyPrescriptionExpressageDO.getMobile()+"' ,"+
                                                    " t.SJRDZ = '"+address+"'"+
                                                    " t.SJRDZ = '"+address+"'"+

+ 23 - 12
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/healthCare/HealthCareEndPoint.java

@ -12,6 +12,7 @@ import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
/**
/**
@ -30,6 +31,8 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    private HealthCareService healthCareService;
    private HealthCareService healthCareService;
    @Autowired
    @Autowired
    private HttpClientUtil httpClientUtil;
    private HttpClientUtil httpClientUtil;
    @Value("${wechat.id}")
    private String wechatId;
    public static String entranceHealthCareUrl = "http://172.16.100.240:10023/healthCare/";
    public static String entranceHealthCareUrl = "http://172.16.100.240:10023/healthCare/";
    @GetMapping(value = "doctorAuthentication")
    @GetMapping(value = "doctorAuthentication")
@ -37,13 +40,17 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    public ObjEnvelop doctorAuthentication(@ApiParam(name = "doctorId", value = "医生id", required = true)
    public ObjEnvelop doctorAuthentication(@ApiParam(name = "doctorId", value = "医生id", required = true)
                                           @RequestParam(value = "doctorId",required = true) String doctorId){
                                           @RequestParam(value = "doctorId",required = true) String doctorId){
        try {
        try {
            String url = entranceHealthCareUrl + "doctorAuthentication?doctorId="+doctorId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                String url = entranceHealthCareUrl + "doctorAuthentication?doctorId="+doctorId;
                String infoResponse = httpClientUtil.get(url,"GBK");
                JSONObject jsonObject = JSONObject.parseObject(infoResponse);
                if(jsonObject.getInteger("status")==200){
                    return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
                }else {
                    return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
                }
            }else {
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
                return ObjEnvelop.getSuccess("ok",healthCareService.doctorAuthentication(doctorId));
            }
            }
        }catch (Exception e){
        }catch (Exception e){
@ -57,13 +64,17 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    public ObjEnvelop doctorFaceCheckInAddress(@ApiParam(name = "doctorId", value = "医生id", required = true)
    public ObjEnvelop doctorFaceCheckInAddress(@ApiParam(name = "doctorId", value = "医生id", required = true)
                                           @RequestParam(value = "doctorId",required = true) String doctorId){
                                           @RequestParam(value = "doctorId",required = true) String doctorId){
        try {
        try {
            String url = entranceHealthCareUrl + "doctorFaceCheckInAddress?doctorId="+doctorId;
            String infoResponse = httpClientUtil.get(url,"GBK");
            JSONObject jsonObject = JSONObject.parseObject(infoResponse);
            if(jsonObject.getInteger("status")==200){
                return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
            if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                String url = entranceHealthCareUrl + "doctorFaceCheckInAddress?doctorId="+doctorId;
                String infoResponse = httpClientUtil.get(url,"GBK");
                JSONObject jsonObject = JSONObject.parseObject(infoResponse);
                if(jsonObject.getInteger("status")==200){
                    return ObjEnvelop.getSuccess("ok",jsonObject.get("obj"));
                }else {
                    return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
                }
            }else {
            }else {
                return ObjEnvelop.getError("调用内网接口失败:"+jsonObject.getString("message"));
                return ObjEnvelop.getSuccess("ok",healthCareService.doctorFaceCheckInAddress(doctorId));
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            e.printStackTrace();
            e.printStackTrace();

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -2465,11 +2465,13 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                      @ApiParam(name = "chargeCode", value = "chargeCode")
                                      @ApiParam(name = "chargeCode", value = "chargeCode")
                                          @RequestParam(value = "chargeCode",required = false)String chargeCode,
                                          @RequestParam(value = "chargeCode",required = false)String chargeCode,
                                      @ApiParam(name = "icdCode", value = "icdCode")
                                      @ApiParam(name = "icdCode", value = "icdCode")
                                          @RequestParam(value = "icdCode",required = false)String icdCode){
                                          @RequestParam(value = "icdCode",required = false)String icdCode,
                                      @ApiParam(name = "preNo", value = "preNo")
                                          @RequestParam(value = "preNo",required = false)String preNo){
        try {
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode));
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode,preNo));
        } catch (Exception e) {
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
        }

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

@ -3136,10 +3136,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                      @ApiParam(name = "chargeCode", value = "chargeCode")
                                      @ApiParam(name = "chargeCode", value = "chargeCode")
                                          @RequestParam(value = "chargeCode",required = false)String chargeCode,
                                          @RequestParam(value = "chargeCode",required = false)String chargeCode,
                                      @ApiParam(name = "icdCode", value = "icdCode")
                                      @ApiParam(name = "icdCode", value = "icdCode")
                                          @RequestParam(value = "icdCode",required = false)String icdCode){
                                          @RequestParam(value = "icdCode",required = false)String icdCode,
                                      @ApiParam(name = "preNo", value = "preNo")
                                          @RequestParam(value = "preNo",required = false)String preNo){
        try {
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode));
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode,preNo));
        } catch (Exception e) {
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
        }