Forráskód Böngészése

眼科医保结算流程

wangzhinan 1 éve
szülő
commit
ce0ad8ab07

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/contant/CommonContant.java

@ -1,4 +1,4 @@
package com.yihu.jw.contant;
package com.yihu.jw.complaint.contant;
/**
 * 常量

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/contant/DeviceHealthContant.java

@ -1,4 +1,4 @@
package com.yihu.jw.contant;
package com.yihu.jw.complaint.contant;
/**
 * 设备健康常量

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/contant/DictContant.java

@ -1,4 +1,4 @@
package com.yihu.jw.contant;
package com.yihu.jw.complaint.contant;
/**
 * Created by yeshijie on 2022/12/5.

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

@ -10493,86 +10493,88 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            }
                        }
                    }
                    //同步处方
                    String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
                    com.alibaba.fastjson.JSONObject object = hcyyPrescriptionService.savePrescriptionToEntrance("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50400",infoDOS);
                    logger.info("成功上传处方"+object);
                    //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                    if (object!=null){
                        if (object.getString("code").equalsIgnoreCase("0")){
                            com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                            com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                            String realOrder = jsonObject1.getString("PresNo");
                            wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setRealOrder(realOrder);
                        }else {
                            throw new Exception(object.getString("msg"));
                    if(infoDOS!=null&&infoDOS.size()!=0){
                        //同步处方
                        String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
                        com.alibaba.fastjson.JSONObject object = hcyyPrescriptionService.savePrescriptionToEntrance("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50400",infoDOS);
                        logger.info("成功上传处方"+object);
                        //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                        if (object!=null){
                            if (object.getString("code").equalsIgnoreCase("0")){
                                com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                                com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                                String realOrder = jsonObject1.getString("PresNo");
                                wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                                wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                                wlyyPrescriptionDO.setRealOrder(realOrder);
                            }else {
                                throw new Exception(object.getString("msg"));
                            }
                        }
                        logger.info("进入处方签名");
                        hcyyEntranceService.initiateDataSign(wlyyPrescriptionDO.getId(),1,ip);
                    }
                    logger.info("进入处方签名");
                    //电子病例签名
                    String baseSign=hcyyEntranceService.initiateDataSign(wlyyPrescriptionDO.getId(),2,ip);
                    //同步电子病历
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    try {
                        if (prescriptionEmrDO != null) {
                            logger.info("电子病历同步");
                            //电子病例签名
                            String baseSign=hcyyEntranceService.initiateDataSign(wlyyPrescriptionDO.getId(),2,ip);
                            hcyyPrescriptionService.saveEmrToEntrance(prescriptionId,baseSign);
                            logger.info("电子病历同步");
                            logger.info("电子病历签名");
                            hcyyEntranceService.initiateDataSign(wlyyPrescriptionDO.getId(),1,ip);
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    try {
                        if (object!=null){
                            if (object.getString("code").equalsIgnoreCase("0")){
                                //  * @param applyDepaName @param applyDoctorName
                                WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
                                String patientCode = outpatientDO.getConsumer();
                                String realerOrder = prescriptionDO.getRealOrder();
                                String recipeTime = DateUtil.dateToStr(prescriptionDO.getCreateTime(), "yyyyMMddHHmmss");
                                List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(prescriptionDO.getDoctor());
                                String applyDepaName = null;
                                if (doctorHospitalDOS != null && doctorHospitalDOS.size() != 0) {
                                    applyDepaName = doctorHospitalDOS.get(0).getDeptName();
                                }
                                String voucherNo = outpatientDO.getRegisterNo();
                                String applyDoctorName = prescriptionDO.getDoctorName();
                                BasePatientDO patientDO = basePatientDao.findById(patientCode);
                                String userName = null;
                                String idcard = null;
                                if (patientDO != null) {
                                    userName = patientDO.getName();
                                    idcard = patientDO.getIdcard();
                                }
                                PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientCode);
                                String userNo = null;
                                if (patientMappingDO != null) {
                                    userNo = patientMappingDO.getMappingCode();
                                }
                                String cardNo = null;
                                if (StringUtils.isNoneBlank(outpatientDO.getCardNo())) {
                                    cardNo = outpatientDO.getCardNo();
                                }
                                logger.info("cardNo:" + cardNo);
                               /* JSONObject jsonObject =entranceService.BS15054(patientMappingDO.getMappingCode(),prescriptionDO.getRealOrder(),demoFlag);
                                net.sf.json.JSONObject res = jsonObject.getJSONObject("resquest");
                                logger.info("获取待结算数据 res: " + res.toString());
                                String rsCode = res.getString("@RESULT");
                                String free= 0+"";
                                if ("0".equals(rsCode)) {
                                    free = res.getString("@total_charge");
                                }*/
                                /*ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, "", "","WX_PUB");
                            */}
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
//                    try {
//                        if (object!=null){
//                            if (object.getString("code").equalsIgnoreCase("0")){
//                                //  * @param applyDepaName @param applyDoctorName
//                                WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
//                                String patientCode = outpatientDO.getConsumer();
//                                String realerOrder = prescriptionDO.getRealOrder();
//
//                                String recipeTime = DateUtil.dateToStr(prescriptionDO.getCreateTime(), "yyyyMMddHHmmss");
//                                List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(prescriptionDO.getDoctor());
//                                String applyDepaName = null;
//                                if (doctorHospitalDOS != null && doctorHospitalDOS.size() != 0) {
//                                    applyDepaName = doctorHospitalDOS.get(0).getDeptName();
//                                }
//                                String voucherNo = outpatientDO.getRegisterNo();
//                                String applyDoctorName = prescriptionDO.getDoctorName();
//                                BasePatientDO patientDO = basePatientDao.findById(patientCode);
//                                String userName = null;
//                                String idcard = null;
//                                if (patientDO != null) {
//                                    userName = patientDO.getName();
//                                    idcard = patientDO.getIdcard();
//                                }
//                                PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientCode);
//                                String userNo = null;
//                                if (patientMappingDO != null) {
//                                    userNo = patientMappingDO.getMappingCode();
//                                }
//                                String cardNo = null;
//                                if (StringUtils.isNoneBlank(outpatientDO.getCardNo())) {
//                                    cardNo = outpatientDO.getCardNo();
//                                }
//                                logger.info("cardNo:" + cardNo);
//                               /* JSONObject jsonObject =entranceService.BS15054(patientMappingDO.getMappingCode(),prescriptionDO.getRealOrder(),demoFlag);
//                                net.sf.json.JSONObject res = jsonObject.getJSONObject("resquest");
//                                logger.info("获取待结算数据 res: " + res.toString());
//                                String rsCode = res.getString("@RESULT");
//                                String free= 0+"";
//                                if ("0".equals(rsCode)) {
//                                    free = res.getString("@total_charge");
//                                }*/
//                                /*ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, "", "","WX_PUB");
//                            */}
//                        }
//                    } catch (Exception e) {
//                        e.printStackTrace();
//                    }
                } catch (Exception e) {
                    e.printStackTrace();

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

@ -1460,8 +1460,9 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                "\t<BillNo>123456</BillNo>\n" +
                "\t<Extra></Extra>";
        Map<String,String> params = new HashedMap();
        params.put("MsgHeader",msgHeader);
        params.put("Param",param);
        String parameter= "<BSXml>"+msgHeader+param+"</BSXml>";
        params.put("parameter",parameter);
        return WebserviceUtil.postYk(url,api,params);
    }
}

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

