Пример #1
0
		private void FormEvaluationEdit_Load(object sender,EventArgs e) {
			//This window fills all necessary data on load. This eliminates the need for multiple calls to the database.
			textDate.Text=_evalCur.DateEval.ToShortDateString();
			textTitle.Text=_evalCur.EvalTitle;
			_evalGradeScale=GradingScales.GetOne(_evalCur.GradingScaleNum);
			_listEvalGradeItems=GradingScaleItems.Refresh(_evalCur.GradingScaleNum);
			textGradeScaleName.Text=_evalGradeScale.Description;
			_provInstructor=Providers.GetProv(_evalCur.InstructNum);
			textInstructor.Text=_provInstructor.GetLongDesc();
			_provStudent=Providers.GetProv(_evalCur.StudentNum);
			if(_provStudent!=null) {
				textStudent.Text=_provStudent.GetLongDesc();
			}
			textCourse.Text=SchoolCourses.GetDescript(_evalCur.SchoolCourseNum);
			textGradeNumberOverride.Text=_evalCur.OverallGradeNumber.ToString();
			textGradeShowingOverride.Text=_evalCur.OverallGradeShowing;
			_listEvalCrits=EvaluationCriterions.Refresh(_evalCur.EvaluationNum);
			for(int i=0;i<_listEvalCrits.Count;i++) {
				if(_listEvalCrits[i].IsCategoryName) {
					continue;
				}
				GradingScale critGradeScale=GradingScales.GetOne(_listEvalCrits[i].GradingScaleNum);
				if(!_critGradeScales.ContainsKey(critGradeScale.GradingScaleNum)) {
					_critGradeScales.Add(critGradeScale.GradingScaleNum,critGradeScale);
				}
				if(!_critGradeItems.ContainsKey(critGradeScale.GradingScaleNum)) {
					_critGradeItems.Add(critGradeScale.GradingScaleNum,GradingScaleItems.Refresh(critGradeScale.GradingScaleNum));
				}
			}
			FillGridCriterion();
			RecalculateGrades();
			//Since there is no override column in the database, we check for equality of the calculated grade and the grade on the evaluation.
			//If they are different then the grade was overwritten at some point.
			if(textGradeNumber.Text==textGradeNumberOverride.Text) {
				textGradeNumberOverride.Text="";
			}
			if(textGradeShowing.Text==textGradeShowingOverride.Text) {
				textGradeShowingOverride.Text="";
			}
		}
Пример #2
0
		private void FormEHR_Shown(object sender,EventArgs e) {
			ResultOnClosing=EhrFormResult.None;
			PatCur=Patients.GetPat(PatNum);
			ProvPat=Providers.GetProv(PatCur.PriProv);
			labelProvPat.Text=ProvPat.GetLongDesc();
			if(ProvPat.EhrKey=="") {
				labelProvPat.Text+=" (no ehr provider key entered)";
			}
			if(Security.CurUser.ProvNum==0) {
				labelProvUser.Text="none";
			}
			else {
				Provider provUser=Providers.GetProv(Security.CurUser.ProvNum);
				labelProvUser.Text=Providers.GetLongDesc(provUser.ProvNum);
				if(provUser.EhrKey=="") {
					labelProvUser.Text+=" (no ehr provider key entered)";
				}
			}
			FillGridMu();
			if(OnShowLaunchOrders) {
				//LaunchOrdersWindow();
				OnShowLaunchOrders=false;
			}
			if(ProvPat.EhrKey=="") {
				MessageBox.Show("No ehr provider key entered for this patient's primary provider.");
			}
		}
Пример #3
0
		private void FormEHR_Shown(object sender,EventArgs e) {
			ResultOnClosing=EhrFormResult.None;
			PatCur=Patients.GetPat(PatNum);
			ProvPat=Providers.GetProv(PatCur.PriProv);
			labelProvPat.Text=ProvPat.GetLongDesc();
			if(EhrProvKeys.GetKeysByFLName(ProvPat.LName,ProvPat.FName).Count==0) {
				labelProvPat.Text+=" (no ehr provider key entered)";
			}
			if(Security.CurUser.ProvNum==0) {
				labelProvUser.Text="none";
			}
			else {
				Provider provUser=Providers.GetProv(Security.CurUser.ProvNum);
				labelProvUser.Text=Providers.GetLongDesc(provUser.ProvNum);
				if(EhrProvKeys.GetKeysByFLName(provUser.LName,provUser.FName).Count==0) {
					labelProvUser.Text+=" (no ehr provider key entered)";
				}
			}
			FillGridMu();
			if(OnShowLaunchOrders) {
				//LaunchOrdersWindow();
				OnShowLaunchOrders=false;
			}
			//We already indicate that the patient's provider does not have an ehr key entered in labelProvPat.  No need for a popup.
			//This is so that non-ehr providers can still use many of our ehr features.  E.g. vital signs.
			//if(ProvPat.EhrKey=="") {
			//	MessageBox.Show("No ehr provider key entered for this patient's primary provider.");
			//}
		}
Пример #4
0
		private void butStudentPicker_Click(object sender,EventArgs e) {
			FormProviderPick FormPP=new FormProviderPick();
			FormPP.IsStudentPicker=true;
			FormPP.ShowDialog();
			if(FormPP.DialogResult==DialogResult.OK) {
				_provStudent=Providers.GetProv(FormPP.SelectedProvNum);
				_evalCur.StudentNum=_provStudent.ProvNum;
				textStudent.Text=_provStudent.GetLongDesc();
			}
		}