Browse Source

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

huangwenjie 5 years ago
parent
commit
842d1870ba

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

@ -1849,8 +1849,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return rs;
    }
    public Map<String,Object> cancelOutPatient(String outPatientId,String cancelType,String cancelValue,String cancelRemark){
    
    /**
     * 居民取消复诊或者医生拒绝接诊
     * @param outPatientId
     * @param cancelType
     * @param cancelValue
     * @param cancelRemark
     * @param operator 1居民 2医生
     * @return
     */
    public Map<String,Object> cancelOutPatient(String outPatientId,String cancelType,String cancelValue,String cancelRemark,Integer operator){
        Map<String,Object> rs = new HashedMap();
        //判断医生是否接诊
@ -1871,9 +1880,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //更改门诊状态
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outPatientId);
        wlyyOutpatientDO.setStatus("-1");
        wlyyOutpatientDO.setPatientCancelRemark(cancelRemark);
        wlyyOutpatientDO.setPatientCancelType(cancelType);
        wlyyOutpatientDO.setPatientCancelValue(cancelValue);
        if (1 == operator){
            //居民取消
            wlyyOutpatientDO.setPatientCancelRemark(cancelRemark);
            wlyyOutpatientDO.setPatientCancelType(cancelType);
            wlyyOutpatientDO.setPatientCancelValue(cancelValue);
        }else{
            //医生拒绝接诊
            wlyyOutpatientDO.setDoctorCancelRemark(cancelRemark);
            wlyyOutpatientDO.setDoctorCancelType(cancelType);
            wlyyOutpatientDO.setDoctorCancelValue(cancelValue);
        }
        outpatientDao.save(wlyyOutpatientDO);
        //删除门诊号源
@ -2332,7 +2350,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    
    /**
     * 获取常见疾病和热门部门字典
     * 获取常见疾病、热门部门、医生拒绝接诊原因 字典
     * @param dictName 字典名称
     * @return
     */
@ -3339,4 +3357,40 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        
        return object;
    }
	
	public Map<String,Object> refuseOutpatientByDoctor(String outPatientId, String cancelType, String cancelValue, String cancelRemark) {
        Map<String,Object> rs = new HashedMap();
        //判断医生是否接诊
        List<WlyyHospitalWaitingRoomDO> roomDOs =hospitalWaitingRoomDao.findByOutpatientId(outPatientId);
        if(roomDOs!=null&&roomDOs.size()>0){
            for(WlyyHospitalWaitingRoomDO roomDO:roomDOs){
                if(roomDO.getVisitStatus()==2){
                    rs.put("code",-1);
                    rs.put("mes","医生已经接诊,无法取消");
                    return rs;
                }else{
                    roomDO.setVisitStatus(-1);
                    hospitalWaitingRoomDao.save(roomDO);
                }
            }
        }
        
        //更改门诊状态
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outPatientId);
        wlyyOutpatientDO.setStatus("-1");
        wlyyOutpatientDO.setDoctorCancelRemark(cancelRemark);
        wlyyOutpatientDO.setDoctorCancelType(cancelType);
        wlyyOutpatientDO.setDoctorCancelValue(cancelValue);
        outpatientDao.save(wlyyOutpatientDO);
        
        //删除门诊号源
        List<WlyyPatientRegisterTimeDO> list = patientRegisterTimeDao.findByOutpatientId(wlyyOutpatientDO.getId());
        if(list!=null&&list.size()>0){
            patientRegisterTimeDao.delete(list);
        }
        
        rs.put("code",1);
        rs.put("mes","取消成功");
        return  rs;
	}
}

+ 40 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java

