Пример #1
0
 public AccountModel(Patientm patm)
 {
     String formatstring="{0:0.00}";
     BalTotal="$"+String.Format(formatstring,Math.Abs(patm.BalTotal));
     InsEst="$"+String.Format(formatstring,Math.Abs(patm.InsEst));
     AfterIns="$"+String.Format(formatstring,Math.Abs(patm.BalTotal-patm.InsEst));
     if(patm.BalTotal<0) {
         BalTotal="-"+BalTotal;
     }
     else {
         BalTotal=" "+BalTotal;
     }
     if(patm.InsEst<0) {
         InsEst="-"+InsEst;
     }
     else {
         InsEst=" "+InsEst;
     }
     if((patm.BalTotal-patm.InsEst)<0) {
         AfterIns="-"+AfterIns;
     }
     else {
         AfterIns=" "+AfterIns;
     }
     statementmList=Statementms.GetStatementms(patm.CustomerNum,patm.PatNum);
 }
Пример #2
0
 public FamilyModel(Patientm patm)
 {
     this.patm=patm;
     patList=Patientms.GetPatientmsOfFamily(patm.CustomerNum,patm.PatNum);
     foreach(Patientm pm in patList) {
         pm.Age=Patientms.DateToAge(pm.Birthdate);
     }
 }
Пример #3
0
 ///<summary>Takes the list of changes from the dental office and makes updates to those items in the mobile server db.</summary>
 public static void UpdateFromChangeList(List <Patientm> list, long customerNum)
 {
     for (int i = 0; i < list.Count; i++)
     {
         list[i].CustomerNum = customerNum;
         Patientm patientm = Crud.PatientmCrud.SelectOne(customerNum, list[i].PatNum);
         if (patientm == null)                       //not in db
         {
             Crud.PatientmCrud.Insert(list[i], true);
         }
         else
         {
             Crud.PatientmCrud.Update(list[i]);
         }
     }
 }
Пример #4
0
Файл: Util.cs Проект: mnisl/OD
		public string GetPatientName(Patientm pat) {
			try {
				String PatName="";
				PatName+=pat.LName +", ";
				if(!String.IsNullOrEmpty(pat.Preferred)) {
					PatName+="'"+pat.Preferred +"'";
				}
				PatName+=" "+pat.FName +" ";
				if(!String.IsNullOrEmpty(pat.MiddleI)) {
					PatName+=pat.MiddleI +".";
				}
				return PatName;
			}
			catch(Exception ex) {
				Logger.LogError(ex);
				return "";
			}
		}
		protected void Page_Load(object sender,EventArgs e) {
			try {
				CustomerNum=util.GetCustomerNum(Message);
				if(CustomerNum==0) {
					return;
				}
				if(Request["AptNum"]!=null) {
					Int64.TryParse(Request["AptNum"].ToString().Trim(),out AptNum);
				}
				apt=Appointmentms.GetOne(CustomerNum,AptNum);
				pat=Patientms.GetOne(CustomerNum,apt.PatNum);
				PatName=util.GetPatientName(pat);
			}
			catch(Exception ex) {
				LabelError.Text=Util.ErrorMessage;
				Logger.LogError(ex);
			}
		}
		protected void Page_Load(object sender,EventArgs e) {
			try {
				CustomerNum=util.GetCustomerNum(Message);
				if(CustomerNum==0) {
					return;
				}
				if(Request["PatNum"]!=null) {
					Int64.TryParse(Request["PatNum"].ToString().Trim(),out PatNum);
				}
				Int64.TryParse(Session["CustomerNum"].ToString(),out CustomerNum);
				pat=Patientms.GetOne(CustomerNum,PatNum);
				pat.Age=Patientms.DateToAge(pat.Birthdate);
				PatName=util.GetPatientName(pat);
				String DialString1=@"&nbsp;&nbsp;&nbsp;<a href=""tel:";
				String DialString2=@""" class=""style2"">dial</a>";
				if(!String.IsNullOrEmpty(pat.HmPhone)) {
					DialLinkHmPhone=DialString1+pat.HmPhone+DialString2;
				} 
				if(!String.IsNullOrEmpty(pat.WkPhone)) {
					DialLinkWkPhone=DialString1+pat.WkPhone+DialString2;
				}
				if(!String.IsNullOrEmpty(pat.WirelessPhone)) {
					DialLinkWirelessPhone=DialString1+pat.WirelessPhone+DialString2;
				}
				if(!String.IsNullOrEmpty(pat.Email)) {
					EmailString=@"<a href=""mailto:"+pat.Email+@""" class=""style2"">"+pat.Email+"</a>";
				}
				List<Appointmentm> appointmentmList=Appointmentms.GetAppointmentms(CustomerNum,PatNum);
				appointmentmList=appointmentmList.Where(a=>a.AptStatus!=ApptStatus.UnschedList && a.AptStatus!=ApptStatus.Planned).ToList();//exclude unscheduled and planned appointments.
				Repeater1.DataSource=appointmentmList;
				Repeater1.DataBind();
				List<RxPatm> rxList=RxPatms.GetRxPatms(CustomerNum,PatNum);
				Repeater2.DataSource=rxList;
				Repeater2.DataBind();
				List<Allergym> allergyList=Allergyms.GetAllergyms(CustomerNum,PatNum);
				Repeater3.DataSource=allergyList;
				Repeater3.DataBind();
			}
			catch(Exception ex) {
				LabelError.Text=Util.ErrorMessage;
				Logger.LogError(ex);
			}
		}
Пример #7
0
 public MedicalModel(Patientm patm)
 {
     //constructor
         this.patm=patm;
         FillData();
 }
Пример #8
0
 public AppointmentModel(Patientm patm)
 {
     appointmentmList=Appointmentms.GetAppointmentms(patm.CustomerNum,patm.PatNum);
 }
Пример #9
0
 /// <remarks/>
 public void SynchPatientsAsync(string RegistrationKey, Patientm[] patientmList, object userState) {
     if ((this.SynchPatientsOperationCompleted == null)) {
         this.SynchPatientsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSynchPatientsOperationCompleted);
     }
     this.InvokeAsync("SynchPatients", new object[] {
                 RegistrationKey,
                 patientmList}, this.SynchPatientsOperationCompleted, userState);
 }
Пример #10
0
 /// <remarks/>
 public void SynchPatientsAsync(string RegistrationKey, Patientm[] patientmList) {
     this.SynchPatientsAsync(RegistrationKey, patientmList, null);
 }
Пример #11
0
 public void SynchPatients(string RegistrationKey, Patientm[] patientmList) {
     this.Invoke("SynchPatients", new object[] {
                 RegistrationKey,
                 patientmList});
 }