| 
					
				 | 
			
			
				@ -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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |