/// <summary> /// 切换当前病人窗口中显示的活动病人 /// </summary> /// <param name="patVisit">新的病人信息</param> /// <returns>是否成功</returns> public bool SwitchPatient(PatVisitInfo patVisit) { if (patVisit != null && patVisit.IsPatVisitSame(this.m_patientVisit)) { return(true); } SystemParam.Instance.PatVisitInfo = patVisit; PatientInfoChangingEventArgs e = new PatientInfoChangingEventArgs(this.m_patientVisit, patVisit); this.OnPatientInfoChanging(e); if (e.Cancel) { return(false); } //仅第1次加载病人时加载各子窗口 if (this.m_patientVisit == null) { this.LoadContentModules(); this.m_patientVisit = new PatVisitInfo(); } if (patVisit == null) { patVisit = new PatVisitInfo(); } this.m_patientVisit = patVisit; this.OnPatientInfoChanged(EventArgs.Empty); return(true); }
internal virtual void OnPatientInfoChanging(PatientInfoChangingEventArgs e) { if (this.PatientInfoChanging == null) { return; } try { this.PatientInfoChanging(this, e); } catch (Exception ex) { LogManager.Instance.WriteLog("PatientPageControl.OnPatientInfoChanging", ex); } }