Преглед на файлове

Merge branch 'dev' of wangjun/wlyy2.0 into dev

wangzhinan преди 4 години
родител
ревизия
93700e4069

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -115,6 +115,8 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                result.setFamilyMember(patientNewId);
                wlyyPatientFamilyMemberDao.save(result);
                patientMappingDO.setIdcard(idCard);
                patientMappingDO.setSource("1");
                patientMappingDO.setPatientName(familyName);
                patientMappingDO.setMappingCode(familyId);
                patientMappingDO.setPatient(patientNewId);
                patientMappingDO.setCreateTime(new Date());

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseUserMsgService.java

@ -236,12 +236,12 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
            //sql.append(" and t.update_time < '" + endTime+"'");//DateUtil.stringToDate(endTime,"yyyy-MM-dd HH:mm:ss")
            if ("xm_ykyy_wx".equals(wxId)) {
                if (flag){
                    sql.append( " and t.update_time <= str_to_date('" + endTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')");
                    sql.append( " and t.update_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')");
                }else {
                    sql.append(  " and t.update_time <= to_date('" + endTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')");
                    sql.append(  " and t.update_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')");
                }
            } else {
                sql.append( " AND t.update_time <='" + endTime + " 00:00:00'");
                sql.append( " AND t.update_time <='" + endTime + " 23:59:59'");
            }
        }
        sql.append(" ORDER BY t.update_time Desc");

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

@ -692,7 +692,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " p.prescribe_time AS \"prescribeTime\", " +
                " p.pay_time AS \"payTime\", " +
                " p.dosage_time AS \"dosageTime\", " +
                " p.finish_time AS \"finishTime\", " +
                " p.jih_time AS \"finishTime\", " +
                " p.create_time AS \"createTime\", " +
                " p.dept AS \"dept\", " +
                " p.dept_name AS \"deptName\", " +
@ -3691,7 +3691,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
            }
        }
        //更改门诊状态
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outPatientId);
        wlyyOutpatientDO.setStatus("-1");

