Browse Source

协同门诊

Trick 5 years ago
parent
commit
0b7908a5c2

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

@ -29,7 +29,6 @@ public class SystemMessageService extends BaseJpaService<SystemMessageDO,SystemM
     * @throws Exception
     */
    public SystemMessageDO addMessage(SystemMessageDO systemMessageDO) throws Exception{
        systemMessageDO.setHandleState("0");
        systemMessageDO.setIsRead("0");
        systemMessageDO.setDel("1");
        systemMessageDO.setCreateTime((new Date()));
@ -63,7 +62,6 @@ public class SystemMessageService extends BaseJpaService<SystemMessageDO,SystemM
     * @throws Exception
     */
    public void saveMessage(SystemMessageDO systemMessageDO) throws Exception{
        systemMessageDO.setHandleState("0");
        systemMessageDO.setIsRead("0");
        systemMessageDO.setDel("1");
        systemMessageDO.setCreateTime(new Date());

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

@ -20,6 +20,7 @@ import com.yihu.jw.entity.hospital.doctor.WlyyDoctorWorkTimeDO;
import com.yihu.jw.entity.hospital.doctor.WlyyPatientRegisterTimeDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.file_upload.FileUploadService;
@ -32,6 +33,7 @@ import com.yihu.jw.hospital.doctor.dao.WlyyDoctorOnlineTimeDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.service.DoctorMappingService;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.message.service.SystemMessageService;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.org.dao.BaseOrgDao;
@ -147,8 +149,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private WlyyHttpService wlyyHttpService;
    
    private SystemMessageService systemMessageService;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -711,6 +713,38 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                prescriptionDao.save(wlyyPrescriptionDO);
            }
            //发送取药系统消息
            sendPatientGetDrugMes(outpatientDO,wlyyPrescriptionDO);
        }
        return true;
    }
    public Boolean sendPatientGetDrugMes(WlyyOutpatientDO outpatient,WlyyPrescriptionDO prescriptionDO){
        try{
            SystemMessageDO systemMessageDO = new SystemMessageDO();
            systemMessageDO.setTitle("患者取药");
            systemMessageDO.setType("7");
            systemMessageDO.setReceiver(outpatient.getDoctor());
            systemMessageDO.setReceiverName(outpatient.getDoctorName());
            systemMessageDO.setRelationCode(outpatient.getId());
            systemMessageDO.setSender(outpatient.getPatient());
            systemMessageDO.setSenderName(outpatient.getPatientName());
            systemMessageDO.setRelationCode(outpatient.getId());
            JSONObject data = new JSONObject();
            data.put("name",outpatient.getPatientName());
            data.put("age",IdCardUtil.getAgeForIdcard(outpatient.getIdcard()));
            data.put("gender",IdCardUtil.getSexForIdcard_new(outpatient.getIdcard()));
            data.put("recipeType",prescriptionDO.getDispensaryType());
            data.put("message","患者已完成取药");
            systemMessageDO.setData(data.toString());
            systemMessageService.saveMessage(systemMessageDO);
        }catch (Exception e){
            logger.error("sendPatientGetDrugMes :"+e.toString());
            return false;
        }
        return true;
    }
@ -3452,9 +3486,56 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //3.创建候诊室
        createRoom(outpatient,chargeType);
        //4.发送协同门诊系统消息
        sendOutPatientMes(outpatient);
        return outpatient;
    }
    /**
     * 发送新增门诊信息
     * @param outpatient
     * @return
     */
    public Boolean sendOutPatientMes(WlyyOutpatientDO outpatient){
        try{
            SystemMessageDO systemMessageDO = new SystemMessageDO();
            //1.在线复诊2.协同门诊
            if("2".equals(outpatient.getOutpatientType())){
                systemMessageDO.setTitle("协同门诊");
                systemMessageDO.setType("3");
            }else{
                //1.图文 2.视频
                if("1".equals(outpatient.getType())){
                    systemMessageDO.setTitle("图文复诊");
                    systemMessageDO.setType("1");
                }else {
                    systemMessageDO.setTitle("视频复诊");
                    systemMessageDO.setType("2");
                }
            }
            systemMessageDO.setReceiver(outpatient.getDoctor());
            systemMessageDO.setReceiverName(outpatient.getDoctorName());
            systemMessageDO.setRelationCode(outpatient.getId());
            systemMessageDO.setSender(outpatient.getPatient());
            systemMessageDO.setSenderName(outpatient.getPatientName());
            systemMessageDO.setRelationCode(outpatient.getId());
            JSONObject data = new JSONObject();
            data.put("name",outpatient.getPatientName());
            data.put("age",IdCardUtil.getAgeForIdcard(outpatient.getIdcard()));
            data.put("gender",IdCardUtil.getSexForIdcard_new(outpatient.getIdcard()));
            data.put("question",outpatient.getDescription());
            systemMessageDO.setData(data.toString());
            systemMessageService.saveMessage(systemMessageDO);
        }catch (Exception e){
            logger.error("sendOutPatientMes :"+e.toString());
            return false;
        }
        return true;
    }
    /**
     * 指定门诊医生医生
     * @param outpatientJson

+ 0 - 12
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/message/SystemMessageDO.java

@ -53,10 +53,6 @@ public class SystemMessageDO extends UuidIdentityEntity {
     *是否已读
     */
    private String isRead;
    /**
     *业务处理状态
     */
    private String handleState;
    /**
     *是否删除
     */
@ -144,14 +140,6 @@ public class SystemMessageDO extends UuidIdentityEntity {
        this.isRead = isRead;
    }
    @Column(name = "handle_state")
    public String getHandleState() {
        return handleState;
    }
    public void setHandleState(String handleState) {
        this.handleState = handleState;
    }
    @Column(name = "del")
    public String getDel() {
        return del;

+ 1 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -236,7 +236,7 @@ public class BasicZuulFilter extends ZuulFilter {
     */
    private  boolean checkFile(String fileName){
        boolean flag=true;
        String suffixList="xls,xlsx,jpg,gif,png,ico,bmp,jpeg,rm,rmvb,mov,wmv,avi,mp3,wav,ogg";
        String suffixList="xls,xlsx,jpg,gif,png,ico,bmp,jpeg,rm,rmvb,mov,wmv,avi,mp3,wav,ogg,mp4";
        //获取文件后缀
        String suffix=fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());

+ 0 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/message/SystemMessageController.java

@ -88,10 +88,6 @@ public class SystemMessageController extends EnvelopRestEndpoint {
        List<SystemMessageDO> list  = systemMessageService.search(fields,filters,sorts,page,pageSize);
        int count = (int) systemMessageService.getCount(filters);
        return success(list, count, page, pageSize, SystemMessageDO.class);
        }catch (Exception e){
            return failed("获取失败,"+e.getMessage());
        }
    }

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

@ -768,7 +768,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientListBySscOrIdCard)
    @ApiOperation(value = "获取居民信息")
    @ApiOperation(value = "获取居民身份证信息")
    public Envelop findPatientListBySscOrIdCard(@ApiParam(name = "idcard", value = "idcard")
                                                @RequestParam(value = "idcard",required = false) String idcard,
                                                @ApiParam(name = "ssc", value = "社保卡")