protected void getSessionData(int patientId, int patientMasterVisitId) { var PCN = new PatientClinicalNotesLogic(); //PatientClinicalNotes[] notesList = PCN.getPatientClinicalNotes(PatientId).ToArray(); PatientClinicalNotes[] notesList = (PatientClinicalNotes[])Session["PatientNotesData"]; if (notesList != null) { if (notesList.Any()) { foreach (var value in notesList) { //PCId = Convert.ToInt32(value.NotesCategoryId); TextBox ntb = (TextBox)FindControl("session1tb" + value.NotesCategoryId.ToString()); if (ntb != null) { ntb.Text = value.ClinicalNotes; } if (LookupLogic.GetLookupItemId("Session1FollowupDate") == value.NotesCategoryId.ToString()) { PatientAppointmentManager appointmentmgr = new PatientAppointmentManager(); if (value.ClinicalNotes != "") { List <PatientAppointment> paList = appointmentmgr.GetByDate(Convert.ToDateTime(value.ClinicalNotes)); foreach (var pavalue in paList) { appointmentId = pavalue.Id; } } } } } } var PSM = new PatientScreeningManager(); PatientScreening[] screeningList = (PatientScreening[])Session["PatientScreeningData"]; if (screeningList != null) { foreach (var value in screeningList) { //PCId = Convert.ToInt32(value.ScreeningTypeId); RadioButtonList rbl = (RadioButtonList)FindControl("session1rb" + value.ScreeningCategoryId.ToString()); if (rbl != null) { rbl.SelectedValue = value.ScreeningValueId.ToString(); } } } //PatientAppointmentManager appointmentmgr = new PatientAppointmentManager(); //PatientAppointment pa = appointmentmgr.GetAppointmentSummaryByDate(AppointmentId); //AppointmentDate.Text = pa.AppointmentDate.ToString("dd-MMM-yyy"); }
public int GetPatientAppointmentCount(DateTime date) { int count = 0; List <PatientAppointment> appointments = new List <PatientAppointment>(); try { var appointment = new PatientAppointmentManager(); appointments = appointment.GetByDate(date); count = appointments.Count; } catch (Exception e) { Msg = e.Message; } return(count); }