+ 142 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -114,7 +114,8 @@ public class XzzxEntranceService{
    private BasePatientDao basePatientDao;
    @Autowired
    private BaseDoctorHospitalDao baseDoctorHospitalDao;
    @Autowired
    private PrescriptionEmrDao prescriptionEmrDao;
    private static String key="bvvsf3JA0mUXMU+mVnMaOQ==";
@ -1498,7 +1499,7 @@ public class XzzxEntranceService{
                "\" ID=\""+patientAndDoctor.getString("PATIENT_ID")+
                "\" VISIT_ID=\"0\" PATIENT_PRES_ID=\""+patientAndDoctor.getString("PATIENT_PRES_ID")+
                "\" BIRTH=\""+patientAndDoctor.getString("BIRTH")+
                "\" HEIGHT=\"0\" WEIGHT=\"0\" GENDER=\""+patientAndDoctor.getString("GENDER")+
                "\" HEIGHT=\"\" WEIGHT=\"\" GENDER=\""+patientAndDoctor.getString("GENDER")+
                "\" PREGNANT=\"\" LACT=\"否\" HEPATICAL=\"\" RENAL=\"\" PANCREAS=\"\" ALERGY_DRUGS=\"\" IDENTITY_TYPE=\"\" FEE_TYPE=\""+patientAndDoctor.getString("FEE_TYPE")+
                "\" SCR=\"\" SCR_UNIT=\"\" GESTATION_AGE=\"\" PRETERM_BIRTH=\"\" DRUG_HISTORY=\"\" FAMILY_DISEASE_HISTORY=\"\" GENETIC_DISEASE=\"\" MEDICARE_01=\"\" MEDICARE_02=\"\" MEDICARE_03=\"\" MEDICARE_04=\"\" MEDICARE_05=\"\" />";
        String checkDiagnosises = "<Diagnosises DIAGNOSISES=\""+patientAndDoctor.getString("diagnosises")+"\" >\n" +
@ -1516,7 +1517,7 @@ public class XzzxEntranceService{
                        " DEPT_CODE=\""+patientAndDoctor.getString("DEPT_CODE")+"\" DOCTOR_NAME=\""+patientAndDoctor.getString("DOCTOR_NAME")+
                        "\" ORDER_NO=\""+i+
                        "\" ORDER_SUB_NO=\""+1+"\" AUTHORITY_LEVELS=\"\" ALERT_LEVELS=\"\" TITLE=\""+patientAndDoctor.getString("POSITION") +
                        "\" GROUP_ID=\""+wlyyPrescriptionInfoDO.getFrequency()+"\" USER_ID=\""+patientAndDoctor.getString("doctorId")+
                        "\" GROUP_ID=\""+i+"\" USER_ID=\""+patientAndDoctor.getString("DOCTOR_ID")+
                        "\" PRES_ID=\""+patientAndDoctor.getString("PATIENT_PRES_ID")+
                        "\" PRES_DATE=\""+patientAndDoctor.getString("CREATE_DATE")+
                        "\" PRES_SEQ_ID=\""+patientAndDoctor.getString("PATIENT_PRES_ID")+
@ -1652,7 +1653,85 @@ public class XzzxEntranceService{
        }
        return personInfoVOS;
    }
    /**
     * 同步门诊病历
     * @return
     */
    public String returnEmrHtmlByHLW(JSONObject jsonObject,WlyyPrescriptionEmrDO prescriptionEmrDO)throws Exception{
        String api = "returnEmrHtmlByHLW";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        String htmlDeo = "";
        if (null!=prescriptionEmrDO){
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("EMRHTMLDEMO");
            if (null!=wlyyHospitalSysDictDO){
                htmlDeo = wlyyHospitalSysDictDO.getDictValue();
                htmlDeo = htmlDeo.replace("@patientName@",jsonObject.getString("patientName"));
                htmlDeo = htmlDeo.replace("@patientAge@",jsonObject.getString("patientAge"));
                htmlDeo = htmlDeo.replace("@patientsex@",jsonObject.getString("patientsex"));
                htmlDeo = htmlDeo.replace("@deptCode@",jsonObject.getString("deptCode"));
                htmlDeo = htmlDeo.replace("@r+outpatientCode@",jsonObject.getString("outpatientCode"));
                htmlDeo = htmlDeo.replace("@patientClan@",jsonObject.getString("patientClan"));
                htmlDeo = htmlDeo.replace("@Special@",prescriptionEmrDO.getSpecialHistory());
                SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd hh:MM");
                htmlDeo = htmlDeo.replace("@createTime@",sf.format(prescriptionEmrDO.getCreateTime()));
                htmlDeo = htmlDeo.replace("@complaint@",prescriptionEmrDO.getComplaint());
                htmlDeo = htmlDeo.replace("@medicalHistory@",prescriptionEmrDO.getMedicalHistory());
                htmlDeo = htmlDeo.replace("@popularHistory@",prescriptionEmrDO.getPopularHistory());
                htmlDeo = htmlDeo.replace("@pastHistory@",prescriptionEmrDO.getPastHistory());
                htmlDeo = htmlDeo.replace("@allergicHistory@",prescriptionEmrDO.getAllergicHistory());
                htmlDeo = htmlDeo.replace("@physicalExamination@",prescriptionEmrDO.getPhysicalExamination());
                htmlDeo = htmlDeo.replace("@assistExamination@",prescriptionEmrDO.getAssistExamination());
                condition+="<content>"+htmlDeo+"</content>";
            }
        }
        if ( null!=jsonObject.get("patientid")) {
            condition+="<patientid>"+jsonObject.getString("patientid")+"</patientid>";
        }
        if ( null!=jsonObject.get("eventno")) {
            condition+="<eventno>"+jsonObject.getString("eventno")+"</eventno>";
        }
        if ( null!=jsonObject.get("type")) {
            condition+="<type>"+jsonObject.getString("type")+"</type>";
        }
        if ( null!=jsonObject.get("templateid")) {
            condition+="<templateid>"+jsonObject.getString("templateid")+"</templateid>";
        }
        if ( null!=jsonObject.get("emrtitle")) {
            condition+="<emrtitle>"+jsonObject.getString("emrtitle")+"</emrtitle>";
        }
        if (null!=jsonObject.get("catalogid")){
            condition += "<catalogid>"+jsonObject.getString("catalogid")+"</catalogid>";
        }
        if (null!=jsonObject.get("operatorname")){
            condition += "<operatorname>"+jsonObject.getString("operatorname")+"</operatorname>";
        }
        if (null!=jsonObject.get("operatorid")){
            condition += "<operatorid>"+jsonObject.getString("operatorid")+"</operatorid>";
        }
        if (null!=jsonObject.get("emrtype")){
            condition += "<emrtype>"+jsonObject.getString("emrtype")+"</emrtype>";
        }
        if (null!=jsonObject.get("id")){
            condition += "<id>"+jsonObject.getString("id")+"</id>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("returnEmrHtmlByHLW params:"+params.toString());
        String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
        logger.info("returnEmrHtmlByHLW json:"+xml);
        return xml;
    }
//=====================微信模板消息推送===================================
    public String sendMes(String wxId,String patient,String cardNo,String first,String noticeContent,String remark,String redirectUrl){
@ -2986,6 +3065,66 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
        }
        return jsonObject;
    }
    /**
     * 保存电子病历
     * @param prescriptionId 处方id
     * @return
     * @throws Exception
     */
    public JSONObject saveEmrToEntrance(String prescriptionId) throws Exception {
        Map<String,String> params = new HashedMap();
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
        JSONObject paramRequest = new JSONObject();
        if (null!=wlyyPrescriptionDO){
            paramRequest.put("patientName",wlyyPrescriptionDO.getPatientName());
            PatientMappingDO patientMappingDO =  patientMappingDao.findByPatient(wlyyPrescriptionDO.getPatientCode());
            BasePatientDO basePatientDO = basePatientDao.findById(wlyyPrescriptionDO.getPatientCode());
            DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(wlyyPrescriptionDO.getDoctor());
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
            if(null!=patientMappingDO){
                paramRequest.put("patientid",patientMappingDO.getMappingCode());
            }
            if(null!=doctorMappingDO){
                paramRequest.put("operatorid",doctorMappingDO.getMappingCode());
                paramRequest.put("operatorname",wlyyPrescriptionDO.getDoctorName());
            }
            paramRequest.put("type","2");
            WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO =  prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
            if (null!=wlyyPrescriptionEmrDO){
                paramRequest.put("id",wlyyPrescriptionEmrDO.getId());
                params.put("emrInfo",JSON.toJSONString(wlyyPrescriptionEmrDO));
            }
            if (null!=basePatientDO){
                paramRequest.put("patientAge",IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
                paramRequest.put("patientsex",IdCardUtil.getSexForIdcard(basePatientDO.getIdcard()));
                paramRequest.put("patientName",basePatientDO.getName());
                paramRequest.put("patientClan","0");
            }
            if (null!=wlyyOutpatientDO){
                paramRequest.put("deptCode",wlyyOutpatientDO.getDept());
                paramRequest.put("outpatientCode","R"+wlyyOutpatientDO.getRegisterNo());
                paramRequest.put("eventno","R"+wlyyOutpatientDO.getRegisterNo());
            }
            paramRequest.put("templateid","662");
            paramRequest.put("catalogid","50");
            paramRequest.put("emrtype","0");
            paramRequest.put("emrtitle","互联网医院");
        }
        params.put("jsonInfo",paramRequest.toJSONString());
        JSONObject jsonObject = new JSONObject();
        String response = "";
        String url = entranceUrl+"returnEmrHtmlByHLW";
        logger.info("params"+params.toString());
        response = httpClientUtil.httpPost(url,params);
        logger.info("保存电子病历"+response);
        JSONObject object = JSONObject.parseObject(response);
        if(object.getInteger("status")==200){
            jsonObject = object.getJSONObject("obj");
        }
        return jsonObject;
    }
//=====================hospital应用调用entrance应用============end=================

+ 3 - 1
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -984,7 +984,9 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                "      join base_doctor b on b.id = a.doctor" +
                "      join base_patient c on c.id = a.patient" +
                " where a.register_no is NOT NULL and a.dept is not null " +
                " and a.register_date is not null " ;
                " and a.register_date is not null " +
                " and a.doctor not in ('402803816babc778016babd0dee21112')" +
                " and a.patient not in ('2c9081aa6c2f1892016c6a26a8c102ca','39686349deff487d8f3372fc253b8417') " ;
        Map<String,Object> params = new HashedMap();

+ 36 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionEmrDO.java

@ -56,6 +56,42 @@ public class WlyyPrescriptionEmrDO extends UuidIdentityEntityWithOperator {
     * 标识是否删除
     */
    private Integer del;
    /**
     *流行病史
     */
    private String popularHistory;
    /**
     *过敏史
     */
    private String allergicHistory;
    /**
     *特殊病史
     */
    private String specialHistory;
    @Column(name = "popular_history")
    public String getPopularHistory() {
        return popularHistory;
    }
    public void setPopularHistory(String popularHistory) {
        this.popularHistory = popularHistory;
    }
    @Column(name = "allergic_history")
    public String getAllergicHistory() {
        return allergicHistory;
    }
    public void setAllergicHistory(String allergicHistory) {
        this.allergicHistory = allergicHistory;
    }
    @Column(name = "special_history")
    public String getSpecialHistory() {
        return specialHistory;
    }
    public void setSpecialHistory(String specialHistory) {
        this.specialHistory = specialHistory;
    }
    @Column(name = "complaint")
    public String getComplaint() {

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

@ -413,6 +413,8 @@ public class BaseHospitalRequestMapping {
        public static final String updatePatientDiagnosis = "/updatePatientDiagnosis";
        //删除his处方信息
        public static final String delHisPrescriptionByHisNo = "/delHisPrescriptionByHisNo";
        //保存电子病历
        public static final String saveEmr = "/saveEmr";
        public static final String getJcmb="/getJcmb";
        public static final String getJymb="/getJymb";
@ -480,7 +482,7 @@ public class BaseHospitalRequestMapping {
        public static final String selectExpireTime = "/selectExpireTime";
        public static final String saveEmr="/saveEmr";
        public static final String saveEmrToEntrance="/saveEmrToEntrance";
        public static final String findEmrByPrescriptionId="/findEmrByPrescriptionId";

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/XzzxService.java

@ -37,7 +37,7 @@ public class XzzxService {
    /**
     * OAuth登陆-认证请求接口
     * @param sys
     * @param
     * @return
     */
    public String getQRCode() {

+ 21 - 7
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java

@ -2,10 +2,7 @@ package com.yihu.jw.entrance.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.hospital.prescription.WlyyInspectionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDiagnosisDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
@ -578,9 +575,9 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
    @PostMapping(value = "/deleteCheckPrescription")
    @ApiOperation(value = "合理用药作废接口", notes = "合理用药作废接口")
    public ObjEnvelop deleteCheckPrescription(@ApiParam(name = "infos", value = "药品信息", required = false)
                                            @RequestParam(value = "infos",required = false)String infos,
                                            @ApiParam(name = "patientAndDoctor", value = "医患信息", required = false)
                                            @RequestParam(value = "patientAndDoctor",required = false) String patientAndDoctor)throws Exception{
                                              @RequestParam(value = "infos",required = false)String infos,
                                              @ApiParam(name = "patientAndDoctor", value = "医患信息", required = false)
                                              @RequestParam(value = "patientAndDoctor",required = false) String patientAndDoctor)throws Exception{
        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>();
        if (StringUtils.isNotBlank(infos)){
            JSONArray jsonArray = JSONArray.parseArray(infos);
@ -592,4 +589,21 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
        JSONObject jsonObject = JSONObject.parseObject(patientAndDoctor);
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.deleteCheckPrescription(jsonObject,wlyyPrescriptionInfoDOS));
    }
    /**
     * 合理用药作废接口
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/returnEmrHtmlByHLW")
    @ApiOperation(value = "保存电子病历接口", notes = "保存电子病历接口")
    public ObjEnvelop returnEmrHtmlByHLW(@ApiParam(name = "jsonInfo", value = "医生患者信息", required = false)
                                              @RequestParam(value = "jsonInfo",required = false)String jsonInfo,
                                              @ApiParam(name = "emrInfo", value = "病历信息", required = false)
                                              @RequestParam(value = "emrInfo",required = false) String emrInfo)throws Exception{
        JSONObject jsonObject = JSONObject.parseObject(jsonInfo);
        WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO = toEntity(emrInfo,WlyyPrescriptionEmrDO.class);
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.returnEmrHtmlByHLW(jsonObject,wlyyPrescriptionEmrDO));
    }
}

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

@ -14,6 +14,8 @@ import com.yihu.jw.entity.base.area.BaseCommitteeDO;
import com.yihu.jw.entity.base.area.BaseProvinceDO;
import com.yihu.jw.entity.base.area.BaseTownDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.im.ConsultDo;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
@ -27,6 +29,8 @@ import com.yihu.jw.hospital.prescription.service.WorkTimeService;
import com.yihu.jw.hospital.prescription.service.entrance.DoctorPreSignService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.service.SystemMessage.HospitalSystemMessageService;
import com.yihu.jw.im.dao.ConsultDao;
import com.yihu.jw.im.dao.ConsultTeamDao;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.restmodel.base.area.BaseCityVO;
@ -113,6 +117,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private BaseDoctorInfoService baseDoctorInfoService;
    @Autowired
    private XzzxEntranceService xzzxEntranceService;
    @Autowired
    private ConsultDao consultDao;
    @Autowired
    private ConsultTeamDao consultTeamDao;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -682,7 +690,17 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                       @RequestParam(value = "cancelValue", required = false)String cancelValue,
                                       @ApiParam(name = "cancelRemark", value = "取消原因详细说明")
                                       @RequestParam(value = "cancelRemark", required = false)String cancelRemark) {
        
        //修改consult门诊状态
        //修改consult门诊状态
        ConsultDo consultDo = consultDao.findByRelationCode(outPatientId);
        if (null!=consultDo){
            ConsultTeamDo consultTeamDo = consultTeamDao.findByConsult(consultDo.getId());
            if (null!=consultTeamDo){
                consultTeamDo.setStatus(-1);
                consultTeamDao.save(consultTeamDo);
            }
        }
        return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,1,wxId));
    }
    
@ -2192,4 +2210,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        objEnvelop.setObj(xzzxEntranceService.deletePrescriptionToEntrance(realOrder));
        return objEnvelop;
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.saveEmrToEntrance)
    @ApiOperation(value = "保存电子病历")
    public ObjEnvelop saveEmr(
            @ApiParam(name = "prescriptionId", value = "prescriptionId")
            @RequestParam(value = "prescriptionId",defaultValue = "",required = true) String prescriptionId) throws Exception {
        ObjEnvelop objEnvelop = new ObjEnvelop();
        objEnvelop.setObj(xzzxEntranceService.saveEmrToEntrance(prescriptionId));
        return objEnvelop;
    }
}

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -244,7 +244,7 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
				patientBusinessDO.setCollection(0);
				patientBusinessDO.setDel(1);
				patientBusinessDO = patientBusinessDao.save(patientBusinessDO);
				if (patientBusinessDO.getRelationType()==1){
					if (patientBusinessDO.getRelationType()==1){
					KnowledgeArticleDO knowledgeArticleDO = knowledgeArticleDao.findByIdAndDel(patientBusinessDO.getRelationCode());
					System.out.println("content:"+JSON.toJSONString(knowledgeArticleDO));
					JSONObject object = new JSONObject();
@ -252,7 +252,7 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
					object.put("title",knowledgeArticleDO.getTitle());
					object.put("content",knowledgeArticleDO.getIntro());
					object.put("img",knowledgeArticleDO.getImage());
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "17", object.toJSONString(),"1",null);
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "4", object.toJSONString(),"1",null);
				}else {
					WlyySurveyUserDO wlyySurveyUserDO = new WlyySurveyUserDO();
					String doctor = patientBusinessDO.getDoctor();