Esempio n. 1
0
 public string GetPatientName(long PatNum, long CustomerNum)
 {
     try{
         String   PatName = "";
         Patientm pat     = Patientms.GetOne(CustomerNum, PatNum);
         PatName = GetPatientName(pat);
         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["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);
     }
 }
 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);
     }
 }
Esempio n. 4
0
 public ActionResult Login(LoginModel model, string returnUrl)
 {
     if (ModelState.IsValid)
     {
         HttpCookie DentalOfficeIDCookie = Request.Cookies["DentalOfficeIDCookie"];
         if (DentalOfficeIDCookie != null)
         {
             Int64.TryParse(DentalOfficeIDCookie.Value, out DentalOfficeID);
         }
         Patientm patm = Patientms.GetOne(DentalOfficeID, model.UserName, model.Password);
         if (patm == null)
         {
             ModelState.AddModelError("", "Login Failed, Please Try Again");
         }
         else
         {
             Session["Patient"] = patm;
             Prefms.LoadPreferences();
             return(RedirectToAction("EHRInformation", "Medical"));
         }
     }
     return(View());
 }