本文整理汇总了C#中OpenDentBusiness.Patient.GetNameFirstOrPrefL方法的典型用法代码示例。如果您正苦于以下问题:C# Patient.GetNameFirstOrPrefL方法的具体用法?C# Patient.GetNameFirstOrPrefL怎么用?C# Patient.GetNameFirstOrPrefL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenDentBusiness.Patient
的用法示例。
在下文中一共展示了Patient.GetNameFirstOrPrefL方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetConfirmList
///<summary>Used in FormConfirmList</summary>
public static DataTable GetConfirmList(DateTime dateFrom,DateTime dateTo,long provNum,long clinicNum)
{
if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
return Meth.GetTable(MethodBase.GetCurrentMethod(),dateFrom,dateTo,provNum,clinicNum);
}
DataTable table=new DataTable();
DataRow row;
//columns that start with lowercase are altered for display rather than being raw data.
table.Columns.Add("AddrNote");
table.Columns.Add("AptNum");
table.Columns.Add("age");
table.Columns.Add("AptDateTime",typeof(DateTime));
table.Columns.Add("aptDateTime");
table.Columns.Add("confirmed");
table.Columns.Add("contactMethod");
table.Columns.Add("email");//could be patient or guarantor email.
table.Columns.Add("Guarantor");
table.Columns.Add("medNotes");
table.Columns.Add("nameF");//or preferred.
table.Columns.Add("nameFL");
table.Columns.Add("Note");
table.Columns.Add("patientName");
table.Columns.Add("PatNum");
table.Columns.Add("PreferConfirmMethod");
table.Columns.Add("ProcDescript");
List<DataRow> rows=new List<DataRow>();
string command="SELECT patient.PatNum,"
+"patient.LName,"
+"patient.FName,patient.Preferred,patient.LName, "
+"patient.Guarantor,AptDateTime,patient.Birthdate,patient.HmPhone,"
+"patient.WkPhone,patient.WirelessPhone,ProcDescript,Confirmed,Note,"
+"patient.AddrNote,AptNum,patient.MedUrgNote,patient.PreferConfirmMethod,"
+"guar.Email guarEmail,patient.Email,patient.Premed "
+"FROM patient,appointment,patient guar "
+"WHERE patient.PatNum=appointment.PatNum "
+"AND patient.Guarantor=guar.PatNum "
+"AND AptDateTime > "+POut.Date(dateFrom)+" "
+"AND AptDateTime < "+POut.Date(dateTo.AddDays(1))+" "
+"AND (AptStatus=1 "//scheduled
+"OR AptStatus=4) ";//ASAP
if(provNum>0){
command+="AND (appointment.ProvNum="+POut.Long(provNum)+" OR appointment.ProvHyg="+POut.Long(provNum)+") ";
}
if(clinicNum>0) {
command+="AND appointment.ClinicNum="+POut.Long(clinicNum)+" ";
}
command+="ORDER BY AptDateTime";
DataTable rawtable=Db.GetTable(command);
DateTime dateT;
Patient pat;
ContactMethod contmeth;
for(int i=0;i<rawtable.Rows.Count;i++) {
row=table.NewRow();
row["AddrNote"]=rawtable.Rows[i]["AddrNote"].ToString();
row["AptNum"]=rawtable.Rows[i]["AptNum"].ToString();
row["age"]=Patients.DateToAge(PIn.Date(rawtable.Rows[i]["Birthdate"].ToString())).ToString();//we don't care about m/y.
dateT=PIn.DateT(rawtable.Rows[i]["AptDateTime"].ToString());
row["AptDateTime"]=dateT;
row["aptDateTime"]=dateT.ToShortDateString()+"\r\n"+dateT.ToShortTimeString();
row["confirmed"]=DefC.GetName(DefCat.ApptConfirmed,PIn.Long(rawtable.Rows[i]["Confirmed"].ToString()));
contmeth=(ContactMethod)PIn.Int(rawtable.Rows[i]["PreferConfirmMethod"].ToString());
if(contmeth==ContactMethod.None || contmeth==ContactMethod.HmPhone) {
row["contactMethod"]=Lans.g("FormConfirmList","Hm:")+rawtable.Rows[i]["HmPhone"].ToString();
}
if(contmeth==ContactMethod.WkPhone) {
row["contactMethod"]=Lans.g("FormConfirmList","Wk:")+rawtable.Rows[i]["WkPhone"].ToString();
}
if(contmeth==ContactMethod.WirelessPh) {
row["contactMethod"]=Lans.g("FormConfirmList","Cell:")+rawtable.Rows[i]["WirelessPhone"].ToString();
}
if(contmeth==ContactMethod.Email) {
row["contactMethod"]=rawtable.Rows[i]["Email"].ToString();
}
if(contmeth==ContactMethod.DoNotCall || contmeth==ContactMethod.SeeNotes) {
row["contactMethod"]=Lans.g("enumContactMethod",contmeth.ToString());
}
if(rawtable.Rows[i]["Email"].ToString()=="" && rawtable.Rows[i]["guarEmail"].ToString()!="") {
row["email"]=rawtable.Rows[i]["guarEmail"].ToString();
}
else {
row["email"]=rawtable.Rows[i]["Email"].ToString();
}
row["Guarantor"]=rawtable.Rows[i]["Guarantor"].ToString();
row["medNotes"]="";
if(rawtable.Rows[i]["Premed"].ToString()=="1"){
row["medNotes"]=Lans.g("FormConfirmList","Premedicate");
}
if(rawtable.Rows[i]["MedUrgNote"].ToString()!=""){
if(row["medNotes"].ToString()!="") {
row["medNotes"]+="\r\n";
}
row["medNotes"]+=rawtable.Rows[i]["MedUrgNote"].ToString();
}
pat=new Patient();
pat.LName=rawtable.Rows[i]["LName"].ToString();
pat.FName=rawtable.Rows[i]["FName"].ToString();
pat.Preferred=rawtable.Rows[i]["Preferred"].ToString();
row["nameF"]=pat.GetNameFirstOrPreferred();
row["nameFL"]=pat.GetNameFirstOrPrefL();
//.........这里部分代码省略.........
示例2: FillFieldsForLabelAppointment
private static void FillFieldsForLabelAppointment(Sheet sheet,Appointment appt,Patient pat)
{
foreach(SheetField field in sheet.SheetFields) {
switch(field.FieldName) {
case "nameFL":
field.FieldValue=pat.GetNameFirstOrPrefL();
break;
case "nameLF":
field.FieldValue=pat.GetNameLF();
break;
case "weekdayDateTime":
field.FieldValue=appt.AptDateTime.ToString("ddd")+" "
+appt.AptDateTime.ToShortDateString()+" "
+appt.AptDateTime.ToShortTimeString();// h:mm tt");
break;
case "length":
int minutesTotal=appt.Pattern.Length*5;
int hours=minutesTotal/60;//automatically rounds down
int minutes=minutesTotal-hours*60;
field.FieldValue="";
if(hours>0){
field.FieldValue=hours.ToString()+" hours, ";
}
field.FieldValue+=minutes.ToString()+" min";
break;
}
}
}
示例3: GetConfirmList
//.........这里部分代码省略.........
}
else if(!showRecall && !showNonRecall && showHygPresched) {//Show hygiene prescheduled only (the All option was not selected)
//Example: LogDateTime="2014-11-26 13:00". Filter is 11-26, giving "2014-11-27 00:00" to compare against. This captures all times for 11-26.
string aptDateSql="";
if(DataConnection.DBtype==DatabaseType.MySql) {
aptDateSql="DATE(appointment.AptDateTime-INTERVAL 2 MONTH)";
}
else {
aptDateSql="ADD_MONTHS(TO_CHAR(appointment.AptDateTime,'MM/DD/YYYY %HH24:%MI:%SS'),-2)";
}
command+="AND (securitylog.PatNum IS NULL OR securitylog.LogDateTime < "+aptDateSql+") ";
}
command+="ORDER BY AptDateTime";
DataTable rawtable=Db.GetTable(command);
DateTime dateT;
DateTime timeAskedToArrive;
Patient pat;
ContactMethod contmeth;
for(int i=0;i<rawtable.Rows.Count;i++) {
row=table.NewRow();
row["AddrNote"]=rawtable.Rows[i]["AddrNote"].ToString();
row["AptNum"]=rawtable.Rows[i]["AptNum"].ToString();
row["age"]=Patients.DateToAge(PIn.Date(rawtable.Rows[i]["Birthdate"].ToString())).ToString();//we don't care about m/y.
dateT=PIn.DateT(rawtable.Rows[i]["AptDateTime"].ToString());
timeAskedToArrive=PIn.DateT(rawtable.Rows[i]["DateTimeAskedToArrive"].ToString());
if(timeAskedToArrive.Year>1880) {
dateT=timeAskedToArrive;
}
row["AptDateTime"]=dateT;
row["aptDateTime"]=dateT.ToShortDateString()+"\r\n"+dateT.ToShortTimeString();
row["ClinicNum"]=rawtable.Rows[i]["ClinicNum"].ToString();
row["confirmed"]=DefC.GetName(DefCat.ApptConfirmed,PIn.Long(rawtable.Rows[i]["Confirmed"].ToString()));
contmeth=(ContactMethod)PIn.Int(rawtable.Rows[i]["PreferConfirmMethod"].ToString());
if(contmeth==ContactMethod.None || contmeth==ContactMethod.HmPhone) {
row["contactMethod"]=Lans.g("FormConfirmList","Hm:")+rawtable.Rows[i]["HmPhone"].ToString();
}
if(contmeth==ContactMethod.WkPhone) {
row["contactMethod"]=Lans.g("FormConfirmList","Wk:")+rawtable.Rows[i]["WkPhone"].ToString();
}
if(contmeth==ContactMethod.WirelessPh) {
row["contactMethod"]=Lans.g("FormConfirmList","Cell:")+rawtable.Rows[i]["WirelessPhone"].ToString();
}
if(contmeth==ContactMethod.TextMessage) {
row["contactMethod"]=Lans.g("FormConfirmList","Text:")+rawtable.Rows[i]["WirelessPhone"].ToString();
}
if(contmeth==ContactMethod.Email) {
row["contactMethod"]=rawtable.Rows[i]["Email"].ToString();
}
if(contmeth==ContactMethod.DoNotCall || contmeth==ContactMethod.SeeNotes) {
row["contactMethod"]=Lans.g("enumContactMethod",contmeth.ToString());
}
row["dateSched"]="Unknown";
if(rawtable.Rows[i]["LogDateTime"].ToString().Length>0) {
row["dateSched"]=rawtable.Rows[i]["LogDateTime"].ToString();
}
if(rawtable.Rows[i]["Email"].ToString()=="" && rawtable.Rows[i]["guarEmail"].ToString()!="") {
row["email"]=rawtable.Rows[i]["guarEmail"].ToString();
}
else {
row["email"]=rawtable.Rows[i]["Email"].ToString();
}
row["Guarantor"]=rawtable.Rows[i]["Guarantor"].ToString();
row["medNotes"]="";
if(rawtable.Rows[i]["Premed"].ToString()=="1"){
row["medNotes"]=Lans.g("FormConfirmList","Premedicate");
}
if(rawtable.Rows[i]["MedUrgNote"].ToString()!=""){
if(row["medNotes"].ToString()!="") {
row["medNotes"]+="\r\n";
}
row["medNotes"]+=rawtable.Rows[i]["MedUrgNote"].ToString();
}
pat=new Patient();
pat.LName=rawtable.Rows[i]["LName"].ToString();
pat.FName=rawtable.Rows[i]["FName"].ToString();
pat.Preferred=rawtable.Rows[i]["Preferred"].ToString();
row["nameF"]=pat.GetNameFirstOrPreferred();
row["nameFL"]=pat.GetNameFirstOrPrefL();
row["Note"]=rawtable.Rows[i]["Note"].ToString();
row["patientName"]= pat.LName+"\r\n";
if(pat.Preferred!=""){
row["patientName"]+="'"+pat.Preferred+"'";
}
else{
row["patientName"]+=pat.FName;
}
row["PatNum"]=rawtable.Rows[i]["PatNum"].ToString();
row["PreferConfirmMethod"]=rawtable.Rows[i]["PreferConfirmMethod"].ToString();
row["ProcDescript"]=rawtable.Rows[i]["ProcDescript"].ToString();
row["TxtMsgOk"]=rawtable.Rows[i]["TxtMsgOk"].ToString();
row["WirelessPhone"]=rawtable.Rows[i]["WirelessPhone"].ToString();
rows.Add(row);
}
//Array.Sort(orderDate,RecallList);
//return RecallList;
for(int i=0;i<rows.Count;i++) {
table.Rows.Add(rows[i]);
}
return table;
}