예제 #1
0
		private void fillContext() {
			//Fill Patient-------------------------------------------------------------------------------------------------------------------
			if(PatCur!=null) {
				textPatName.Text=PatCur.GetNameFL();
				if(PatCur.Birthdate!=DateTime.MinValue) {
					textPatBirth.Text=PatCur.Birthdate.ToShortDateString();
				}
				comboPatLang.SelectedIndex=comboPatLang.Items.IndexOf(System.Globalization.CultureInfo.CurrentCulture.DisplayName);
				switch(PatCur.Gender) {
					case PatientGender.Female:
						radioPatGenFem.Checked=true;
						break;
					case PatientGender.Male:
						radioPatGenMale.Checked=true;
						break;
					case PatientGender.Unknown:
					default:
						radioPatGenUn.Checked=true;
						break;
				}
			}
			//Fill Provider------------------------------------------------------------------------------------------------------------------
			if(ProvCur==null && PatCur!=null) {
				ProvCur=Providers.GetProv(PatCur.PriProv);
			}
			if(ProvCur==null) {
				ProvCur=Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv));
			}
			if(ProvCur!=null) {
				textProvName.Text=ProvCur.GetFormalName();
				textProvID.Text=ProvCur.NationalProvID;
				comboProvLang.SelectedIndex=comboPatLang.Items.IndexOf(System.Globalization.CultureInfo.CurrentCulture.DisplayName);
			}
			//Fill Organization--------------------------------------------------------------------------------------------------------------
			textOrgName.Text=PrefC.GetString(PrefName.PracticeTitle);
			//Fill Encounter-----------------------------------------------------------------------------------------------------------------
			ActEC=ActEncounterCode.AMB;
			comboEncType.SelectedIndex=(int)ActEC;//ambulatory
			if(PatCur!=null) {
				textEncLocID.Text=PatCur.ClinicNum.ToString();//do not use to generate message if this value is zero.
			}
			//Fill Requestor/Recievor--------------------------------------------------------------------------------------------------------
			radioReqProv.Checked=PerformerIsProvider;
			radioReqPat.Checked=!PerformerIsProvider;
			radioRecProv.Checked=RecipientIsProvider;
			radioRecPat.Checked=!RecipientIsProvider;
			//Fill Task Type-----------------------------------------------------------------------------------------------------------------
			ActTC=ActTaskCode.PATINFO;//may need to change this later.
			comboTask.SelectedIndex=(int)ActTC;
		}
예제 #2
0
		private void comboTask_SelectedIndexChanged(object sender,EventArgs e) {
			ActTC=(ActTaskCode)comboTask.SelectedIndex;
		}