當前位置: 首頁>>代碼示例>>C#>>正文


C# Patient.GetType方法代碼示例

本文整理匯總了C#中OpenDentBusiness.Patient.GetType方法的典型用法代碼示例。如果您正苦於以下問題:C# Patient.GetType方法的具體用法?C# Patient.GetType怎麽用?C# Patient.GetType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenDentBusiness.Patient的用法示例。


在下文中一共展示了Patient.GetType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CreatePatient

 /// <summary>
 /// </summary>
 private Patient CreatePatient(String LastName,String FirstName,DateTime birthDate,WebSheets.SheetAndSheetField sAnds)
 {
     Patient newPat=new Patient();
     newPat.LName=LastName;
     newPat.FName=FirstName;
     newPat.Birthdate=birthDate;
     newPat.ClinicNum=Security.CurUser.ClinicNum;
     Type t=newPat.GetType();
     FieldInfo[] fi=t.GetFields();
     foreach(FieldInfo field in fi) {
         // find match for fields in Patients in the web_sheetfieldlist
         var WebSheetFieldList=sAnds.web_sheetfieldlist.Where(sf=>sf.FieldName.ToLower()==field.Name.ToLower());
         if(WebSheetFieldList.Count()>0) {
             // this loop is used to fill a field that may generate mutiple values for a single field in the patient.
             //for example the field gender has 2 eqivalent sheet fields in the web_sheetfieldlist
             for(int i=0;i<WebSheetFieldList.Count();i++) {
                 WebSheets.webforms_sheetfield sf=WebSheetFieldList.ElementAt(i);
                 String SheetWebFieldValue=sf.FieldValue;
                 String RadioButtonValue=sf.RadioButtonValue;
                 FillPatientFields(newPat,field,SheetWebFieldValue,RadioButtonValue);
             }
         }
     }
     try{
         Patients.Insert(newPat,false);
         //set Guarantor field the same as PatNum
         Patient patOld=newPat.Copy();
         newPat.Guarantor=newPat.PatNum;
         Patients.Update(newPat,patOld);
     }
     catch(Exception e) {
         gridMain.EndUpdate();
         MessageBox.Show(e.Message);
     }
     return newPat;
 }
開發者ID:nampn,項目名稱:ODental,代碼行數:38,代碼來源:FormWebForms.cs

示例2: CreatePatient

		/// <summary>
		/// </summary>
		private Patient CreatePatient(String LastName,String FirstName,DateTime birthDate,WebSheets.SheetAndSheetField sAnds) {
			Patient newPat=new Patient();
			newPat.LName=LastName;
			newPat.FName=FirstName;
			newPat.Birthdate=birthDate;
			newPat.ClinicNum=Security.CurUser.ClinicNum;
			Type t=newPat.GetType();
			FieldInfo[] fi=t.GetFields();
			foreach(FieldInfo field in fi) {
				// find match for fields in Patients in the web_sheetfieldlist
				var WebSheetFieldList=sAnds.web_sheetfieldlist.Where(sf=>sf.FieldName.ToLower()==field.Name.ToLower());
				if(WebSheetFieldList.Count()>0) {
					// this loop is used to fill a field that may generate mutiple values for a single field in the patient.
					//for example the field gender has 2 eqivalent sheet fields in the web_sheetfieldlist
					for(int i=0;i<WebSheetFieldList.Count();i++) {
						WebSheets.webforms_sheetfield sf=WebSheetFieldList.ElementAt(i);
						String SheetWebFieldValue=sf.FieldValue;
						String RadioButtonValue=sf.RadioButtonValue;
						FillPatientFields(newPat,field,SheetWebFieldValue,RadioButtonValue);
					}
				}
			}
			try{
				Patients.Insert(newPat,false);
				//set Guarantor field the same as PatNum
				Patient patOld=newPat.Copy();
				newPat.Guarantor=newPat.PatNum;
				Patients.Update(newPat,patOld);
				//If there is an existing HL7 def enabled, send an ADT message if there is an outbound ADT message defined
				if(HL7Defs.IsExistingHL7Enabled()) {
					MessageHL7 messageHL7=MessageConstructor.GenerateADT(newPat,newPat,EventTypeHL7.A04);//patient is guarantor
					//Will be null if there is no outbound ADT message defined, so do nothing
					if(messageHL7!=null) {
						HL7Msg hl7Msg=new HL7Msg();
						hl7Msg.AptNum=0;
						hl7Msg.HL7Status=HL7MessageStatus.OutPending;//it will be marked outSent by the HL7 service.
						hl7Msg.MsgText=messageHL7.ToString();
						hl7Msg.PatNum=newPat.PatNum;
						HL7Msgs.Insert(hl7Msg);
#if DEBUG
						MessageBox.Show(this,messageHL7.ToString());
#endif
					}
				}
			}
			catch(Exception e) {
				gridMain.EndUpdate();
				MessageBox.Show(e.Message);
			}
			return newPat;
		}
開發者ID:mnisl,項目名稱:OD,代碼行數:53,代碼來源:FormWebForms.cs


注:本文中的OpenDentBusiness.Patient.GetType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。