/// <summary> /// event /// US:838 /// handler for My Patients button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnMyPatients_Click(object sender, EventArgs e) { btnMyPatients.Focus(); //get providers patients from the query //get a dataset matching criteria DataSet dsPatients = null; CPatientData pat = new CPatientData(BaseMstr.BaseData); CStatus status = pat.GetUserPatientDS(BaseMstr.UserID, out dsPatients); if (!status.Status) { ShowStatusInfo(status); return; } PatientLookup(sender, e, Convert.ToString(BaseMstr.UserID)); }
/// <summary> /// event /// US:838 /// load the patient list based on the options selected /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbOptions_SelectedIndexChanged(object sender, EventArgs e) { CStatus status = new CStatus(); if (rblOptions.SelectedIndex == -1) { return; } string strValue = rblOptions.SelectedValue; string strUserID = string.Empty; if (strValue == OPTION_PROVIDERS) { //get the selected team id long lUserID = CDataUtils.ToLong(lbOptions.SelectedValue); //get the dataset from our db if (lUserID > 0) { //get providers patients from the query //get a dataset matching criteria DataSet dsPatients = null; CPatientData pat = new CPatientData(BaseMstr.BaseData); status = pat.GetUserPatientDS(lUserID, out dsPatients); strUserID = Convert.ToString(lUserID); } } else if (strValue == OPTION_TEAMS) { //get the selected team id long lTeamID = CDataUtils.ToLong(lbOptions.SelectedValue); //get the dataset from our db if (lTeamID > 0) { CTeamData td = new CTeamData(BaseMstr.BaseData); DataSet dsTeams = null; status = td.GetTeamPatientsDS(lTeamID, out dsTeams); } } else if (strValue == OPTION_SPECIALTIES) { //get the selected team id long lSpecialtyID = CDataUtils.ToLong(lbOptions.SelectedValue); if (lSpecialtyID > 0) { //get the dataset from our db CSpecialtyData sd = new CSpecialtyData(BaseMstr.BaseData); DataSet dsSpecialty = null; status = sd.GetSpecialtyPatientsDS(lSpecialtyID, out dsSpecialty); } } else if (strValue == OPTION_CLINICS) { //get the selected team id long lClinicID = CDataUtils.ToLong(lbOptions.SelectedValue); if (lClinicID > 0) { //get the dataset from our db DataSet dsClinics = null; CClinicData cd = new CClinicData(BaseMstr.BaseData); status = cd.GetClinicPatientsDS(lClinicID, calApptFromDate.SelectedDate.GetValueOrDefault(), calApptToDate.SelectedDate.GetValueOrDefault(), out dsClinics); } } else if (strValue == OPTION_WARDS) { //get the selected team id long lWardID = CDataUtils.ToLong(lbOptions.SelectedValue); if (lWardID > 0) { //get the dataset from our db DataSet dsWards = null; CWardData wd = new CWardData(BaseMstr.BaseData); status = wd.GetWardPatientsDS(lWardID, out dsWards); } } status = PatientLookup(sender, e, strUserID); if (!status.Status) { ShowStatusInfo(status); upucPatientLookup.Update(); } return; }