本文整理汇总了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;
}
示例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;
}