protected void grdUnsentNF_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "Select")
            {
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = _caseDetailsBO.GetCasePatientID(e.CommandArgument.ToString(), "");
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = e.Item.Cells[2].Text;
                _bill_Sys_CaseObject.SZ_CASE_NO      = ((LinkButton)e.Item.FindControl("lnkSelectCase2")).Text;
                Session["CASE_OBJECT"] = _bill_Sys_CaseObject;

                _bill_Sys_Case            = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();

                Session["CASEINFO"] = _bill_Sys_Case;
                Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
 protected void grdBills_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         int num = Convert.ToInt32(e.CommandArgument.ToString());
         this._bill_Sys_Case            = new Bill_Sys_Case();
         this._bill_Sys_Case.SZ_CASE_ID = this.grdBills.DataKeys[num]["sz_case_id"].ToString();
         CaseDetailsBO       sbo  = new CaseDetailsBO();
         Bill_Sys_CaseObject obj2 = new Bill_Sys_CaseObject();
         obj2.SZ_PATIENT_ID             = sbo.GetCasePatientID(this._bill_Sys_Case.SZ_CASE_ID, "");
         obj2.SZ_CASE_ID                = this._bill_Sys_Case.SZ_CASE_ID;
         obj2.SZ_COMAPNY_ID             = sbo.GetPatientCompanyID(obj2.SZ_PATIENT_ID);
         obj2.SZ_PATIENT_NAME           = sbo.GetPatientName(obj2.SZ_PATIENT_ID);
         obj2.SZ_CASE_NO                = this.grdBills.DataKeys[num]["sz_case_no"].ToString();
         this.Session["CASEINFO"]       = this._bill_Sys_Case;
         this.Session["CASE_OBJECT"]    = obj2;
         this.Session["PassedCaseID"]   = this._bill_Sys_Case.SZ_CASE_ID;
         this.Session["SZ_BILL_NUMBER"] = this.grdBills.DataKeys[num]["sz_bill_number"].ToString();
         base.Response.Redirect("Bill_Sys_BillTransaction.aspx?Type=Search", false);
     }
 }
    protected void grdBillSearch_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "Add IC9 Code")
            {
                Session["PassedBillID"] = e.CommandArgument;
                Response.Redirect("Bill_Sys_BillIC9Code.aspx", false);
            }
            if (e.CommandName.ToString() == "Generate bill")
            {
                Session["TM_SZ_CASE_ID"] = e.CommandArgument;
                Session["TM_SZ_BILL_ID"] = e.Item.Cells[2].Text;
                //string strPath = ConfigurationManager.AppSettings["DefaultTemplateName"].ToString();
                //GeneratePDFFile.GeneratePDF objGeneratePDF = new GeneratePDFFile.GeneratePDF();

                //String szPDFFileName = objGeneratePDF.GeneratePDF(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME, Session["TM_SZ_CASE_ID"].ToString(), Session["TM_SZ_BILL_ID"].ToString(), "", strPath);
                Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('Bill_Sys_SelectBillType.aspx'); ", true);

                //     Response.Redirect("TemplateManager/Bill_Sys_GeneratePDF.aspx", false);
            }
            if (e.CommandName.ToString() == "Deniel")
            {
                Session["TM_SZ_CASE_ID"] = e.CommandArgument;
                Session["TM_SZ_BILL_ID"] = e.Item.Cells[2].Text;
                //string strPath = ConfigurationManager.AppSettings["DefaultTemplateName"].ToString();
                //GeneratePDFFile.GeneratePDF objGeneratePDF = new GeneratePDFFile.GeneratePDF();

                //String szPDFFileName = objGeneratePDF.GeneratePDF(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME, Session["TM_SZ_CASE_ID"].ToString(), Session["TM_SZ_BILL_ID"].ToString(), "", strPath);
                Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('Bill_Sys_Denial.aspx'); ", true);

                //     Response.Redirect("TemplateManager/Bill_Sys_GeneratePDF.aspx", false);
            }
            if (e.CommandName.ToString() == "Make Payment")
            {
                if (e.Item.Cells[9].Text.ToString() != "" && e.Item.Cells[9].Text.ToString() != " ")
                {
                    if (e.Item.Cells[13].Text.ToString() != "1" && e.Item.Cells[13].Text.ToString() != "2")
                    {
                        if (Convert.ToDecimal(e.Item.Cells[9].Text.ToString()) > 0)
                        {
                            Session["PassedBillID"] = e.CommandArgument;
                            Session["Balance"]      = e.Item.Cells[9].Text;

                            _bill_Sys_Case            = new Bill_Sys_Case();
                            _bill_Sys_Case.SZ_CASE_ID = e.Item.Cells[3].Text.ToString();

                            Session["CASEINFO"] = _bill_Sys_Case;
                            Response.Redirect("Bill_Sys_PaymentTransactions.aspx", false);
                        }
                        else
                        {
                            Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "alert('Payment is completed for this bill!'); ", true);
                        }
                    }
                    else
                    {
                        Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "alert('Bill is litigated or write off.You can not process this bill!'); ", true);
                    }
                }
                else
                {
                    Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "alert('Please first add services to bill!'); ", true);
                }
            }
            if (e.CommandName.ToString() == "Edit")
            {
                _bill_Sys_Case            = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.Item.Cells[3].Text.ToString();

                Session["CASEINFO"]       = _bill_Sys_Case;
                Session["PassedCaseID"]   = e.Item.Cells[3].Text;
                Session["SZ_BILL_NUMBER"] = e.CommandArgument;
                Response.Redirect("Bill_Sys_BillTransaction.aspx", false);
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }

        try
        {
            this.con.SourceGrid          = grdNotes;
            this.txtSearchBox.SourceGrid = grdNotes;
            this.grdNotes.Page           = this.Page;
            this.grdNotes.PageNumberList = this.con;
            chkReminderPopup.Attributes.Add("OnClick", "chkReminderPopup_onclick(this);");

            //TreeMenuControl1.ROLE_ID = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE;

            btnSave.Attributes.Add("onclick", "return formValidator('frmNotes','extddlNType','txtNoteDesc');");
            btndelete.Attributes.Add("onclick", "return ConfirmDelete();");
            softdelete.Attributes.Add("onclick", "return ConfirmDelete();");
            txtCompanyIDForNotes.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            if (Session["CASE_OBJECT"] != null)
            {
                txtCaseID.Text = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                //////////////////////
                //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                Session["CASEINFO"] = _bill_Sys_Case;


                String szURL    = "";
                String szCaseID = txtCaseID.Text;
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";


                Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                Session["TM_SZ_CASE_ID"] = txtCaseID.Text;
                GetPatientDeskList();
                //
                ///////////////////
            }
            else
            {
                Response.Redirect("Bill_Sys_SearchCase.aspx", false);
            }

            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            txtUserID.Text    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
            txtNoteCode.Text  = Note_Code.New_Note_Added;
            //if (((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("admin"))
            //{
            //    btndelete.Visible = true;
            //    softdelete.Visible = false;
            //}
            //else
            //{
            //    btndelete.Visible = false;
            //    softdelete.Visible = true;
            //}
            if (!IsPostBack)
            {
                BindGrid();
                if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_NOTE_DELETE == "True")
                {
                    btndelete.Visible = true;
                }
                if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_NOTE_SOFT_DELETE == "True")
                {
                    softdelete.Visible = true;
                }
                extddlFilter.Text = "NTY0002";
                grdNotes.XGridBindSearch();
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_NotesPage.aspx");
        }
        #endregion
        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (!IsPostBack)
            {
                ddlTemplate.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                txtCompanyID.Text   = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                if (Session["CASE_OBJECT"] != null)
                {
                    //////////////////////
                    //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills
                    txtCaseID.Text = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;

                    Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                    _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                    Session["CASEINFO"] = _bill_Sys_Case;

                    Session["PassedCaseID"] = txtCaseID.Text;
                    String szURL    = "";
                    String szCaseID = Session["PassedCaseID"].ToString();
                    Session["QStrCaseID"]   = szCaseID;
                    Session["Case_ID"]      = szCaseID;
                    Session["Archived"]     = "0";
                    Session["QStrCID"]      = szCaseID;
                    Session["SelectedID"]   = szCaseID;
                    Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["SN"]           = "0";
                    Session["LastAction"]   = "vb_CaseInformation.aspx";


                    Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                    Session["TM_SZ_CASE_ID"] = txtCaseID.Text;

                    GetPatientDeskList();
                    //
                    ///////////////////
                }
            }
            //txtUserID.Text = ((PFS_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_TemplateManager.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        _associateDiagnosisCodeBO = new Bill_Sys_AssociateDiagnosisCodeBO();
        try
        {
            if (Request.QueryString["Flag"] == "SYN")
            {
                btnTemplateManager.Text = "Synaptic Notes";
            }

            _obj_CheckOutBO = new Bill_Sys_CheckoutBO();
            DataSet dsDoctorId   = new DataSet();
            DataSet dsSpeciality = new DataSet();
            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            txtUserId.Text    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
            dsDoctorId        = _obj_CheckOutBO.GetDoctorUserID(txtUserId.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            txtDoctorId.Text  = dsDoctorId.Tables[0].Rows[0][0].ToString();

            dsSpeciality       = GET_DoctorSpeciality(txtDoctorId.Text, txtCompanyID.Text);
            txtSpeciality.Text = dsSpeciality.Tables[0].Rows[0][0].ToString();

            txtDiagonosisCode.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('_ctl0_ContentPlaceHolder1_tabcontainerDiagnosisCode_tabpnlAssociate_btnSeacrh').click(); return false;}} else {alert('Other');return true;}; ");
            if (!IsPostBack)
            {
                Session["DiagnosysList"] = "";

                extddlDiagnosisType.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                extddlSpeciality.Flag_ID    = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                if (Request.QueryString["CaseId"] != null)
                {
                    Session["CASE_OBJECT"] = null;
                    txtCaseID.Text         = Request.QueryString["CaseId"].ToString();

                    GetPatientDeskList();
                }
                else if (Session["CASE_OBJECT"] != null)
                {
                    txtCaseID.Text = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    //////////////////////
                    //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                    Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                    _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                    Session["CASEINFO"] = _bill_Sys_Case;

                    Session["PassedCaseID"] = txtCaseID.Text;
                    String szURL    = "";
                    String szCaseID = Session["PassedCaseID"].ToString();
                    Session["QStrCaseID"]   = szCaseID;
                    Session["Case_ID"]      = szCaseID;
                    Session["Archived"]     = "0";
                    Session["QStrCID"]      = szCaseID;
                    Session["SelectedID"]   = szCaseID;
                    Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["SN"]           = "0";
                    Session["LastAction"]   = "vb_CaseInformation.aspx";


                    Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                    Session["TM_SZ_CASE_ID"] = txtCaseID.Text;
                    GetPatientDeskList();
                    //
                    ///////////////////
                }

                else
                {
                    Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }

                strCaseType = _associateDiagnosisCodeBO.GetCaseType(txtCaseID.Text);
                if (Request.QueryString["DoctorID"] != null)
                {
                    //   GetDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, "", "GET_DIAGNOSIS_CODE");
                }
                if (Request.QueryString["SetId"] != null)
                {
                    txtDiagnosisSetID.Text = Request.QueryString["SetId"].ToString();
                    _ds = _associateDiagnosisCodeBO.GetCaseAssociateDiagnosisDetails(txtDiagnosisSetID.Text);
                    GetDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, "", "GET_DIAGNOSIS_CODE");
                    //GetPTDiagnosisCode(extddlDoctor.Text, Request.QueryString["SetId"].ToString(), "GET_PT_DIAGNOSIS_CODE");
                    //GetEvaluationDiagnosisCode(extddlDoctor.Text, Request.QueryString["SetId"].ToString(), "GET_EVALUATION_DIAGNOSIS_CODE");
                    Visiblecontrol();
                    //BindControl();
                }
                else
                {
                    txtDiagnosisSetID.Text = _associateDiagnosisCodeBO.GetDiagnosisSetID();
                }

                //if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                //{
                GetDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                GetAssignedDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                grdNormalDgCode.DataSource = null;
                grdNormalDgCode.DataBind();
                //}
                extddlSpeciality.Visible = false;
                lblSpeciality.Visible    = false;

                if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                {
                    tabcontainerDiagnosisCode.ActiveTabIndex = 1;
                }
                else
                {
                    tabcontainerDiagnosisCode.ActiveTabIndex = 0;
                }
            }
            lblMsg.Text = "";
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_AssociateDignosisCodeCase.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            this.con.SourceGrid          = this.grdNotes;
            this.txtSearchBox.SourceGrid = this.grdNotes;
            this.grdNotes.Page           = this.Page;
            this.grdNotes.PageNumberList = this.con;
            this.chkReminderPopup.Attributes.Add("OnClick", "chkReminderPopup_onclick(this);");
            this.btnSave.Attributes.Add("onclick", "return formValidator('frmNotes','extddlNType','txtNoteDesc');");
            this.btndelete.Attributes.Add("onclick", "return ConfirmDelete();");
            this.softdelete.Attributes.Add("onclick", "return ConfirmDelete();");
            this.txtCompanyIDForNotes.Text = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            if (this.Session["CASE_OBJECT"] == null)
            {
                base.Response.Redirect("Bill_Sys_SearchCase.aspx", false);
            }
            else
            {
                this.txtCaseID.Text = ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"]).SZ_CASE_ID;
                Bill_Sys_Case billSysCase = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = this.txtCaseID.Text
                };
                this.Session["CASEINFO"] = billSysCase;
                string text = this.txtCaseID.Text;
                this.Session["QStrCaseID"]       = text;
                this.Session["Case_ID"]          = text;
                this.Session["Archived"]         = "0";
                this.Session["QStrCID"]          = text;
                this.Session["SelectedID"]       = text;
                this.Session["DM_User_Name"]     = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]        = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]               = "0";
                this.Session["LastAction"]       = "vb_CaseInformation.aspx";
                this.Session["SZ_CASE_ID_NOTES"] = this.txtCaseID.Text;
                this.Session["TM_SZ_CASE_ID"]    = this.txtCaseID.Text;
                this.GetPatientDeskList();
            }
            this.txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            this.txtUserID.Text    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;
            this.txtNoteCode.Text  = Note_Code.New_Note_Added;
            if (!base.IsPostBack)
            {
                this.BindGrid();
                if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_NOTE_DELETE == "True")
                {
                    this.btndelete.Visible = true;
                }
                if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_NOTE_SOFT_DELETE == "True")
                {
                    this.softdelete.Visible = true;
                }
                this.extddlFilter.Text = "NTY0002";
                this.grdNotes.XGridBindSearch();
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        if (((Bill_Sys_BillingCompanyObject)this.Session["APPSTATUS"]).SZ_READ_ONLY.ToString().Equals("True"))
        {
            (new Bill_Sys_ChangeVersion(this.Page)).MakeReadOnlyPage("Bill_Sys_NotesPage.aspx");
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            // btnAssign.Attributes.Add("onclick", "return formValidator('frmAssociateDignosisCode','extddlDoctor');");
            btnRevert.Attributes.Add("onclick", "return  ChekOne();");
            btnDoctor.Attributes.Add("onclick", "return  Check();");
            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            if (!IsPostBack)
            {
                ///bind doctor name to dropdown
                DataSet           ds     = new DataSet();
                Bill_Sys_DoctorBO objDoc = new Bill_Sys_DoctorBO();
                ds = objDoc.GetReadingDoctorList(txtCompanyID.Text);
                ddlDoctor.DataSource     = ds.Tables[0];
                ddlDoctor.DataTextField  = "DESCRIPTION";
                ddlDoctor.DataValueField = "CODE";
                ddlDoctor.DataBind();
                ddlDoctor.Items.Insert(0, "--Select--");



                if (Request.QueryString["CaseId"] != null)
                {
                    Session["CASE_OBJECT"] = null;
                    txtCaseID.Text         = Request.QueryString["CaseId"].ToString();
                    GetPatientDeskList();
                }
                else if (Session["CASE_OBJECT"] != null)
                {
                    txtCaseID.Text = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    //////////////////////
                    //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                    Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                    _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                    Session["CASEINFO"] = _bill_Sys_Case;

                    Session["PassedCaseID"] = txtCaseID.Text;
                    String szURL    = "";
                    String szCaseID = Session["PassedCaseID"].ToString();
                    Session["QStrCaseID"]   = szCaseID;
                    Session["Case_ID"]      = szCaseID;
                    Session["Archived"]     = "0";
                    Session["QStrCID"]      = szCaseID;
                    Session["SelectedID"]   = szCaseID;
                    Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["SN"]           = "0";
                    Session["LastAction"]   = "vb_CaseInformation.aspx";


                    Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                    Session["TM_SZ_CASE_ID"] = txtCaseID.Text;
                    GetPatientDeskList();
                    //
                    ///////////////////
                }

                else
                {
                    Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }


                GetProcedureList(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                {
                }
            }
            lblMsg.Text = "";
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_StatusProceudure.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            //txtChequeNumber.Attributes.Add("onblur", "javascript:return FromDateValidation(this);");

            btnSave.Attributes.Add("onclick", "return ooValidate();");

            btnUpdate.Attributes.Add("onclick", "return formValidator('frmPaymentTrans','txtChequeNumber,txtChequeDate,txtChequeAmount,txtPaymentType');");
            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            btnLitigation.Attributes.Add("onclick", "return AddComment();");
            btnWriteoff.Attributes.Add("onclick", "return AddComment();");
            //billsearch ajax page
            if (Request.QueryString["csid"] != null)
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                string        szCaseId       = Request.QueryString["csid"];

                string szBollNo = Request.QueryString["bno"];


                string szBalance = Request.QueryString["bal"];

                _bill_Sys_Case.SZ_CASE_ID = szCaseId;
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = _caseDetailsBO.GetCasePatientID(_bill_Sys_Case.SZ_CASE_ID, "");
                _bill_Sys_CaseObject.SZ_CASE_ID      = szCaseId;
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = _caseDetailsBO.GetCaseNo(_bill_Sys_CaseObject.SZ_CASE_ID, _bill_Sys_CaseObject.SZ_COMAPNY_ID);
                Session["CASE_OBJECT"]    = _bill_Sys_CaseObject;
                Session["CASEINFO"]       = _bill_Sys_Case;
                Session["PassedCaseID"]   = szCaseId;
                Session["SZ_BILL_NUMBER"] = szBollNo;

                Session["PassedBillID"] = szBollNo;
                Session["Balance"]      = szBalance;
            }

            txtUserId.Text = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
            txtBillNo.Text = Session["PassedBillID"].ToString();


            if (!IsPostBack)
            {
                lblCaseNo.Text     = txtBillNo.Text;
                txtBalance.Text    = Session["Balance"].ToString();
                lblPosteddate.Text = DateTime.Today.ToShortDateString();
                BindGrid();
                getVisitDate();
                btnUpdate.Enabled = false;
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_PaymentTransactions.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #10
0
    //protected bool detectIdentificationCookie(string cookieCode, string cookieEncryptionKey)
    //{
    //    try
    //    {
    //        if (String.IsNullOrEmpty(cookieCode))
    //            return false;
    //        else if (Request.Cookies["GREENBILLS_DETECTION"] == null)
    //            return false;
    //        else
    //        {
    //            HttpCookie cookie = Request.Cookies["GREENBILLS_DETECTION"];
    //            int i = 0;
    //            foreach (string val in cookie.Values)
    //            {
    //                if (cookie[val].Equals(Bill_Sys_Utility.ComputeHMACSHA1(cookieCode, cookieEncryptionKey)))
    //                {
    //                    return createIdentificationCookie(i);
    //                }
    //                i++;
    //            }
    //            return false;
    //        }
    //    }
    //    catch (Exception ex)
    //    {
    //        return false;
    //    }
    //}


    protected void btnActivate_Click(object sender, EventArgs e)
    {
        string str  = "";
        string roll = "";

        roll = ValidateUserAndToken(txtToken.Text, txtUserName.Text, EncryptPassword());
        if (roll != "")
        {
            if (ActivateUser(txtToken.Text, txtUserName.Text, EncryptPassword()))
            {
                createLoginCookies(txtUserName.Text,
                                   true,
                                   roll);

                //detectIdentificationCookie(Convert.ToString(Session["CookieCode"]), System.Configuration.ConfigurationManager.AppSettings.Get("COOKIE_ENCRYPT_KEY"));

                _bill_Sys_LoginBO = new Bill_Sys_LoginBO();
                DataSet set = new DataSet();
                set = _bill_Sys_LoginBO.getLoginDetails(txtUserName.Text, "", HttpContext.Current.Request.UserHostAddress);
                if ((set.Tables.Count > 0) && (set.Tables[0].Rows.Count > 0))
                {
                    this.objAppSettings = (ApplicationSettings_BO)base.Application["OBJECT_APP_SETTINGS"];
                    if (this.objAppSettings == null)
                    {
                        this.objAppSettings = new ApplicationSettings_BO();
                        base.Application["OBJECT_APP_SETTINGS"] = this.objAppSettings;
                    }
                    if ((set.Tables[0].Rows.Count == 1) && (set.Tables[0].Rows[0][0].ToString() == "False"))
                    {
                        string str3 = HttpContext.Current.Request.UserHostAddress.ToString();
                        FormsAuthentication.SignOut();
                        FormsAuthentication.RedirectToLoginPage("IPValidationCheck=false&InvalidIP=" + str3);
                        return;
                    }
                    this._bill_Sys_UserObject                           = new Bill_Sys_UserObject();
                    this._bill_Sys_UserObject.SZ_USER_ID                = set.Tables[0].Rows[0][0].ToString();
                    this._bill_Sys_UserObject.SZ_USER_NAME              = set.Tables[0].Rows[0][1].ToString();
                    this._bill_Sys_UserObject.SZ_USER_ROLE              = set.Tables[0].Rows[0][4].ToString();
                    this._bill_Sys_UserObject.SZ_PROVIDER_ID            = set.Tables[0].Rows[0][5].ToString();
                    this._bill_Sys_UserObject.SZ_USER_ROLE_NAME         = set.Tables[0].Rows[0][8].ToString();
                    this._bill_Sys_UserObject.SZ_USER_EMAIL             = set.Tables[0].Rows[0]["USER_EMAIL_ID"].ToString();
                    this._bill_Sys_UserObject.DomainName                = set.Tables[0].Rows[0]["DomainName"].ToString();
                    this.Session["USER_OBJECT"]                         = this._bill_Sys_UserObject;
                    this._bill_Sys_BillingCompanyObject                 = new Bill_Sys_BillingCompanyObject();
                    this._bill_Sys_BillingCompanyObject.SZ_COMPANY_ID   = set.Tables[0].Rows[0][2].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_COMPANY_NAME = set.Tables[0].Rows[0][3].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_PREFIX       = set.Tables[0].Rows[0][6].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_ADDRESS      = set.Tables[0].Rows[0][9].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_EMAIL        = set.Tables[0].Rows[0][10].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_PHONE        = set.Tables[0].Rows[0][11].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_FAX          = set.Tables[0].Rows[0][12].ToString();
                    if (set.Tables[0].Rows[0][7].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = Convert.ToBoolean(set.Tables[0].Rows[0][7].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = false;
                    }
                    if (set.Tables[0].Rows[0][13].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = Convert.ToBoolean(set.Tables[0].Rows[0][13].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = false;
                    }
                    if (set.Tables[0].Rows[0]["BT_ATTORNY"].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_ATTORNY = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_ATTORNY"].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_ATTORNY = false;
                    }
                    if (set.Tables[0].Rows[0]["BT_PROVIDER"].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_PROVIDER = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_PROVIDER"].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_PROVIDER = false;
                    }
                    this.Session["BILLING_COMPANY_OBJECT"] = this._bill_Sys_BillingCompanyObject;
                    this._bill_Sys_CaseInfo            = new Bill_Sys_Case();
                    this._bill_Sys_CaseInfo.SZ_CASE_ID = "";
                    this.Session["CASE_INFO"]          = this._bill_Sys_CaseInfo;
                    this._bill_Sys_SystemObject        = new Bill_Sys_SystemObject();
                    DataView view = new DataView(set.Tables[1]);
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00003'";
                    this._bill_Sys_SystemObject.SZ_DEFAULT_LAW_FIRM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00004'";
                    this._bill_Sys_SystemObject.SZ_CHART_NO = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00007'";
                    this._bill_Sys_SystemObject.SZ_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00008'";
                    this._bill_Sys_SystemObject.SZ_CHECKINVALUE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00009'";
                    this._bill_Sys_SystemObject.AddVisits_SearchByChartNumber = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00014'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00017'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PROVIDER_DISPLAY_NAME = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00018'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00019'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00020'";
                    this._bill_Sys_SystemObject.SZ_SHOW_DOCTOR_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    this._bill_Sys_SystemObject.SZ_SHOW_DATE_OF_FIRST_TREATMENT  = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00022'";
                    this._bill_Sys_SystemObject.SZ_SHOW_NEW_POM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00023'";
                    this._bill_Sys_SystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00025'";
                    this._bill_Sys_SystemObject.ASSOCIATE_CASE_TYPE_WITH_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00026'";
                    this._bill_Sys_SystemObject.ADD_LOCATION_TO_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00024'";
                    this._bill_Sys_SystemObject.SZ_SHOW_INSURANCE_WITH_BILL = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00029'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_NF2_PDF = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00028'";
                    this._bill_Sys_SystemObject.SZ_SHOW_NF3_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00030'";
                    this._bill_Sys_SystemObject.ALLOW_TO_ADD_VISIT_FOR_FUTURE_DATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00031'";
                    this._bill_Sys_SystemObject.PHONE_FORMATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00032'";
                    this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00033'";
                    this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00034'";
                    this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00037'";
                    this._bill_Sys_SystemObject.SZ_ADD_SECONDARY_INSURANCE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00038'";
                    this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST_FOR_DIAGNOSIS_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00049'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_WALK_IN_ON_WORKAREA = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00050'";
                    this._bill_Sys_SystemObject.SZ_COPY_PATIENT_TO_TEST_FACILITY = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00054'";
                    this._bill_Sys_SystemObject.SZ_HP1_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00051'";
                    this._bill_Sys_SystemObject.SZ_MG2_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00062'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_CODE_AMOUNT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00059'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_HP1_SIGN = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00057'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_MODIFIER_TO_UPDATE_FOR_PROCEDURE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00080'";
                    this._bill_Sys_SystemObject.SZ_ADD_APPOINTMENT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00082'";
                    this._bill_Sys_SystemObject.SZ_ENABLE_CYCLIC_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00084'";
                    this._bill_Sys_SystemObject.IS_EMPLOYER = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";


                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00012'";
                    if (view.ToTable().Rows.Count > 0)
                    {
                        if (view.ToTable().Rows[0][1].ToString() == this._bill_Sys_UserObject.SZ_USER_ID)
                        {
                            this.Session["IPAdmin"] = "True";
                        }
                        else
                        {
                            this.Session["IPAdmin"] = "False";
                        }
                    }
                    else
                    {
                        this.Session["IPAdmin"] = "False";
                    }
                    DataTable table = set.Tables[2];
                    foreach (DataRow row in table.Rows)
                    {
                        if (row["SZ_CONFIGURATION"].ToString() == "SOFT DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_SOFT_DELETE = "True";
                        }
                        else
                        {
                            if (row["SZ_CONFIGURATION"].ToString() == "HARD DELETE")
                            {
                                this._bill_Sys_SystemObject.SZ_HARD_DELETE = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "NEW BILLS")
                            {
                                this._bill_Sys_SystemObject.SZ_NEW_BILL = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "VIEW BILLS")
                            {
                                this._bill_Sys_SystemObject.SZ_VIEW_BILL = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "DELETE BILLS")
                            {
                                this._bill_Sys_SystemObject.SZ_DELETE_BILLS = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "DELETE VISIT")
                            {
                                this._bill_Sys_SystemObject.SZ_DELETE_VIEWS = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "EMG BILL")
                            {
                                this._bill_Sys_SystemObject.SZ_EMG_BILL = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "NOTE DELETE")
                            {
                                this._bill_Sys_SystemObject.SZ_NOTE_DELETE = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "NOTE SOFT DELETE")
                            {
                                this._bill_Sys_SystemObject.SZ_NOTE_SOFT_DELETE = "True";
                            }
                        }
                    }
                    this.Session["SYSTEM_OBJECT"] = this._bill_Sys_SystemObject;
                    this._bill_Sys_LoginBO.ChangeLoginDate(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID);
                    this.Session["REMINDER"]  = "TRUE";
                    this.Session["IMDETAILS"] = "TRUE";
                    string str4 = set.Tables[0].Rows[0][8].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_READ_ONLY = this._bill_Sys_LoginBO.Readonly();
                    this.Session["APPSTATUS"] = this._bill_Sys_BillingCompanyObject;
                    if (str4.ToLower() == "doctor")
                    {
                        if ((set.Tables.Count > 3) && (set.Tables[3].Rows.Count > 0))
                        {
                            str = set.Tables[3].Rows[0][0].ToString();
                        }
                        if (str.ToString().Equals("IM"))
                        {
                            this.Session["PageRedirect"] = "~/Bill_Sys_IM_CheckOut.aspx";
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/AJAX Pages\Bill_Sys_PatientSearch.aspx";
                        }
                    }
                    else if (str4.ToLower() == "agent")
                    {
                        this.Session["PageRedirect"] = "~/Agent/Bill_Sys_Agent_SearchCase.aspx";
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                        {
                            string s = this.Session["urlintegration"].ToString();
                            s = base.Server.UrlEncode(s);
                            this.Session["PageRedirect"] = "~/ATT/Bill_Sys_AttorneySearch.aspx?dt=" + s;
                        }
                        if (this.Session["IntDocUrl"] != null)
                        {
                            Bill_Sys_DocumentManagerObject obj2 = new Bill_Sys_DocumentManagerObject();
                            string str6 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                            obj2 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                            string str7  = obj2.SZ_CASE_ID;
                            string str8  = obj2.SZ_CASE_NO;
                            string str9  = obj2.SZ_COMAPNY_ID;
                            string str10 = obj2.SZ_LAWFIRM_ID;
                            if (str6 == str10)
                            {
                                this.Session["PageRedirect"] = "~/Document Manager/case/vb_CaseInformation.aspx?caseid=" + str7 + "&caseno=" + str8 + "&cmpid=" + str9;
                            }
                            else
                            {
                                this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                            }
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                    {
                        if (str4.ToLower() == "provider")
                        {
                            this.Session["PageRedirect"] = @"~/Provider\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        this.Session["PageRedirect"] = @"~/ATT\Bill_Sys_AttorneySearch.aspx";
                    }
                    else if (set.Tables[0].Rows[0][6].ToString() != "")
                    {
                        this.Session["PageRedirect"] = "~/AJAX Pages/Bill_Sys_SearchCase.aspx";
                    }
                    else
                    {
                        this.Session["PageRedirect"] = "~/Bill_Sys_BillingCompany.aspx";
                    }
                    if (set.Tables[0].Rows[0]["Force_PasswordChange"].ToString() == "True")
                    {
                        base.Response.Redirect(@"AJAX Pages\Bill_Sys_ChangePassword.aspx", false);
                        return;
                    }
                    if (str4.ToLower() == "doctor")
                    {
                        if (str.ToString().Equals("IM"))
                        {
                            base.Response.Redirect("Bill_Sys_IM_CheckOut.aspx", false);
                        }
                        else
                        {
                            base.Response.Redirect(@"AJAX Pages\Bill_Sys_PatientSearch.aspx", false);
                        }
                    }
                    else if (str4.ToLower() == "agent")
                    {
                        base.Response.Redirect(@"Agent\Bill_Sys_Agent_SearchCase.aspx", false);
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                        {
                            string str11 = this.Session["urlintegration"].ToString();
                            str11 = base.Server.UrlEncode(str11);
                            str11 = "ATT/Bill_Sys_AttorneySearch.aspx?dt=" + str11;
                            base.Response.Redirect(str11, false);
                        }
                        if (this.Session["IntDocUrl"] != null)
                        {
                            Bill_Sys_DocumentManagerObject obj3 = new Bill_Sys_DocumentManagerObject();
                            obj3 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                            string str12 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                            string str13 = obj3.SZ_CASE_ID;
                            string str14 = obj3.SZ_CASE_NO;
                            string str15 = obj3.SZ_COMAPNY_ID;
                            string str16 = obj3.SZ_LAWFIRM_ID;
                            if (str12 == str16)
                            {
                                string url = "Document Manager/case/vb_CaseInformation.aspx?caseid=" + str13 + "&caseno=" + str14 + "&cmpid=" + str15;
                                base.Response.Redirect(url, false);
                            }
                            else
                            {
                                base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                            }
                        }
                        else
                        {
                            base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                    {
                        if (str4.ToLower() == "provider")
                        {
                            base.Response.Redirect(@"Provider\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        base.Response.Redirect(@"ATT\Bill_Sys_AttorneySearch.aspx", false);
                    }
                    else if (set.Tables[0].Rows[0][6].ToString() != "")
                    {
                        base.Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                    }
                    else
                    {
                        base.Response.Redirect("Bill_Sys_BillingCompany.aspx", false);
                    }
                }
                else
                {
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage();
                }
            }
            else
            {
                lblErrorMsg.Text = "Activation failed";
            }
        }
        else
        {
            lblErrorMsg.Text = "Activation failed";
        }
    }
    protected void grdpaidbills_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        this._bill_Sys_BillingCompanyDetails_BO = new Bill_Sys_BillingCompanyDetails_BO();
        DataSet set = new DataSet();

        set = (DataSet)this.Session["SORT_DS"];
        DataView defaultView = set.Tables[0].DefaultView;

        if (e.CommandName.ToString() == "workarea")
        {
            int num = Convert.ToInt32(e.CommandArgument.ToString());
            this.Session["SZ_CASE_ID"]   = this.grdpaidbills.DataKeys[num]["SZ_CASE_ID"].ToString();
            this.Session["PROVIDERNAME"] = this.grdpaidbills.DataKeys[num]["PATIENT_NAME"].ToString();
            new CaseDetailsBO();
            Bill_Sys_CaseObject obj2 = new Bill_Sys_CaseObject();
            obj2.SZ_PATIENT_ID             = this.grdpaidbills.DataKeys[num]["SZ_PATIENT_ID"].ToString();
            obj2.SZ_CASE_ID                = this.grdpaidbills.DataKeys[num]["SZ_CASE_ID"].ToString();
            obj2.SZ_CASE_NO                = this.grdpaidbills.DataKeys[num]["CASE_NO"].ToString();
            obj2.SZ_PATIENT_NAME           = this.grdpaidbills.DataKeys[num]["PATIENT_NAME"].ToString();
            obj2.SZ_COMAPNY_ID             = this._bill_Sys_BillingCompanyDetails_BO.getCompanyDetailsOfCase(this.grdpaidbills.DataKeys[num]["SZ_CASE_ID"].ToString()).SZ_COMPANY_ID;
            this.Session["CASE_OBJECT"]    = obj2;
            this._bill_Sys_Case            = new Bill_Sys_Case();
            this._bill_Sys_Case.SZ_CASE_ID = this.grdpaidbills.DataKeys[num]["SZ_CASE_ID"].ToString();
            this.Session["CASEINFO"]       = this._bill_Sys_Case;
            base.Response.Redirect("../Bill_Sys_StatusProceudure.aspx", false);
        }
        if (e.CommandName.ToString() == "appointment")
        {
            int num2 = Convert.ToInt32(e.CommandArgument.ToString());
            if (this.objSessionBillingCompany.BT_REFERRING_FACILITY)
            {
                this.Session["SZ_CASE_ID"]   = this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString();
                this.Session["PROVIDERNAME"] = this.grdpaidbills.DataKeys[num2]["PATIENT_NAME"].ToString();
                new CaseDetailsBO();
                Bill_Sys_CaseObject obj3 = new Bill_Sys_CaseObject();
                obj3.SZ_PATIENT_ID             = this.grdpaidbills.DataKeys[num2]["SZ_PATIENT_ID"].ToString();
                obj3.SZ_CASE_ID                = this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString();
                obj3.SZ_CASE_NO                = this.grdpaidbills.DataKeys[num2]["CASE_NO"].ToString();
                obj3.SZ_PATIENT_NAME           = this.grdpaidbills.DataKeys[num2]["PATIENT_NAME"].ToString();
                obj3.SZ_COMAPNY_ID             = this._bill_Sys_BillingCompanyDetails_BO.getCompanyDetailsOfCase(this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString()).SZ_COMPANY_ID;
                this.Session["CASE_OBJECT"]    = obj3;
                this._bill_Sys_Case            = new Bill_Sys_Case();
                this._bill_Sys_Case.SZ_CASE_ID = this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString();
                this.Session["CASEINFO"]       = this._bill_Sys_Case;
                DateTime time = new DateTime();
                time = Convert.ToDateTime(this.grdpaidbills.DataKeys[num2]["DT_DATE_OF_SERVICE"]);
                string str = "";
                str = "&idate=" + time.ToShortDateString();
                base.Response.Redirect("Bill_Sys_AppointPatientEntry.aspx?Flag=true" + str, false);
            }
            else
            {
                this.Session["SZ_CASE_ID"]   = this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString();
                this.Session["PROVIDERNAME"] = this.grdpaidbills.DataKeys[num2]["PATIENT_NAME"].ToString();
                new CaseDetailsBO();
                Bill_Sys_CaseObject obj4 = new Bill_Sys_CaseObject();
                obj4.SZ_PATIENT_ID             = this.grdpaidbills.DataKeys[num2]["SZ_PATIENT_ID"].ToString();
                obj4.SZ_CASE_ID                = this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString();
                obj4.SZ_CASE_NO                = this.grdpaidbills.DataKeys[num2]["CASE_NO"].ToString();
                obj4.SZ_PATIENT_NAME           = this.grdpaidbills.DataKeys[num2]["PATIENT_NAME"].ToString();
                obj4.SZ_COMAPNY_ID             = this._bill_Sys_BillingCompanyDetails_BO.getCompanyDetailsOfCase(this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString()).SZ_COMPANY_ID;
                this.Session["CASE_OBJECT"]    = obj4;
                this.Session["CASE_OBJECT"]    = obj4;
                this._bill_Sys_Case            = new Bill_Sys_Case();
                this._bill_Sys_Case.SZ_CASE_ID = this.grdpaidbills.DataKeys[num2]["SZ_CASE_ID"].ToString();
                this.Session["CASEINFO"]       = this._bill_Sys_Case;
                DateTime time2 = new DateTime();
                time2 = Convert.ToDateTime(this.grdpaidbills.DataKeys[num2]["DT_DATE_OF_SERVICE"]);
                string str2 = "?_day=" + time2.ToShortDateString() + "&idate=" + time2.ToShortDateString();
                base.Response.Redirect("Bill_Sys_ScheduleEvent.aspx" + str2, false);
            }
        }
        if (e.CommandName.ToString() == "edit")
        {
            int num3 = Convert.ToInt32(e.CommandArgument.ToString());
            new DataSet();
            Bill_Sys_BillTransaction_BO n_bo = new Bill_Sys_BillTransaction_BO();
            if (this.grdpaidbills.DataKeys[num3]["SZ_PROCEDURE_GROUP_ID"].ToString() != "")
            {
                string str3 = n_bo.GetRoomId(this.grdpaidbills.DataKeys[num3]["SZ_PROCEDURE_GROUP_ID"].ToString(), this.txtCompanyid.Text).Tables[0].Rows[0][0].ToString();
                string str4 = this.grdpaidbills.DataKeys[num3]["I_EVENT_PROC_ID"].ToString();
                this.Session["GETROOMID"]   = str3;
                this.Session["EVENTPROCID"] = str4;
            }
            else
            {
                string str5 = this.grdpaidbills.DataKeys[num3]["I_EVENT_PROC_ID"].ToString();
                this.Session["GETROOMID"]   = "All";
                this.Session["EVENTPROCID"] = str5;
            }
            ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "mmupdateproc", "showProcPopup();", true);
        }
        if (e.CommandName.ToString() == "view")
        {
            int    num4 = Convert.ToInt32(e.CommandArgument.ToString());
            string str6 = this.grdpaidbills.DataKeys[num4]["SZ_CASE_ID"].ToString();
            string str7 = this.grdpaidbills.DataKeys[num4]["I_EVENT_PROC_ID"].ToString();
            string str8 = this.grdpaidbills.DataKeys[num4]["sz_procedure_group"].ToString();
            ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "mmupdate", "ViewDocumentPopup('" + str6 + "','" + str7 + "','" + str8 + "');", true);
        }
        if (e.CommandName.ToString() == "Edit")
        {
            int num5 = Convert.ToInt32(e.CommandArgument.ToString());
            new DataSet();
            Bill_Sys_BillTransaction_BO n_bo2 = new Bill_Sys_BillTransaction_BO();
            if ((this.grdpaidbills.DataKeys[num5]["sz_procedure_group"].ToString().ToUpper() != "OT") && (this.grdpaidbills.DataKeys[num5]["sz_procedure_group"].ToString().ToUpper() != ""))
            {
                string str9  = n_bo2.GetRoomId(this.grdpaidbills.DataKeys[num5]["SZ_PROCEDURE_GROUP_ID"].ToString(), this.txtCompanyid.Text).Tables[0].Rows[0][0].ToString();
                string str10 = this.grdpaidbills.DataKeys[num5]["I_EVENT_PROC_ID"].ToString();
                this.Session["GETROOMID"]   = str9;
                this.Session["EVENTPROCID"] = str10;
            }
            else
            {
                string str11 = this.grdpaidbills.DataKeys[num5]["I_EVENT_PROC_ID"].ToString();
                this.Session["GETROOMID"]   = "All";
                this.Session["EVENTPROCID"] = str11;
            }
            string    str12 = this.grdpaidbills.DataKeys[num5]["I_EVENT_PROC_ID"].ToString();
            string    str13 = this.grdpaidbills.DataKeys[num5]["SZ_CASE_ID"].ToString();
            string    str14 = this.grdpaidbills.DataKeys[num5]["SZ_PROCEDURE_GROUP_ID"].ToString();
            string    str15 = this.grdpaidbills.DataKeys[num5]["SZ_PATIENT_ID"].ToString();
            string    str16 = this.grdpaidbills.DataKeys[num5]["I_EVENT_ID"].ToString();
            string    str17 = this.grdpaidbills.DataKeys[num5]["sz_procedure_group"].ToString();
            ArrayList list  = new ArrayList();
            ArrayList list2 = new ArrayList();
            list2.Add(this.grdpaidbills.DataKeys[num5]["I_EVENT_ID"].ToString());
            Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();
            diagnosis.EventProcID        = this.grdpaidbills.DataKeys[num5]["I_EVENT_PROC_ID"].ToString();
            diagnosis.DoctorID           = this.grdpaidbills.DataKeys[num5]["SZ_DOCTOR_ID"].ToString();
            diagnosis.CaseID             = this.grdpaidbills.DataKeys[num5]["SZ_CASE_ID"].ToString();
            diagnosis.ProceuderGroupId   = this.grdpaidbills.DataKeys[num5]["SZ_PROCEDURE_GROUP_ID"].ToString();
            diagnosis.ProceuderGroupName = this.grdpaidbills.DataKeys[num5]["sz_procedure_group"].ToString();
            diagnosis.PatientId          = this.grdpaidbills.DataKeys[num5]["SZ_PATIENT_ID"].ToString();
            diagnosis.DateOfService      = this.grdpaidbills.DataKeys[num5]["DT_DATE_OF_SERVICE"].ToString();
            diagnosis.ProcedureCode      = this.grdpaidbills.DataKeys[num5]["SZ_PROC_CODE"].ToString();
            diagnosis.CompanyId          = this.txtCompanyid.Text;
            list.Add(diagnosis);
            this.Session["DIAGNOS_ASSOCIATION_PAID"] = list;
            new DataSet();
            n_bo2.GetRoomId(str14, this.txtCompanyid.Text);
            string text  = this.grdpaidbills.Rows[num5].Cells[9].Text;
            string str19 = this.grdpaidbills.Rows[num5].Cells[10].Text;
            Bill_Sys_ProcedureCode_BO e_bo = new Bill_Sys_ProcedureCode_BO();
            if (e_bo.Get_Sys_Key("SS00014", this.txtCompanyid.Text).Tables[0].Rows[0][0].ToString() == "1")
            {
                this.Session["EVENT_ID"] = list2;
            }
            ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "mmupdateproc", "showEditPopup('" + str13 + "','" + str12 + "','" + str14 + "','" + str15 + "','" + str16 + "','" + str17 + "','" + str19 + "','" + text + "');", true);
        }
    }
Exemple #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        _associateDiagnosisCodeBO = new Bill_Sys_AssociateDiagnosisCodeBO();
        try
        {
            btnAssign.Attributes.Add("onclick", "return formValidator('frmAssociateDignosisCode','extddlDoctor');");
            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

            extddlDoctor.Flag_ID   = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlAPDoctor.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

            if (!IsPostBack)
            {
                if (Request.QueryString["CaseId"] != null)
                {
                    Session["CASE_OBJECT"] = null;
                    txtCaseID.Text         = Request.QueryString["CaseId"].ToString();
                    GetPatientDeskList();
                }
                else if (Session["CASE_OBJECT"] != null)
                {
                    txtCaseID.Text = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    //////////////////////
                    //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                    Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                    _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                    Session["CASEINFO"] = _bill_Sys_Case;

                    Session["PassedCaseID"] = txtCaseID.Text;
                    String szURL    = "";
                    String szCaseID = Session["PassedCaseID"].ToString();
                    Session["QStrCaseID"]   = szCaseID;
                    Session["Case_ID"]      = szCaseID;
                    Session["Archived"]     = "0";
                    Session["QStrCID"]      = szCaseID;
                    Session["SelectedID"]   = szCaseID;
                    Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["SN"]           = "0";
                    Session["LastAction"]   = "vb_CaseInformation.aspx";


                    Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                    Session["TM_SZ_CASE_ID"] = txtCaseID.Text;
                    GetPatientDeskList();
                    //
                    ///////////////////
                }

                else
                {
                    Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }

                strCaseType = _associateDiagnosisCodeBO.GetCaseType(txtCaseID.Text);
                if (Request.QueryString["DoctorID"] != null)
                {
                    extddlDoctor.Text    = Request.QueryString["DoctorID"].ToString();
                    extddlDoctor.Enabled = false;
                    GetDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, extddlDoctor.Text, "GET_DIAGNOSIS_CODE");
                }
                if (Request.QueryString["SetId"] != null)
                {
                    txtDiagnosisSetID.Text = Request.QueryString["SetId"].ToString();
                    _ds = _associateDiagnosisCodeBO.GetCaseAssociateDiagnosisDetails(txtDiagnosisSetID.Text);
                    extddlDoctor.Text = _ds.Tables[0].Rows[0].ItemArray.GetValue(3).ToString();
                    GetDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, extddlDoctor.Text, "GET_DIAGNOSIS_CODE");
                    //GetPTDiagnosisCode(extddlDoctor.Text, Request.QueryString["SetId"].ToString(), "GET_PT_DIAGNOSIS_CODE");
                    //GetEvaluationDiagnosisCode(extddlDoctor.Text, Request.QueryString["SetId"].ToString(), "GET_EVALUATION_DIAGNOSIS_CODE");
                    Visiblecontrol();
                    //BindControl();
                }
                else
                {
                    txtDiagnosisSetID.Text = _associateDiagnosisCodeBO.GetDiagnosisSetID();
                }

                if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                {
                    extddlAPDoctor.Visible = false;
                    extddlDoctor.Visible   = false;
                    lblDoctor.Visible      = false;
                    lblDeDoctor.Visible    = false;
                    GetDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                    GetAssignedDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                }
            }
            lblMsg.Text = "";
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_AssociateDignosisCode.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #13
0
    private void UserLogin()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        if (this.Session["UserName"] == null)
        {
        }
        try
        {
            string str  = "";
            string str2 = "";
            if (base.Request.QueryString["name"] != null)
            {
                str2 = base.Request.QueryString["name"].ToString();
            }
            new ArrayList();
            this._bill_Sys_LoginBO = new Bill_Sys_LoginBO();
            DataSet set = new DataSet();
            set = this._bill_Sys_LoginBO.getLoginDetails(this.Session["UserName"].ToString(), str2, HttpContext.Current.Request.UserHostAddress);
            if ((set.Tables.Count > 0) && (set.Tables[0].Rows.Count > 0))
            {
                this.objAppSettings = (ApplicationSettings_BO)base.Application["OBJECT_APP_SETTINGS"];
                if (this.objAppSettings == null)
                {
                    this.objAppSettings = new ApplicationSettings_BO();
                    base.Application["OBJECT_APP_SETTINGS"] = this.objAppSettings;
                }
                if ((set.Tables[0].Rows.Count == 1) && (set.Tables[0].Rows[0][0].ToString() == "False"))
                {
                    string str3 = HttpContext.Current.Request.UserHostAddress.ToString();
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage("IPValidationCheck=false&InvalidIP=" + str3);
                    return;
                }
                this._bill_Sys_UserObject                           = new Bill_Sys_UserObject();
                this._bill_Sys_UserObject.SZ_USER_ID                = set.Tables[0].Rows[0][0].ToString();
                this._bill_Sys_UserObject.SZ_USER_NAME              = set.Tables[0].Rows[0][1].ToString();
                this._bill_Sys_UserObject.SZ_USER_ROLE              = set.Tables[0].Rows[0][4].ToString();
                this._bill_Sys_UserObject.SZ_PROVIDER_ID            = set.Tables[0].Rows[0][5].ToString();
                this._bill_Sys_UserObject.SZ_USER_ROLE_NAME         = set.Tables[0].Rows[0][8].ToString();
                this._bill_Sys_UserObject.SZ_USER_EMAIL             = set.Tables[0].Rows[0]["USER_EMAIL_ID"].ToString();
                this._bill_Sys_UserObject.DomainName                = set.Tables[0].Rows[0]["DomainName"].ToString();
                this.Session["USER_OBJECT"]                         = this._bill_Sys_UserObject;
                this._bill_Sys_BillingCompanyObject                 = new Bill_Sys_BillingCompanyObject();
                this._bill_Sys_BillingCompanyObject.SZ_COMPANY_ID   = set.Tables[0].Rows[0][2].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_COMPANY_NAME = set.Tables[0].Rows[0][3].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_PREFIX       = set.Tables[0].Rows[0][6].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_ADDRESS      = set.Tables[0].Rows[0][9].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_EMAIL        = set.Tables[0].Rows[0][10].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_PHONE        = set.Tables[0].Rows[0][11].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_FAX          = set.Tables[0].Rows[0][12].ToString();
                if (set.Tables[0].Rows[0][7].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = Convert.ToBoolean(set.Tables[0].Rows[0][7].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = false;
                }
                if (set.Tables[0].Rows[0][13].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = Convert.ToBoolean(set.Tables[0].Rows[0][13].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = false;
                }
                if (set.Tables[0].Rows[0]["BT_ATTORNY"].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_ATTORNY = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_ATTORNY"].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_ATTORNY = false;
                }
                if (set.Tables[0].Rows[0]["BT_PROVIDER"].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_PROVIDER = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_PROVIDER"].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_PROVIDER = false;
                }
                this.Session["BILLING_COMPANY_OBJECT"] = this._bill_Sys_BillingCompanyObject;
                //Custom schedular
                Session["Billing_Company_ID"]      = _bill_Sys_BillingCompanyObject.SZ_COMPANY_ID;
                this._bill_Sys_CaseInfo            = new Bill_Sys_Case();
                this._bill_Sys_CaseInfo.SZ_CASE_ID = "";
                this.Session["CASE_INFO"]          = this._bill_Sys_CaseInfo;
                this._bill_Sys_SystemObject        = new Bill_Sys_SystemObject();
                DataView view = new DataView(set.Tables[1]);
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00003'";
                this._bill_Sys_SystemObject.SZ_DEFAULT_LAW_FIRM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00004'";
                this._bill_Sys_SystemObject.SZ_CHART_NO = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00007'";
                this._bill_Sys_SystemObject.SZ_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00008'";
                this._bill_Sys_SystemObject.SZ_CHECKINVALUE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00009'";
                this._bill_Sys_SystemObject.AddVisits_SearchByChartNumber = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00014'";
                this._bill_Sys_SystemObject.SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00017'";
                this._bill_Sys_SystemObject.SZ_SHOW_PROVIDER_DISPLAY_NAME = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00018'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00019'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00020'";
                this._bill_Sys_SystemObject.SZ_SHOW_DOCTOR_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                this._bill_Sys_SystemObject.SZ_SHOW_DATE_OF_FIRST_TREATMENT  = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00022'";
                this._bill_Sys_SystemObject.SZ_SHOW_NEW_POM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00023'";
                this._bill_Sys_SystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00025'";
                this._bill_Sys_SystemObject.ASSOCIATE_CASE_TYPE_WITH_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00026'";
                this._bill_Sys_SystemObject.ADD_LOCATION_TO_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00024'";
                this._bill_Sys_SystemObject.SZ_SHOW_INSURANCE_WITH_BILL = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00029'";
                this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_NF2_PDF = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00028'";
                this._bill_Sys_SystemObject.SZ_SHOW_NF3_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00030'";
                this._bill_Sys_SystemObject.ALLOW_TO_ADD_VISIT_FOR_FUTURE_DATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00031'";
                this._bill_Sys_SystemObject.PHONE_FORMATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00032'";
                this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00033'";
                this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00034'";
                this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00037'";
                this._bill_Sys_SystemObject.SZ_ADD_SECONDARY_INSURANCE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00038'";
                this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST_FOR_DIAGNOSIS_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00049'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_WALK_IN_ON_WORKAREA = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00050'";
                this._bill_Sys_SystemObject.SZ_COPY_PATIENT_TO_TEST_FACILITY = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00054'";
                this._bill_Sys_SystemObject.SZ_HP1_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00051'";
                this._bill_Sys_SystemObject.SZ_MG2_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00062'";
                this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_CODE_AMOUNT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00059'";
                this._bill_Sys_SystemObject.SZ_ALLOW_HP1_SIGN = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00057'";
                this._bill_Sys_SystemObject.SZ_ALLOW_MODIFIER_TO_UPDATE_FOR_PROCEDURE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00080'";
                this._bill_Sys_SystemObject.SZ_ADD_APPOINTMENT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00082'";
                this._bill_Sys_SystemObject.SZ_ENABLE_CYCLIC_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00084'";
                this._bill_Sys_SystemObject.IS_EMPLOYER = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00086'";
                this._bill_Sys_SystemObject.SZ_ENABLE_CONTRACT_PDF_GENERATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";


                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00012'";
                if (view.ToTable().Rows.Count > 0)
                {
                    if (view.ToTable().Rows[0][1].ToString() == this._bill_Sys_UserObject.SZ_USER_ID)
                    {
                        this.Session["IPAdmin"] = "True";
                    }
                    else
                    {
                        this.Session["IPAdmin"] = "False";
                    }
                }
                else
                {
                    this.Session["IPAdmin"] = "False";
                }
                DataTable table = set.Tables[2];
                foreach (DataRow row in table.Rows)
                {
                    if (row["SZ_CONFIGURATION"].ToString() == "SOFT DELETE")
                    {
                        this._bill_Sys_SystemObject.SZ_SOFT_DELETE = "True";
                    }
                    else
                    {
                        if (row["SZ_CONFIGURATION"].ToString() == "HARD DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_HARD_DELETE = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NEW BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_NEW_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "VIEW BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_VIEW_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "DELETE BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_DELETE_BILLS = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "DELETE VISIT")
                        {
                            this._bill_Sys_SystemObject.SZ_DELETE_VIEWS = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "EMG BILL")
                        {
                            this._bill_Sys_SystemObject.SZ_EMG_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NOTE DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_NOTE_DELETE = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NOTE SOFT DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_NOTE_SOFT_DELETE = "True";
                        }
                    }
                }
                this.Session["SYSTEM_OBJECT"] = this._bill_Sys_SystemObject;
                this._bill_Sys_LoginBO.ChangeLoginDate(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID);
                this.Session["REMINDER"]  = "TRUE";
                this.Session["IMDETAILS"] = "TRUE";
                string str4 = set.Tables[0].Rows[0][8].ToString();
                if (str4.ToLower() == "doctor")
                {
                    if ((set.Tables.Count > 3) && (set.Tables[3].Rows.Count > 0))
                    {
                        str = set.Tables[3].Rows[0][0].ToString();
                    }
                    if (str.ToString().Equals("IM"))
                    {
                        this.Session["PageRedirect"] = "~/Bill_Sys_IM_CheckOut.aspx";
                    }
                    else
                    {
                        this.Session["PageRedirect"] = @"~/AJAX Pages\Bill_Sys_PatientSearch.aspx";
                    }
                }
                else if (str4.ToLower() == "agent")
                {
                    this.Session["PageRedirect"] = "~/Agent/Bill_Sys_Agent_SearchCase.aspx";
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                    {
                        string s = this.Session["urlintegration"].ToString();
                        s = base.Server.UrlEncode(s);
                        this.Session["PageRedirect"] = "~/ATT/Bill_Sys_AttorneySearch.aspx?dt=" + s;
                    }
                    if (this.Session["IntDocUrl"] != null)
                    {
                        Bill_Sys_DocumentManagerObject obj2 = new Bill_Sys_DocumentManagerObject();
                        string str6 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        obj2 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                        string str7  = obj2.SZ_CASE_ID;
                        string str8  = obj2.SZ_CASE_NO;
                        string str9  = obj2.SZ_COMAPNY_ID;
                        string str10 = obj2.SZ_LAWFIRM_ID;
                        if (str6 == str10)
                        {
                            this.Session["PageRedirect"] = "~/Document Manager/case/vb_CaseInformation.aspx?caseid=" + str7 + "&caseno=" + str8 + "&cmpid=" + str9;
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else
                    {
                        this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                {
                    if (str4.ToLower() == "provider")
                    {
                        this.Session["PageRedirect"] = @"~/Provider\Bill_Sys_SearchCase.aspx";
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    this.Session["PageRedirect"] = @"~/ATT\Bill_Sys_AttorneySearch.aspx";
                }
                else if (set.Tables[0].Rows[0][6].ToString() != "")
                {
                    this.Session["PageRedirect"] = "~/AJAX Pages/Bill_Sys_SearchCase.aspx";
                }
                else
                {
                    this.Session["PageRedirect"] = "~/Bill_Sys_BillingCompany.aspx";
                }
                if (set.Tables[0].Rows[0]["Force_PasswordChange"].ToString() == "True")
                {
                    base.Response.Redirect(@"AJAX Pages\Bill_Sys_ChangePassword.aspx", false);
                    return;
                }
                if (str4.ToLower() == "doctor")
                {
                    if (str.ToString().Equals("IM"))
                    {
                        base.Response.Redirect("Bill_Sys_IM_CheckOut.aspx", false);
                    }
                    else
                    {
                        base.Response.Redirect(@"AJAX Pages\Bill_Sys_PatientSearch.aspx", false);
                    }
                }
                else if (str4.ToLower() == "agent")
                {
                    base.Response.Redirect(@"Agent\Bill_Sys_Agent_SearchCase.aspx", false);
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                    {
                        string str11 = this.Session["urlintegration"].ToString();
                        str11 = base.Server.UrlEncode(str11);
                        str11 = "ATT/Bill_Sys_AttorneySearch.aspx?dt=" + str11;
                        base.Response.Redirect(str11, false);
                    }
                    if (this.Session["IntDocUrl"] != null)
                    {
                        Bill_Sys_DocumentManagerObject obj3 = new Bill_Sys_DocumentManagerObject();
                        obj3 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                        string str12 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        string str13 = obj3.SZ_CASE_ID;
                        string str14 = obj3.SZ_CASE_NO;
                        string str15 = obj3.SZ_COMAPNY_ID;
                        string str16 = obj3.SZ_LAWFIRM_ID;
                        if (str12 == str16)
                        {
                            string url = "Document Manager/case/vb_CaseInformation.aspx?caseid=" + str13 + "&caseno=" + str14 + "&cmpid=" + str15;
                            base.Response.Redirect(url, false);
                        }
                        else
                        {
                            base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else
                    {
                        base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                {
                    if (str4.ToLower() == "provider")
                    {
                        base.Response.Redirect(@"Provider\Bill_Sys_SearchCase.aspx", false);
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    base.Response.Redirect(@"ATT\Bill_Sys_AttorneySearch.aspx", false);
                }
                else if (set.Tables[0].Rows[0][6].ToString() != "")
                {
                    base.Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                }
                else
                {
                    base.Response.Redirect("Bill_Sys_BillingCompany.aspx", false);
                }
            }
            else
            {
                FormsAuthentication.SignOut();
                FormsAuthentication.RedirectToLoginPage();
            }
            this._bill_Sys_BillingCompanyObject.SZ_READ_ONLY = this._bill_Sys_LoginBO.Readonly();
            this.Session["APPSTATUS"] = this._bill_Sys_BillingCompanyObject;
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            txtCompanyID.Text            = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlDoctorNameList.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlDoctor.Flag_ID         = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            if (!IsPostBack)
            {
                if (Request.QueryString["PatientID"] != null)
                {
                    if (Request.QueryString["PatientID"].ToString() != "")
                    {
                        CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                        Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                        _bill_Sys_CaseObject.SZ_CASE_ID    = _caseDetailsBO.GetCasePatientID("", Request.QueryString["PatientID"].ToString());
                        _bill_Sys_CaseObject.SZ_PATIENT_ID = Request.QueryString["PatientID"].ToString();
                        _bill_Sys_CaseObject.SZ_COMAPNY_ID = Request.QueryString["companyId"].ToString();
                        Session["CASE_OBJECT"]             = _bill_Sys_CaseObject;
                    }
                }

                if (Session["CASE_OBJECT"] != null)
                {
                    txtPatientID.Text = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_PATIENT_ID;


                    //////////////////////
                    //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                    Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                    _bill_Sys_Case.SZ_CASE_ID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;

                    Session["CASEINFO"] = _bill_Sys_Case;

                    Session["PassedCaseID"] = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    String szURL    = "";
                    String szCaseID = Session["PassedCaseID"].ToString();
                    Session["QStrCaseID"]   = szCaseID;
                    Session["Case_ID"]      = szCaseID;
                    Session["Archived"]     = "0";
                    Session["QStrCID"]      = szCaseID;
                    Session["SelectedID"]   = szCaseID;
                    Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                    Session["SN"]           = "0";
                    Session["LastAction"]   = "vb_CaseInformation.aspx";


                    Session["SZ_CASE_ID_NOTES"] = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;

                    Session["TM_SZ_CASE_ID"] = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    GetPatientDeskList();
                    //
                    ///////////////////
                }
                else
                {
                    Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }

                //

                if (Request.QueryString["DoctorID"] != null)
                {
                    tabcontainerPatientTreatment.ActiveTabIndex = 3;
                    extddlDoctorNameList.Text = Request.QueryString["DoctorID"].ToString();
                    txtVisitDateFrom.Text     = Convert.ToDateTime(Request.QueryString["Date"]).ToShortDateString();
                    GetTestList();
                    extddlDoctor.Text = Request.QueryString["DoctorID"].ToString();
                    BindViewTreatmentList();
                    lstTest.SelectedValue = Request.QueryString["TypeCode"].ToString();
                }

                BindLatestTreatmentlist();
                BindSummaryTreatmentList();
                GetTotalTreatmentCountAndDate();
                BindBilledTest();
                Bind_Billed_UnBilled_Count();
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_Tests.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #15
0
    protected void grdAllReports_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            #region "Document Manager"
            if (e.CommandName == "Document Manager")
            {
                // Create Session for document Manager
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[2].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[13].Text.ToString();//13
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.CommandArgument.ToString();
                String szURL    = "";
                String szCaseID = e.CommandArgument.ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                //    Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
                Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");
            }
            #endregion

            #region "Display Diagnosis Code"
            if (e.CommandName == "Display Diag Code")
            {
                objAL = new ArrayList();
                objAL.Add(e.Item.Cells[0].Text.ToString());
                objAL.Add(e.Item.Cells[1].Text.ToString());
                objAL.Add("");
                objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                BindGrid_DisplayDiagonosisCode(objAL);
                Session["DIAGINFO"] = objAL;
            }
            #endregion

            #region "Add Diagnosis Code"
            if (e.CommandName == "Add Diagnosis Code")
            {
                objAL = new ArrayList();
                objAL.Add(e.Item.Cells[0].Text.ToString());
                objAL.Add(e.Item.Cells[1].Text.ToString());
                objAL.Add(e.Item.Cells[2].Text.ToString());
                objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                Session["DIAGINFO"] = objAL;
                ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "showDiagnosisCodePopup();", true);
            }
            #endregion

            #region "Open Case Details"
            if (e.CommandName == "Open Case")
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[2].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[13].Text.ToString();//13
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.CommandArgument.ToString();
                String szURL    = "";
                String szCaseID = e.CommandArgument.ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
            }
            #endregion


            #region "Add Group Service"

            if (e.CommandName == "Group Service")
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[2].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[13].Text.ToString();//13
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.CommandArgument.ToString();
                String szURL    = "";
                String szCaseID = e.CommandArgument.ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "setDiv('" + e.Item.Cells[1].Text.ToString() + "',EID='" + e.Item.Cells[15].Text.ToString() + "');", true); //15
            }

            #endregion
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }

        this.Page.LoadComplete += new EventHandler(Page_Load_Complete);
        log.Debug("Bill_Sys_Casedetails. Method - Page_Load_Start : " + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString() + ":" + DateTime.Now.Millisecond.ToString());
        //ScriptManager.RegisterClientScriptBlock(this, GetType(), "ss", "plusvisibleimage();", true);

        //string urlleft = Request.Url.GetLeftPart(UriPartial.Path);
        //string url = Request.Url.ToString();

        string Param = Request.QueryString["dt"].ToString();

        string changeParam = WebUtils.DecodeUrlString(Param);

        String strPassPhrase         = "Pas5pr@se";        // can be any string
        String strSaltValue          = "s@1tValue";        // can be any string
        String strHashAlgorithm      = "SHA1";             // can be "MD5"
        int    intPasswordIterations = 2;                  // can be any number
        String strInitVector         = "@1B2c3D4e5F6g7H8"; // must be 16 bytes
        int    intKeySize            = 256;

        string decrupt = Bill_Sys_EncryDecry.Decrypt(changeParam, strPassPhrase, strSaltValue, strHashAlgorithm, intPasswordIterations, strInitVector, intKeySize);

        //string decryptUrl = urlleft+"?" + decrupt;

        string[] spl = decrupt.Split('&');

        string caseid = spl[0].Replace("CaseID=", "");
        string id_    = spl[1].Replace("cmp=", "");

        string compnyid = id_.Replace("'", "");

        try
        {
            if (!IsPostBack)
            {
                if (caseid != null)
                {
                    //caseID = caseid;
                    if (caseid.ToString() != "")
                    {
                        CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                        Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                        _bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(caseid.ToString(), "");
                        _bill_Sys_CaseObject.SZ_CASE_ID    = caseid.ToString();
                        if (compnyid != null)
                        {
                            _bill_Sys_CaseObject.SZ_CASE_NO = _caseDetailsBO.GetCaseNo(_bill_Sys_CaseObject.SZ_CASE_ID, compnyid.ToString());
                            Session["company"] = compnyid.ToString();
                        }
                        else
                        {
                            _bill_Sys_CaseObject.SZ_CASE_NO = _caseDetailsBO.GetCaseNo(_bill_Sys_CaseObject.SZ_CASE_ID, Session["company"].ToString());
                        }

                        _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                        _bill_Sys_CaseObject.SZ_COMAPNY_ID   = Session["company"].ToString();
                        Session["CASE_OBJECT"] = _bill_Sys_CaseObject;
                    }
                }
                if (Session["CASE_OBJECT"] != null)
                {
                    txtCaseID.Text     = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    Session["company"] = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
                }
                else
                {
                    Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }

                LoadNoteGrid();
                caseID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                ShowPopupNotes(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID);


                //hlnkAssociate.Visible = true;
                grdAssociatedDiagnosisCode.Visible = false;
                //divAssociatedCode.Visible = true;
                _bill_Sys_ProcedureCode_BO            = new Bill_Sys_ProcedureCode_BO();
                grdAssociatedDiagnosisCode.DataSource = _bill_Sys_ProcedureCode_BO.GetAssociatedDiagnosisCode_List(caseID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID).Tables[0];
                grdAssociatedDiagnosisCode.DataBind();
                //////////////////////
                //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                Session["CASEINFO"] = _bill_Sys_Case;

                Session["PassedCaseID"] = txtCaseID.Text;
                String szURL    = "";
                String szCaseID = Session["PassedCaseID"].ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";


                Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                Session["TM_SZ_CASE_ID"] = txtCaseID.Text;

                LoadDataOnPage();
                UserPatientInfoControl.GetPatienDeskList(((Bill_Sys_CaseObject)(Session["CASE_OBJECT"])).SZ_CASE_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            }


            if (!IsPostBack)
            {
                ReminderBO objReminder = null;
                DataSet    dsReminder  = null;
                string     strUserId   = "";
                string     SzCaseID    = "";
                DateTime   dtCurrent_Date;
                objReminder    = new ReminderBO();
                dsReminder     = new DataSet();
                strUserId      = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
                SzCaseID       = txtCaseID.Text;
                dtCurrent_Date = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
                dsReminder     = objReminder.LoadReminderDetailsForCaseDeatils(strUserId, dtCurrent_Date, SzCaseID);
            }

            log.Debug("Bill_Sys_Casedetails. Method - Page_Load_End : " + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString() + ":" + DateTime.Now.Millisecond.ToString());
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_CaseDetails.aspx");
        }
        #endregion

        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #17
0
    protected void grdCaseMaster_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "CaseSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
            if (e.CommandName.ToString() == "ChartNoSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
            if (e.CommandName.ToString() == "PatientSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
            if (e.CommandName.ToString() == "DOASearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
            if (e.CommandName.ToString() == "CASETYPESearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
            if (e.CommandName.ToString() == "DOOSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
            if (e.CommandName.ToString() == "Select")
            {
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = _caseDetailsBO.GetCasePatientID(e.CommandArgument.ToString(), "");
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = e.Item.Cells[34].Text;
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = e.Item.Cells[31].Text;
                Session["CASE_OBJECT"] = _bill_Sys_CaseObject;

                _bill_Sys_Case            = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();

                Session["CASEINFO"] = _bill_Sys_Case;
                if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID != e.Item.Cells[28].Text)
                {
                    Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                }
                else
                {
                    Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                }
            }

            else if (e.CommandName.ToString() == "Bill Transaction")
            {
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = _caseDetailsBO.GetCasePatientID(e.CommandArgument.ToString(), "");
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = e.Item.Cells[34].Text;
                Session["CASE_OBJECT"]    = _bill_Sys_CaseObject;
                _bill_Sys_Case            = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();

                Session["CASEINFO"] = _bill_Sys_Case;

                Response.Redirect("Bill_Sys_BillTransaction.aspx", false);
            }
            else if (e.CommandName.ToString() == "View Bills")
            {
                Session["SZ_CASE_ID"] = e.CommandArgument;

                _bill_Sys_Case            = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();

                Session["CASEINFO"] = _bill_Sys_Case;

                Response.Redirect("Bill_Sys_BillSearch.aspx", false);
            }
            else if (e.CommandName.ToString() == "Document Manager")
            {
                // Create Session for document Manager
                Session["PassedCaseID"] = e.CommandArgument;
                String szURL    = "";
                String szCaseID = Session["PassedCaseID"].ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                //    Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
                Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");
            }
            else if (e.CommandName.ToString() == "Calender Event")
            {
                LinkButton lnkPatient = (LinkButton)e.Item.Cells[0].FindControl("lnkSelectCase");
                Session["SZ_CASE_ID"]   = lnkPatient.CommandArgument;
                Session["PROVIDERNAME"] = e.CommandArgument;

                Response.Redirect("Bill_Sys_ScheduleEvent.aspx", false);
                //Response.Redirect("Bill_Sys_CalendarEvent.aspx", false);
                //    string szTemplateURL="Bill_Sys_TemplateManager.aspx";
                //string szTemplateURL = "TemplateManager/Bill_Sys_GeneratePDF.aspx";
                //Session["PassedCaseID"] = e.CommandArgument;
                //Response.Write("<script language='javascript'>window.open('" + szTemplateURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
            }
            else if (e.CommandName.ToString() == "Out Calender Event")
            {
                LinkButton lnkPatient = (LinkButton)e.Item.Cells[0].FindControl("lnkOutScheduleCalendarEvent");
                Session["SZ_CASE_ID"]   = lnkPatient.CommandArgument;
                Session["PROVIDERNAME"] = e.CommandArgument;
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(e.CommandArgument.ToString(), "");
                _bill_Sys_CaseObject.SZ_CASE_ID    = e.CommandArgument.ToString();
                Session["CASE_OBJECT"]             = _bill_Sys_CaseObject;
                Response.Redirect("Bill_Sys_AppointPatientEntry.aspx?Flag=true", false);
                //Response.Redirect("Bill_Sys_CalendarEvent.aspx", false);
                //    string szTemplateURL="Bill_Sys_TemplateManager.aspx";
                //string szTemplateURL = "TemplateManager/Bill_Sys_GeneratePDF.aspx";
                //Session["PassedCaseID"] = e.CommandArgument;
                //Response.Write("<script language='javascript'>window.open('" + szTemplateURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
            }

            else if (e.CommandName.ToString() == "Template Manager")
            {
                Session["TM_SZ_CASE_ID"] = e.CommandArgument;
                //       Session["PROVIDERNAME"] = e.Item.Cells[4].Text;
                //       Response.Redirect("TemplateManager/templates.aspx", false);

                String szURL = "";
                szURL = "TemplateManager/templates.aspx";


                //      Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");

                Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");

                //    string szTemplateURL="Bill_Sys_TemplateManager.aspx";
                //string szTemplateURL = "TemplateManager/Bill_Sys_GeneratePDF.aspx";
                //Session["PassedCaseID"] = e.CommandArgument;
                //Response.Write("<script language='javascript'>window.open('" + szTemplateURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
            }
            //else if (e.CommandName.ToString() == "PatientHistory")
            //{
            //    String szURL = "";
            //    Session["PassedCaseID"] = e.CommandArgument;
            //    szURL = "PatientHistory.aspx";
            //    Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");
            //}
        }
        catch (Exception ex)
        {
            log.Debug("Bill_Sys_SearchCase. Method - grdCaseMaster_ItemCommand : " + ex.Message.ToString());
            log.Debug("Bill_Sys_SearchCase. Method - grdCaseMaster_ItemCommand : " + ex.StackTrace.ToString());
            log.Debug("Bill_Sys_SearchCase. Method - grdCaseMaster_ItemCommand : " + ex.InnerException.Message.ToString());
            log.Debug("Bill_Sys_SearchCase. Method - grdCaseMaster_ItemCommand : " + ex.InnerException.StackTrace.ToString());
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemple #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        this._associateDiagnosisCodeBO = new Bill_Sys_AssociateDiagnosisCodeBO();
        try
        {
            this.btnAssign.Attributes.Add("onclick", "return validate();");
            this.txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            this.txtDiagonosisCode.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('_ctl0_ContentPlaceHolder1_tabcontainerDiagnosisCode_tabpnlAssociate_btnSeacrh').click(); return false;}} else {alert('Other');return true;}; ");
            if (!base.IsPostBack)
            {
                this.extddlDiagnosisType.Flag_ID = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                this.extddlSpeciality.Flag_ID    = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                if (base.Request.QueryString["CaseId"] != null)
                {
                    this.Session["CASE_OBJECT"] = null;
                    this.txtCaseID.Text         = base.Request.QueryString["CaseId"].ToString();
                    this.GetPatientDeskList();
                }
                else if (this.Session["CASE_OBJECT"] != null)
                {
                    this.txtCaseID.Text = ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"]).SZ_CASE_ID;
                    Bill_Sys_Case @case = new Bill_Sys_Case();
                    @case.SZ_CASE_ID             = this.txtCaseID.Text;
                    this.Session["CASEINFO"]     = @case;
                    this.Session["PassedCaseID"] = this.txtCaseID.Text;
                    string str = this.Session["PassedCaseID"].ToString();
                    this.Session["QStrCaseID"]       = str;
                    this.Session["Case_ID"]          = str;
                    this.Session["Archived"]         = "0";
                    this.Session["QStrCID"]          = str;
                    this.Session["SelectedID"]       = str;
                    this.Session["DM_User_Name"]     = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                    this.Session["User_Name"]        = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                    this.Session["SN"]               = "0";
                    this.Session["LastAction"]       = "vb_CaseInformation.aspx";
                    this.Session["SZ_CASE_ID_NOTES"] = this.txtCaseID.Text;
                    this.Session["TM_SZ_CASE_ID"]    = this.txtCaseID.Text;
                    this.GetPatientDeskList();
                }
                else
                {
                    base.Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }
                this.strCaseType = this._associateDiagnosisCodeBO.GetCaseType(this.txtCaseID.Text);
                string text1 = base.Request.QueryString["DoctorID"];
                if (base.Request.QueryString["SetId"] != null)
                {
                    this.txtDiagnosisSetID.Text = base.Request.QueryString["SetId"].ToString();
                    this._ds = this._associateDiagnosisCodeBO.GetCaseAssociateDiagnosisDetails(this.txtDiagnosisSetID.Text);
                    this.GetDiagnosisCode(this.txtCaseID.Text, this.txtCompanyID.Text, "", "GET_DIAGNOSIS_CODE");
                    this.Visiblecontrol();
                }
                else
                {
                    this.txtDiagnosisSetID.Text = this._associateDiagnosisCodeBO.GetDiagnosisSetID();
                }
                this.GetDiagnosisCode(this.txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                this.GetAssignedDiagnosisCode(this.txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                this.grdNormalDgCode.DataSource = null;
                this.grdNormalDgCode.DataBind();
                this.extddlSpeciality.Visible = false;
                this.lblSpeciality.Visible    = false;
                if (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
                {
                    this.tabcontainerDiagnosisCode.ActiveTabIndex = 1;
                }
                else
                {
                    this.tabcontainerDiagnosisCode.ActiveTabIndex = 0;
                }
            }
            this.lblMsg.Text = "";
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        if (((Bill_Sys_BillingCompanyObject)this.Session["APPSTATUS"]).SZ_READ_ONLY.ToString().Equals("True"))
        {
            new Bill_Sys_ChangeVersion(this.Page).MakeReadOnlyPage("Bill_Sys_AssociateDignosisCodeCase.aspx");
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void grdAllReports_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "CaseSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "PatientNameSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "EventDateSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " DESC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "DoctorNameSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "SpecialitySearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "CaseID")
            {
                this.Session["CASE_OBJECT"] = "";
                Bill_Sys_Case billSysCase = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = e.Item.Cells[0].Text.ToString()
                };
                CaseDetailsBO caseDetailsBO = new CaseDetailsBO();
                //Bill_Sys_CaseObject billSysCaseObject = new Bill_Sys_CaseObject();
                // {
                Bill_Sys_CaseObject billSysCaseObject = new Bill_Sys_CaseObject();
                billSysCaseObject.SZ_PATIENT_ID   = e.Item.Cells[11].Text.ToString();
                billSysCaseObject.SZ_CASE_ID      = e.Item.Cells[0].Text.ToString();
                billSysCaseObject.SZ_COMAPNY_ID   = caseDetailsBO.GetPatientCompanyID(billSysCaseObject.SZ_PATIENT_ID);
                billSysCaseObject.SZ_PATIENT_NAME = caseDetailsBO.GetPatientName(billSysCaseObject.SZ_PATIENT_ID);
                billSysCaseObject.SZ_CASE_NO      = e.Item.Cells[10].Text.ToString();
                //};
                this.Session["CASE_OBJECT"]  = billSysCaseObject;
                this.Session["CASEINFO"]     = billSysCase;
                this.Session["PassedCaseID"] = e.Item.Cells[0].Text.ToString();
                string str = e.Item.Cells[0].Text.ToString();
                this.Session["QStrCaseID"]   = str;
                this.Session["Case_ID"]      = str;
                this.Session["Archived"]     = "0";
                this.Session["QStrCID"]      = str;
                this.Session["SelectedID"]   = str;
                this.Session["DM_User_Name"] = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]           = "0";
                this.Session["LastAction"]   = "vb_CaseInformation.aspx";
                base.Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
            }
            if (e.CommandName == "Group Service")
            {
                Bill_Sys_Case billSysCase1 = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = e.CommandArgument.ToString()
                };
                CaseDetailsBO       caseDetailsBO1     = new CaseDetailsBO();
                Bill_Sys_CaseObject billSysCaseObject1 = new Bill_Sys_CaseObject();
                // {
                billSysCaseObject1.SZ_PATIENT_ID   = e.Item.Cells[11].Text.ToString();
                billSysCaseObject1.SZ_CASE_ID      = e.CommandArgument.ToString();
                billSysCaseObject1.SZ_COMAPNY_ID   = caseDetailsBO1.GetPatientCompanyID(billSysCaseObject1.SZ_PATIENT_ID);
                billSysCaseObject1.SZ_PATIENT_NAME = caseDetailsBO1.GetPatientName(billSysCaseObject1.SZ_PATIENT_ID);
                billSysCaseObject1.SZ_CASE_NO      = e.Item.Cells[10].Text.ToString();
                // };
                this.Session["CASE_OBJECT"]  = billSysCaseObject1;
                this.Session["CASEINFO"]     = billSysCase1;
                this.Session["PassedCaseID"] = e.CommandArgument.ToString();
                string str1 = e.CommandArgument.ToString();
                this.Session["QStrCaseID"]   = str1;
                this.Session["Case_ID"]      = str1;
                this.Session["Archived"]     = "0";
                this.Session["QStrCID"]      = str1;
                this.Session["SelectedID"]   = str1;
                this.Session["DM_User_Name"] = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]           = "0";
                this.Session["LastAction"]   = "vb_CaseInformation.aspx";
                Type     type      = base.GetType();
                string[] strArrays = new string[] { "setDiv('", e.Item.Cells[1].Text.ToString(), "',EID='", e.Item.Cells[17].Text.ToString(), "');" };
                ScriptManager.RegisterStartupScript(this, type, "starScript", string.Concat(strArrays), true);
                this.BindGrid();
            }
            if (e.CommandName == "Document Manager")
            {
                Bill_Sys_Case billSysCase2 = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = e.CommandArgument.ToString()
                };
                CaseDetailsBO       caseDetailsBO2     = new CaseDetailsBO();
                Bill_Sys_CaseObject billSysCaseObject2 = new Bill_Sys_CaseObject();
                //{
                billSysCaseObject2.SZ_PATIENT_ID   = e.Item.Cells[11].Text.ToString();
                billSysCaseObject2.SZ_CASE_ID      = e.CommandArgument.ToString();
                billSysCaseObject2.SZ_COMAPNY_ID   = caseDetailsBO2.GetPatientCompanyID(billSysCaseObject2.SZ_PATIENT_ID);
                billSysCaseObject2.SZ_PATIENT_NAME = caseDetailsBO2.GetPatientName(billSysCaseObject2.SZ_PATIENT_ID);
                billSysCaseObject2.SZ_CASE_NO      = e.Item.Cells[10].Text.ToString();
                //};
                this.Session["CASE_OBJECT"]  = billSysCaseObject2;
                this.Session["CASEINFO"]     = billSysCase2;
                this.Session["PassedCaseID"] = e.CommandArgument.ToString();
                string str2 = "";
                string str3 = e.CommandArgument.ToString();
                this.Session["QStrCaseID"]   = str3;
                this.Session["Case_ID"]      = str3;
                this.Session["Archived"]     = "0";
                this.Session["QStrCID"]      = str3;
                this.Session["SelectedID"]   = str3;
                this.Session["DM_User_Name"] = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]           = "0";
                this.Session["LastAction"]   = "vb_CaseInformation.aspx";
                str2 = "Document Manager/case/vb_CaseInformation.aspx";
                base.Response.Write(string.Concat("<script language='javascript'>window.open('", str2, "', 'AdditionalData');</script>"));
            }
            if (e.CommandName == "Display Diag Code")
            {
                this.objAL = new ArrayList();
                this.objAL.Add(e.Item.Cells[0].Text.ToString());
                this.objAL.Add(e.Item.Cells[1].Text.ToString());
                this.objAL.Add("");
                this.objAL.Add(((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                this.BindGrid_DisplayDiagonosisCode(this.objAL);
                this.Session["DIAGINFO"] = this.objAL;
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void grdBillReportDetails_ItemCommand(object source, DataGridCommandEventArgs e)
    {//Logging Start
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "view")
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.Item.Cells[0].Text.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[1].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.Item.Cells[0].Text.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[4].Text.ToString();
                Session["CASE_OBJECT"]    = _bill_Sys_CaseObject;
                Session["CASEINFO"]       = _bill_Sys_Case;
                Session["PassedCaseID"]   = e.Item.Cells[0].Text;
                Session["SZ_BILL_NUMBER"] = e.CommandArgument;
                Response.Redirect("Bill_Sys_BillTransaction.aspx?Type=Search", false);
            }
            else if (e.CommandName.ToString() == "Document Manager")
            {
                // Create Session for document Manager
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.Item.Cells[0].Text.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[1].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.Item.Cells[0].Text.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[4].Text.ToString();
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.Item.Cells[0].Text;
                String szURL    = "";
                String szCaseID = e.Item.Cells[0].Text;
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                //    Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
                Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");
            }
            if (e.CommandName.ToString() == "Generate bill")
            {
                #region "Logic to view bills"
                Bill_Sys_NF3_Template objNF3Template = new Bill_Sys_NF3_Template();
                DataSet objDS = new DataSet();
                objDS = objNF3Template.getBillList(e.Item.Cells[5].Text);
                if (objDS.Tables[0].Rows.Count > 1)
                {
                    grdViewBills.DataSource = objDS;
                    grdViewBills.DataBind();
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "showviewBills();", true);
                }
                else if (objDS.Tables[0].Rows.Count == 1)
                {
                    string szBillName = objDS.Tables[0].Rows[0]["PATH"].ToString();
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "window.open('" + szBillName + "');", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "alert('No bill generated ...!');", true);
                }

                #endregion
            }

            if (e.CommandName.ToString() == "CaseSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }

            if (e.CommandName.ToString() == "PatientNameSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }