public override bool RefreshPage() { if (Session["DataSetClientSummary"] != null) { MedicationClientPersonalInformation1.showEditableAllergyList = true; MedicationClientPersonalInformation1.Activate(); } else { ScriptManager.RegisterStartupScript(LabelClientScript, LabelClientScript.GetType(), ClientID.ToString(), "redirectToLoginPage();", true); } return(true); }
protected override void Page_Load(object sender, EventArgs e) { try { base.Page_Load(sender, e); Streamline.BaseLayer.CommonFunctions.Event_Trap(this); //Added in ref to Task#2895 if (System.Configuration.ConfigurationSettings.AppSettings["OpenFromSmartCare"].ToString().ToUpper() == "FALSE") { LinkButtonLogout.Style["display"] = "block"; LinkButtonStartPage.Style["display"] = "block"; } if (DropDownListClients.DataSource != null) { DropDownListClients.SelectedIndex = 0; } #region "error message color added by rohit ref. #121" Streamline.BaseLayer.CommonFunctions.SetErrorMegssageBackColor(LabelError); Streamline.BaseLayer.CommonFunctions.SetErrorMegssageForeColor(LabelError); #endregion if (System.Configuration.ConfigurationSettings.AppSettings["OpenFromSmartCare"].ToString().ToUpper() == "TRUE") { //HomeImage.Visible = false; } // Ref To #1566 Streamline.DataService.SharedTables objSharedTables1 = new Streamline.DataService.SharedTables(); DataSet datasetStaffPermissions = null; datasetStaffPermissions = objSharedTables1.GetPermissionforStaffToSeachClient((((StreamlineIdentity)Context.User.Identity)).UserId); DataTable dt = datasetStaffPermissions.Tables["StaffPermissionExceptions"]; var dValue = from row in dt.AsEnumerable() where row.Field <int>("PermissionTemplateType") == 5904 && row.Field <int>("PermissionItemId") == 8732 select row.Field <int>("StaffId"); if (dValue.Count() != 0) { HiddenFieldIsStaffHasPermissionforClientsDropDown.Value = "true"; } else { HiddenFieldIsStaffHasPermissionforClientsDropDown.Value = "false"; } //ButtonViewHistory.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.ViewHistory); ButtonPrintList.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.PrintList); ButtonReOrder.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.ChangeOrder); ButtonRefillOrder.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.ReOrder); ButtonAdjustDosageSchedule.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.AdjustDosageSchedule); ButtonPatientContent.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.PatientConsent); ButtonCompleteOrder.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.CompleteOrder); ShowHidePMPButton(); ButtonPMP.Enabled = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.PMP); HiddenFieldPermissionCheckButtonReOrder.Value = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.ChangeOrder) ? "Y" : "N"; HiddenFieldPermissionCheckButtonRefillOrder.Value = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.ReOrder) ? "Y" : "N"; HiddenFieldPermissionCheckButtonCompleteOrder.Value = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).HasPermission(Permissions.CompleteOrder) ? "Y" : "N"; //Activate the MedicationClientPersonalInformation Control MedicationClientPersonalInformation1.showEditableAllergyList = true; MedicationClientPersonalInformation1.Activate(); //Code added by Loveena in ref to Task#3234 2.3 Show Client Demographics on All Client Pages if (Session["DataSetClientSummary"] != null) { DataSet DataSetClientSummary = (DataSet)Session["DataSetClientSummary"]; LabelClientName.Text = ""; //Modified by Loveena in ref to Task#3265 LabelClientName.Text = DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString(); } ShowHidePatientContent(); } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = null; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } }
/// <summary> /// Purpose:This function will be used to Get Client Medication Summary Data /// </summary> private void GetClientSummaryData() { Streamline.UserBusinessServices.DataSets.DataSetClientMedications DataSetClientMedications; try { objectClientMedications = new ClientMedication(); objectCommonFunctions = new ApplicationCommonFunctions(); CommonFunctions.Event_Trap(this); string _ClientRowIdentifier = ""; string _ClinicianrowIdentifier = ""; DataSetClientMedications = new Streamline.UserBusinessServices.DataSets.DataSetClientMedications(); try { _ClinicianrowIdentifier = ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).ClinicianRowIdentifier; } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } string ParseMessage = ex.Message; if (ParseMessage.Contains("Object") == true) { throw new Exception("Session Expired"); } } _ClientRowIdentifier = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientRowIdentifier; if (_ClientRowIdentifier != "" && _ClinicianrowIdentifier != "") { _DataSetClientSummary = objectClientMedications.DownloadClientMedicationSummary(_ClientRowIdentifier, _ClinicianrowIdentifier); Session["DataSetClientMedications"] = null; Session["DataSetPrescribedClientMedications"] = null;//Added As per task#3323 By Pradeep on 4 March 2011 Session["DataSetClientSummary"] = _DataSetClientSummary; DataSetClientMedications.EnforceConstraints = false; DataSetClientMedications.Tables["ClientMedications"].Merge(_DataSetClientSummary.Tables["ClientMedications"]); DataSetClientMedications.Tables["ClientMedicationInstructions"].Merge(_DataSetClientSummary.Tables["ClientMedicationInstructions"]); //Activate the MedicationClientPersonalInformation Control MedicationClientPersonalInformation1.showEditableAllergyList = true; MedicationClientPersonalInformation1.Activate(); LabelClientName.Text = ""; LabelClientName.Text = _DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString(); //DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString(); } } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = _DataSetClientSummary; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { objectClientMedications = null; objectCommonFunctions = null; } }
protected void ButtonPMP_Click(object sender, EventArgs e) { Session["DataSetClientSummary"] = null; MedicationClientPersonalInformation1.Activate(); }