@ -184,6 +184,22 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
     * 患者取消类型详细说明
     */
    private String patientCancelRemark;
    
    
    /**
     * 医生取消类型
     */
    private String doctorCancelType;
    
    /**
     * 医生取消类型名称
     */
    private String doctorCancelValue;
    
    /**
     * 医生取消类型详细说明
     */
    private String doctorCancelRemark;
    /**
     * 预约时间
@ -508,4 +524,28 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    public void setEvaluateStatus(String evaluateStatus) {
        this.evaluateStatus = evaluateStatus;
    }
    
    public String getDoctorCancelType() {
        return doctorCancelType;
    }
    
    public void setDoctorCancelType(String doctorCancelType) {
        this.doctorCancelType = doctorCancelType;
    }
    
    public String getDoctorCancelValue() {
        return doctorCancelValue;
    }
    
    public void setDoctorCancelValue(String doctorCancelValue) {
        this.doctorCancelValue = doctorCancelValue;
    }
    
    public String getDoctorCancelRemark() {
        return doctorCancelRemark;
    }
    
    public void setDoctorCancelRemark(String doctorCancelRemark) {
        this.doctorCancelRemark = doctorCancelRemark;
    }
}

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

@ -80,7 +80,7 @@ public class BaseHospitalRequestMapping {
        public static final String findDoctorByHospitalAndDiseaseAndDept = "/findDoctorByHospitalAndDiseaseAndDept";
    
        /**
         * 获取常见疾病和热门部门字典
         * 获取常见疾病、热门部门、医生拒绝接诊原因 字典
         */
        public static final String findHotDeptAndDiseaseDict = "/findHotDeptAndDiseaseDict";
@ -396,6 +396,9 @@ public class BaseHospitalRequestMapping {
    
        //查询医生所有可抢单的数量
        public static final String findWaitingRoomOutpatientNumberByDoctor = "findWaitingRoomOutpatientNumberByDoctor";
        
        //专科医生拒绝接诊
        public static final String refuseOutpatientByDoctor = "refuseOutpatientByDoctor";
    }
    /**

+ 16 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -11,6 +11,7 @@ import com.yihu.jw.im.service.ImService;
import com.yihu.jw.restmodel.im.ConsultVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
@ -397,4 +398,19 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	}
	
	
	@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.refuseOutpatientByDoctor)
	@ApiOperation(value = "拒绝接诊", notes = "拒绝接诊")
	public ObjEnvelop refuseOutpatientByDoctor(@ApiParam(name = "outPatientId", value = "门诊记录")
	                                   @RequestParam(value = "outPatientId", required = false)String outPatientId,
	                                   @ApiParam(name = "cancelType", value = "取消原因类型")
	                                   @RequestParam(value = "cancelType", required = false)String cancelType,
	                                   @ApiParam(name = "cancelValue", value = "取消原因名称")
	                                   @RequestParam(value = "cancelValue", required = false)String cancelValue,
	                                   @ApiParam(name = "cancelRemark", value = "取消原因详细说明")
	                                   @RequestParam(value = "cancelRemark", required = false)String cancelRemark) {
		
		return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,2));
	}
	
	
}

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -225,7 +225,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.Prescription.findHotDeptAndDiseaseDict)
	@ApiOperation(value = "获取常见疾病和热门部门字典", notes = "获取常见疾病和热门部门字典")
	@ApiOperation(value = "获取常见疾病、热门部门、医生拒绝接诊原因 字典", notes = "获取常见疾病、热门部门、医生拒绝接诊原因 字典")
	public ListEnvelop findHotDeptAndDiseaseDict(@ApiParam(name = "dictName", value = "dictName")
	                                             @RequestParam(value = "dictName", required = true,defaultValue = "ONLINE_HOSPITAL_DEPT_350211A1002")String dictName)throws Exception{
		return success(prescriptionService.findHotDeptAndDiseaseDict(dictName));

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

@ -415,7 +415,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                       @ApiParam(name = "cancelRemark", value = "取消原因详细说明")
                                       @RequestParam(value = "cancelRemark", required = false)String cancelRemark) {
        return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark));
        return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,1));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findCancelReasonList)