@ -3017,7 +3017,8 @@ public class HcyyEntranceService {
                    res = MD5.md5Hex(JSONArray.toJSONString(infoDOS));
                }
            }else if (flag==2){
                businessDataId = prescriptionDO.getRealOrder();
                WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                businessDataId = outpatientDO.getRegisterNo();
                documentName="电子病例.pdf";
                res = MD5.md5Hex(JSONArray.toJSONString(emrDOS));
            }

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

@ -2374,8 +2374,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                businessOrderDO.setPayType(1);
                businessOrderDO.setRelationCode(ylzMedicalRelationDO.getId());
                businessOrderDO.setRelationName("处方结算");
                businessOrderDO.setOrderCategory("4");
                businessOrderDO.setOrderType(4);
                businessOrderDO.setOrderCategory("6");
                businessOrderDO.setOrderType(6);
                businessOrderDO.setDoctor(wlyyOutpatientDO.getDoctor());
                businessOrderDO.setPatient(wlyyOutpatientDO.getConsumer());
                businessOrderDO.setPatientName(wlyyOutpatientDO.getConsumerName());
@ -2649,6 +2649,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("patientName",outpatientDO.getPatientName());
                }else if (orderCategoryFlag.equalsIgnoreCase("6")){
                    YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode());
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("patientName",outpatientDO.getPatientName());
                }
            }
        }

+ 13 - 3
business/base-service/src/main/java/com/yihu/jw/utils/WebserviceUtil.java

@ -2,6 +2,7 @@ package com.yihu.jw.utils;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPHeaderElement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -87,9 +88,18 @@ public class WebserviceUtil {
            call.setTargetEndpointAddress(new java.net.URL(urlString));
            call.setOperationName(new QName(api));
            call.setUseSOAPAction(true);
            Object[] objs = null;
            Object[] objs = new Object[1];
            logger.info("=======>组装参数:"+params.size());
            if(params!=null && params.size()>0)
            SOAPHeaderElement header = new SOAPHeaderElement("", "AuthenticationToken");
            header.setPrefix("");
            header.addChildElement("urid").addTextNode("HIS");
            header.addChildElement("pwd").addTextNode("HIS");
            call.addHeader(header);
            call.addParameter(new QName("parameter"), org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);//接口的参数
            logger.info("=======>参数值:"+params.get("parameter"));
            objs[0]=params.get("parameter");
           /* if(params!=null && params.size()>0)
            {
                logger.info("=======>遍历参数");
                objs = new Object[params.size()];
@ -103,7 +113,7 @@ public class WebserviceUtil {
                    objs[i] = params.get(key);
                    i++;
                }
            }
            }*/
            logger.info("=======>设置返回类型");
            call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);//设置返回类型

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -2876,7 +2876,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        //图形验证码验证
        String key = parameters.get("key");
        String text = parameters.get("text");
        if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
        if(org.apache.commons.lang3.StringUtils.isNoneBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
            if(!verifyCaptcha(key,text)){
                throw new ImgCaptchaException("img_captcha error");
            }

+ 2 - 2
svr/svr-internet-hospital/pom.xml

@ -11,7 +11,7 @@
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-internet-hospital-test</artifactId>
    <artifactId>svr-internet-hospital</artifactId>
    <packaging>jar</packaging>
    <version>${parent.version}</version>
@ -267,7 +267,7 @@
    </dependencies>
    <build>
        <finalName>svr-internet-hospital-test</finalName>
        <finalName>svr-internet-hospital</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleDictEndpoint.java

@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.article.dao.KnowledgeArticleDictDao;
import com.yihu.jw.article.service.BaseMenuManageHospitalService;
import com.yihu.jw.article.service.KnowledgeArticleDictService;
import com.yihu.jw.contant.CommonContant;
import com.yihu.jw.complaint.contant.CommonContant;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;