当前位置: 首页>>代码示例>>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;未经允许,请勿转载。