/// <summary> /// This method returns all the patients for a selected provider. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { EYEServiceClient serviceClient = new EYEServiceClient(); var patients = serviceClient.getPatientsForProvider(4030); DataTable dt = new DataTable(); dt.Columns.Add("FirstName", typeof(string)); dt.Columns.Add("MiddleName", typeof(string)); dt.Columns.Add("LastName", typeof(string)); dt.Columns.Add("Gender", typeof(string)); dt.Columns.Add("PatientId", typeof(int)); DataRow dr = null; foreach (Patient patient in patients) { dr = dt.NewRow(); dr["FirstName"] = patient.FirstName; dr["MiddleName"] = patient.MiddleName; dr["LastName"] = patient.LastName; dr["Gender"] = patient.Gender; dr["PatientId"] = patient.PatientId; dt.Rows.Add(dr); } GridView1.DataSource = dt; GridView1.DataBind(); }
/// <summary> /// This method returns the family information for the patient selected on the previous page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { lblPatient.Text = Request.QueryString["FirstName"] + " " + Request.QueryString["LastName"]; EYEServiceClient serviceClient = new EYEServiceClient(); // Gets the family information for the patient. var family = serviceClient.getFamilyForPatient(Convert.ToInt32(Request.QueryString["Id"])); DataTable dt = new DataTable(); dt.Columns.Add("FirstName", typeof(string)); dt.Columns.Add("MiddleName", typeof(string)); dt.Columns.Add("LastName", typeof(string)); dt.Columns.Add("Phone", typeof(string)); DataRow dr = null; foreach (User user in family) { dr = dt.NewRow(); dr["FirstName"] = user.FirstName; dr["MiddleName"] = user.MiddleName; dr["LastName"] = user.LastName; dr["Phone"] = user.Phone; dt.Rows.Add(dr); } GridView1.DataSource = dt; GridView1.DataBind(); }
/// <summary> /// This method returns the treatment record for the selected patient. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { lblPatient.Text = Request.QueryString["FirstName"] + " " + Request.QueryString["LastName"]; EYEServiceClient serviceClient = new EYEServiceClient(); var records = serviceClient.getPatientTreatmentRecord(Convert.ToInt32(Request.QueryString["Id"])); DataTable dt = new DataTable(); dt.Columns.Add("DateConducted", typeof(string)); dt.Columns.Add("SensitivityToLight", typeof(string)); dt.Columns.Add("DislikeTo3DMovies", typeof(string)); dt.Columns.Add("UsesGlasses", typeof(string)); dt.Columns.Add("EyeFatigue", typeof(string)); dt.Columns.Add("ReadingForgetfulness", typeof(string)); dt.Columns.Add("ReadSlowly", typeof(string)); dt.Columns.Add("BlurredVision", typeof(string)); dt.Columns.Add("DoubleVision", typeof(string)); dt.Columns.Add("JumpingLines", typeof(string)); dt.Columns.Add("HurtingEyes", typeof(string)); dt.Columns.Add("SoreEyes", typeof(string)); dt.Columns.Add("Focus", typeof(string)); DataRow dr = null; foreach (ScreeningTest test in records) { dr = dt.NewRow(); dr["DateConducted"] = test.DateConducted; dr["SensitivityToLight"] = test.SensitivityToLight; dr["DislikeTo3DMovies"] = test.DislikeTo3DMovies; dr["UsesGlasses"] = test.UsesGlasses; dr["EyeFatigue"] = test.EyeFatigue; dr["ReadingForgetfulness"] = test.ReadingForgetfulness; dr["ReadSlowly"] = test.ReadSlowly; dr["BlurredVision"] = test.BlurredVision; dr["DoubleVision"] = test.DoubleVision; dr["JumpingLines"] = test.JumpingLines; dr["HurtingEyes"] = test.HurtingEyes; dr["SoreEyes"] = test.SoreEyes; dr["Focus"] = test.Focus; dt.Rows.Add(dr); } GridView1.DataSource = dt; GridView1.DataBind(); }