Пример #1
0
    protected void grdNormalDgCode_PageIndexChanged(object source, DataGridPageChangedEventArgs 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.grdNormalDgCode.CurrentPageIndex = e.NewPageIndex;
            Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();
            this.GetProcedureDiagnosisCode(this.txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, ((Bil_Sys_Associate_Diagnosis)this.Session["DIAGNOS_ASSOCIATION"]).EventProcID, "GET_DIAGNOSIS_CODE");
        }
        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());
        }
    }
    public void SaveProcedureDiagnosisCode()
    {
        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());
        }
        Bil_Sys_Associate_Diagnosis _dianosis_Association = new Bil_Sys_Associate_Diagnosis();

        _dianosis_Association = (Bil_Sys_Associate_Diagnosis)Session["DIAGNOS_ASSOCIATION"];

        Bill_Sys_AssociateDiagnosisCodeBO _associateDiagnosisCodeBO = new Bill_Sys_AssociateDiagnosisCodeBO();
        DataSet   _billDs = new DataSet();
        ArrayList _arrayList;

        try
        {
            string szDiagnosisCode = "";
            for (int i = 0; i < grdDiagnosisCode.VisibleRowCount; i++)
            {
                ASPxGridView       _ASPxGridView = (ASPxGridView)grdid.FindControl("grdDiagnosisCode");
                GridViewDataColumn c             = (GridViewDataColumn)grdDiagnosisCode.Columns[0];
                CheckBox           checkBox      = (CheckBox)grdDiagnosisCode.FindRowCellTemplateControl(i, c, "chkall");
                if (checkBox != null)
                {
                    if (checkBox.Checked)
                    {
                        _arrayList = new ArrayList();
                        _arrayList.Add(txtEventProcID.Text);
                        _arrayList.Add(txtCaseID.Text);
                        _arrayList.Add(txtEventID.Text);
                        szDiagnosisCode = Convert.ToString(grdDiagnosisCode.GetRowValues(i, "SZ_DIAGNOSIS_CODE_ID"));
                        _arrayList.Add(szDiagnosisCode);
                        _arrayList.Add(extddlSpecialityDia.Text);
                        _arrayList.Add(txtCompanyID.Text);
                        _arrayList.Add("");
                        _associateDiagnosisCodeBO.SaveProcedureAssociateDignosisCode(_arrayList);
                    }
                }
            }
            GetAssignedProcedureDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, txtEventProcID.Text, "GET_PROCEDURE_ASSOCIATED_DIAGNOSIS_CODE");
        }
        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 Btn_Update_Click(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 (extddlReadingDoctor.Text != "---Select---")
            {
                Bil_Sys_Associate_Diagnosis _dianosis_Association = new Bil_Sys_Associate_Diagnosis();
                _dianosis_Association = (Bil_Sys_Associate_Diagnosis)Session["DIAGNOS_ASSOCIATION"];
                Bill_Sys_ProcedureCode_BO _bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                _bill_Sys_ProcedureCode_BO.UpdateReadingDoctor(Convert.ToInt32(_dianosis_Association.EventProcID), extddlReadingDoctor.Text);
                lblMsg.Text    = "Doctor Updated Sucessfully";
                lblMsg.Visible = true;
                //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ss", "<script language='javascript'>parent.document.getElementById('divid').style.visibility = 'hidden';window.parent.document.location.href='Bill_Sys_ReffPaidBills.aspx';</script>");
            }
            else
            {
                lblMsg.Text    = "Please Select Doctor To Update";
                lblMsg.Visible = true;
            }
        }
        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());
        }
    }
Пример #4
0
    protected void grdpaidbills_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        _bill_Sys_BillingCompanyDetails_BO = new Bill_Sys_BillingCompanyDetails_BO();

        if (e.CommandName.ToString() == "Edit")
        {
            int     i      = Convert.ToInt32(e.CommandArgument.ToString());
            DataSet dsRoom = new DataSet();
            //string szCaseType = grdpaidbills.Rows[i].Cells[24].Text;

            Bill_Sys_BillTransaction_BO objTransaction = new Bill_Sys_BillTransaction_BO();
            if ((grdpaidbills.DataKeys[i]["sz_procedure_group"].ToString().ToUpper() != "OT" && grdpaidbills.DataKeys[i]["sz_procedure_group"].ToString().ToUpper() != ""))
            {
                dsRoom = objTransaction.GetRoomId(grdpaidbills.DataKeys[i]["SZ_PROCEDURE_GROUP_ID"].ToString(), txtCompanyid.Text);
                string szRoomId = dsRoom.Tables[0].Rows[0][0].ToString();
                string ProcId1  = grdpaidbills.DataKeys[i]["I_EVENT_PROC_ID"].ToString();
                Session["GETROOMID"]   = szRoomId;
                Session["EVENTPROCID"] = ProcId1;
            }
            else
            {
                string ProcId1 = grdpaidbills.DataKeys[i]["I_EVENT_PROC_ID"].ToString();
                Session["GETROOMID"]   = "All";
                Session["EVENTPROCID"] = ProcId1;
            }


            string ProcId   = grdpaidbills.DataKeys[i]["I_EVENT_PROC_ID"].ToString();
            string szCaseID = grdpaidbills.DataKeys[i]["SZ_CASE_ID"].ToString();
            //string szEventProcID = grdpaidbills.DataKeys[i]["I_EVENT_PROC_ID"].ToString();
            string procGId      = grdpaidbills.DataKeys[i]["SZ_PROCEDURE_GROUP_ID"].ToString();
            string Patientid    = grdpaidbills.DataKeys[i]["SZ_PATIENT_ID"].ToString();
            string EventID      = grdpaidbills.DataKeys[i]["I_EVENT_ID"].ToString();
            string szSpeciality = grdpaidbills.DataKeys[i]["sz_procedure_group"].ToString();
            string patientname  = grdpaidbills.DataKeys[i]["PATIENT_NAME"].ToString();
            //string dateofservice = grdpaidbills.Rows[i].Cells[8].Text;
            string dateofservice = grdpaidbills.DataKeys[i]["DT_DATE_OF_SERVICE"].ToString();
            string lhrcode       = grdpaidbills.Rows[i].Cells[21].Text;
            //string caseno = grdpaidbills.Rows[i].Cells[2].Text;
            string caseno     = grdpaidbills.DataKeys[i]["CASE_NO"].ToString();
            string szCaseType = grdpaidbills.Rows[i].Cells[24].Text;


            bool      _ischeck           = false;
            string    _caseID            = "";
            int       _isSameCaseID      = 0;
            string    ProcGroupId        = "";
            string    PatientID          = "";
            int       _isSameProcGroupID = 0;
            ArrayList objArrOneD         = new ArrayList();
            ArrayList arrEventID         = new ArrayList();
            arrEventID.Add(grdpaidbills.DataKeys[i]["I_EVENT_ID"].ToString());


            Bil_Sys_Associate_Diagnosis _dianosis_Association = new Bil_Sys_Associate_Diagnosis();

            _dianosis_Association.EventProcID        = grdpaidbills.DataKeys[i]["I_EVENT_PROC_ID"].ToString();
            _dianosis_Association.DoctorID           = grdpaidbills.DataKeys[i]["SZ_DOCTOR_ID"].ToString();
            _dianosis_Association.CaseID             = grdpaidbills.DataKeys[i]["SZ_CASE_ID"].ToString();
            _dianosis_Association.ProceuderGroupId   = grdpaidbills.DataKeys[i]["SZ_PROCEDURE_GROUP_ID"].ToString();
            _dianosis_Association.ProceuderGroupName = grdpaidbills.DataKeys[i]["sz_procedure_group"].ToString();
            _dianosis_Association.PatientId          = grdpaidbills.DataKeys[i]["SZ_PATIENT_ID"].ToString();
            _dianosis_Association.DateOfService      = grdpaidbills.DataKeys[i]["DT_DATE_OF_SERVICE"].ToString();
            _dianosis_Association.ProcedureCode      = grdpaidbills.DataKeys[i]["SZ_PROC_CODE"].ToString();
            _dianosis_Association.CompanyId          = txtCompanyid.Text;
            objArrOneD.Add(_dianosis_Association);

            Session["DIAGNOS_ASSOCIATION_PAID"] = objArrOneD;

            DataSet dscode = new DataSet();
            dscode = objTransaction.GetRoomId(procGId, txtCompanyid.Text);
            string sz_proc_code           = grdpaidbills.Rows[i].Cells[9].Text;
            string sz_proc_desc           = grdpaidbills.Rows[i].Cells[10].Text;
            Bill_Sys_ProcedureCode_BO obj = new Bill_Sys_ProcedureCode_BO();
            DataSet dsSys = obj.Get_Sys_Key("SS00014", txtCompanyid.Text);
            if (dsSys.Tables[0].Rows[0][0].ToString() == "1")
            {
                Session["EVENT_ID"] = arrEventID;
            }
            ArrayList arrPgeValue = new ArrayList();
            arrPgeValue.Add(txtVisitDate.Text);
            arrPgeValue.Add(txtToVisitDate.Text);
            arrPgeValue.Add(extddlCaseType.Text);
            arrPgeValue.Add(txtNumberOfDays.Text);
            //arrPgeValue.Add(drpdown_Documents.SelectedValue);
            //if (chkAOb.Checked)
            //{
            //    arrPgeValue.Add("1");
            //}
            //else
            //{
            //    arrPgeValue.Add("0");
            //}

            //if (chkReport.Checked)
            //{
            //    arrPgeValue.Add("1");
            //}
            //else
            //{
            //    arrPgeValue.Add("0");
            //}

            //if (chkReferral.Checked)
            //{
            //    arrPgeValue.Add("1");
            //}
            //else
            //{
            //    arrPgeValue.Add("0");
            //}
            arrPgeValue.Add(con1.SelectedValue);
            Session["PAGE_VALUES"] = arrPgeValue;
            img2.Visible           = true;
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "mmupdateproc", "showEditPopup('" + szCaseID + "','" + ProcId + "','" + procGId + "','" + Patientid + "','" + EventID + "','" + szSpeciality + "','" + sz_proc_desc + "','" + sz_proc_code + "','" + szCaseType + "','" + patientname + "','" + dateofservice + "','" + lhrcode + "','" + caseno + "');", true);
        }
    }
Пример #5
0
    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);
        }
    }
Пример #6
0
    protected void btnnext_Click(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());
        }
        bool      flag  = false;
        string    str   = "";
        int       num   = 0;
        string    str2  = "";
        int       num2  = 0;
        ArrayList list  = new ArrayList();
        ArrayList list2 = new ArrayList();

        try
        {
            for (int i = 0; i < this.grdpaidbills.Rows.Count; i++)
            {
                CheckBox box = (CheckBox)this.grdpaidbills.Rows[i].FindControl("chkSelect");
                if (box.Checked)
                {
                    if (num == 0)
                    {
                        str = this.grdpaidbills.DataKeys[i]["SZ_CASE_ID"].ToString();
                        this.grdpaidbills.DataKeys[i]["SZ_PATIENT_ID"].ToString();
                        num = 1;
                    }
                    if (str != Convert.ToString(this.grdpaidbills.DataKeys[i]["SZ_CASE_ID"].ToString()))
                    {
                        ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "mmer", "alert('please select same patient !');", true);
                        return;
                    }
                    if (num2 == 0)
                    {
                        str2 = this.grdpaidbills.DataKeys[i]["SZ_PROCEDURE_GROUP_ID"].ToString();
                        num2 = 1;
                    }
                    if (str2 != this.grdpaidbills.DataKeys[i]["SZ_PROCEDURE_GROUP_ID"].ToString())
                    {
                        ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "mmer1", "alert('please select same Speciality !');", true);
                        return;
                    }
                    list2.Add(this.grdpaidbills.DataKeys[i]["I_EVENT_ID"].ToString());
                    Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();
                    diagnosis.EventProcID        = this.grdpaidbills.DataKeys[i]["I_EVENT_PROC_ID"].ToString();
                    diagnosis.DoctorID           = this.grdpaidbills.DataKeys[i]["SZ_DOCTOR_ID"].ToString();
                    diagnosis.CaseID             = this.grdpaidbills.DataKeys[i]["SZ_CASE_ID"].ToString();
                    diagnosis.ProceuderGroupId   = this.grdpaidbills.DataKeys[i]["SZ_PROCEDURE_GROUP_ID"].ToString();
                    diagnosis.ProceuderGroupName = this.grdpaidbills.DataKeys[i]["sz_procedure_group"].ToString();
                    diagnosis.PatientId          = this.grdpaidbills.DataKeys[i]["SZ_PATIENT_ID"].ToString();
                    diagnosis.DateOfService      = this.grdpaidbills.DataKeys[i]["DT_DATE_OF_SERVICE"].ToString();
                    diagnosis.ProcedureCode      = this.grdpaidbills.DataKeys[i]["SZ_PROC_CODE"].ToString();
                    diagnosis.CompanyId          = this.txtCompanyid.Text;
                    list.Add(diagnosis);
                    flag = true;
                }
            }
            if (!flag)
            {
                ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "mmSelect", "alert('please select record from grid !');", true);
                list.Clear();
                this.lblMsg.Text    = "";
                this.lblMsg.Visible = false;
            }
            else
            {
                this.Session["DIAGNOS_ASSOCIATION_PAID"] = list;
                DataSet roomId = new DataSet();
                roomId = new Bill_Sys_BillTransaction_BO().GetRoomId(str2, this.txtCompanyid.Text);
                if (roomId.Tables[0].Rows.Count > 0)
                {
                    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")
                    {
                        string    str3  = roomId.Tables[0].Rows[0][0].ToString();
                        ArrayList list3 = new ArrayList();
                        list3.Add(this.txtCompanyid.Text);
                        list3.Add(str3);
                        DataSet referringProcCodeList = new Bill_Sys_ManageVisitsTreatmentsTests_BO().GetReferringProcCodeList(list3);
                        this.Session["PROCEDURE_CODE"] = referringProcCodeList;
                        this.Session["EVENT_ID"]       = list2;
                    }
                    else
                    {
                        this.Session["PROCEDURE_CODE"] = null;
                    }
                }
                ScriptManager.RegisterStartupScript((Page)this, base.GetType(), "mmPopup", "ShowDignosisPopup();", true);
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string errorMessage = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + errorMessage);
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Пример #7
0
    //protected void btnSeacrh_Click(object sender, EventArgs e)
    //{
    //    try
    //    {
    //        //this.grdNormalDgCode.Visible = true;
    //        this.BindGrid(this.extddlDiagnosisType.Text, this.txtDiagonosisCode.Text, this.txtDescription.Text, rbl_SZ_TYPE_ID.SelectedValue);
    //    }
    //    catch
    //    {
    //    }
    //}

    protected void btnUploadFile_Click(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.objNF3Template = new Bill_Sys_NF3_Template();
        try
        {
            string str = this.objNF3Template.getPhysicalPath();
            int    num = 0;
            if (this.extddlReadingDoctor.Text == "NA")
            {
                this.Page.RegisterStartupScript("ss", "<script language='javascript'> alert('please select Reading Doctor !');</script>");
            }
            else if (!this.fuUploadReport.HasFile)
            {
                this.Page.RegisterStartupScript("ss", "<script language='javascript'> alert('please select file from upload Report !');</script>");
            }
            else
            {
                ArrayList list      = (ArrayList)this.Session["DIAGNOS_ASSOCIATION_PAID"];
                string    extension = "";
                string    result    = "";
                extension = Path.GetExtension(fuUploadReport.FileName);
                result    = Path.GetFileNameWithoutExtension(fuUploadReport.FileName);
                string FileName = result + "_" + DateTime.Now.ToString("MMddyyyysstt") + extension;
                foreach (object obj2 in list)
                {
                    Bil_Sys_Associate_Diagnosis diagnosis = (Bil_Sys_Associate_Diagnosis)obj2;
                    string companyName = "";
                    if (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY && (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID == ((Bil_Sys_Associate_Diagnosis)((ArrayList)this.Session["DIAGNOS_ASSOCIATION_PAID"])[0]).CompanyId))
                    {
                        companyName = this.objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    else
                    {
                        companyName = this.objNF3Template.GetCompanyName(((Bil_Sys_Associate_Diagnosis)((ArrayList)this.Session["DIAGNOS_ASSOCIATION_PAID"])[0]).CompanyId);
                    }
                    companyName      = companyName + "/" + this.txtCaseID.Text + "/No Fault File/Medicals/" + diagnosis.ProceuderGroupName.ToString() + "/";
                    this.strLinkPath = companyName + FileName;
                    if (!Directory.Exists(str + companyName))
                    {
                        Directory.CreateDirectory(str + companyName);
                    }
                    this.fuUploadReport.SaveAs(str + companyName + FileName);
                    ArrayList list2 = new ArrayList();
                    if (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY && (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID == ((Bil_Sys_Associate_Diagnosis)((ArrayList)this.Session["DIAGNOS_ASSOCIATION_PAID"])[0]).CompanyId))
                    {
                        list2.Add(((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    else
                    {
                        list2.Add(((Bil_Sys_Associate_Diagnosis)((ArrayList)this.Session["DIAGNOS_ASSOCIATION_PAID"])[0]).CompanyId);
                    }
                    list2.Add(this.txtCaseID.Text);
                    list2.Add(FileName);
                    list2.Add(companyName);
                    list2.Add(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME);
                    list2.Add(diagnosis.ProceuderGroupName.ToString());
                    num = this.objNF3Template.saveReportInDocumentManager(list2);
                }
                bool flag  = false;
                bool flag2 = false;
                foreach (object obj3 in list)
                {
                    Bil_Sys_Associate_Diagnosis diagnosis2 = (Bil_Sys_Associate_Diagnosis)obj3;
                    this._bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                    if (this._bill_Sys_ProcedureCode_BO.UpdateReportProcedureCodeListWithRefDoctor(Convert.ToInt32(diagnosis2.EventProcID.ToString()), this.strLinkPath, Convert.ToString(this.extddlReadingDoctor.Text), num) == 1)
                    {
                        flag = true;
                        Bill_Sys_ReferalEvent event2 = new Bill_Sys_ReferalEvent();
                        ArrayList             list3  = new ArrayList();
                        list3.Add(diagnosis2.PatientId.ToString());
                        list3.Add(diagnosis2.DoctorID.ToString());
                        list3.Add(diagnosis2.DateOfService.ToString());
                        list3.Add(diagnosis2.ProcedureCode.ToString());
                        list3.Add(((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                        list3.Add("");
                        list3.Add(diagnosis2.EventProcID.ToString());
                        event2.AddPatientProc(list3);
                        this._bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                        this._bill_Sys_ProcedureCode_BO.UpdateStatusProcedureCodeList(Convert.ToInt32(diagnosis2.EventProcID.ToString()));
                    }
                    else
                    {
                        flag2 = true;
                    }
                }
                if (flag && !flag2)
                {
                    this.Page.RegisterClientScriptBlock("ss", "<script language='javascript'>alert('Upload succesfully');</script>");
                }
            }
        }
        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());
        }
    }
Пример #8
0
    public void SaveProcedureDiagnosisCode()
    {
        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());
        }
        Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();

        diagnosis = (Bil_Sys_Associate_Diagnosis)this.Session["DIAGNOS_ASSOCIATION"];
        this._associateDiagnosisCodeBO = new Bill_Sys_AssociateDiagnosisCodeBO();
        new DataSet();
        try
        {
            ArrayList list;
            this._associateDiagnosisCodeBO.DeleteProcedureAssociateDignosisCode(this.txtCaseID.Text, this.txtCompanyID.Text, diagnosis.EventProcID);
            foreach (DataGridItem item in this.grdSelectedDiagnosisCode.Items)
            {
                list = new ArrayList();
                list.Add(diagnosis.EventProcID);
                list.Add(this.txtCaseID.Text);
                list.Add(this.Session["I_Event_ID"].ToString());
                list.Add(item.Cells[0].Text.ToString());
                list.Add(item.Cells[5].Text.ToString());
                list.Add(this.txtCompanyID.Text);
                list.Add(this.txtDiagnosisSetID.Text);
                this._associateDiagnosisCodeBO.SaveProcedureAssociateDignosisCode(list);
            }
            foreach (DataGridItem item2 in this.grdNormalDgCode.Items)
            {
                CheckBox box = (CheckBox)item2.Cells[1].FindControl("chkSelect");
                if (box.Checked)
                {
                    list = new ArrayList();
                    list.Add(diagnosis.EventProcID);
                    list.Add(this.txtCaseID.Text);
                    list.Add(this.Session["I_Event_ID"].ToString());
                    list.Add(item2.Cells[1].Text.ToString());
                    list.Add(this.extddlSpecialityDia.Text);
                    list.Add(this.txtCompanyID.Text);
                    list.Add(this.txtDiagnosisSetID.Text);
                    this._associateDiagnosisCodeBO.SaveProcedureAssociateDignosisCode(list);
                }
            }
            this.GetAssignedProcedureDiagnosisCode(this.txtCaseID.Text, this.txtCompanyID.Text, diagnosis.EventProcID, "GET_DIAGNOSIS_CODE");
            this.GetProcedureDiagnosisCode(this.txtCaseID.Text, this.txtCompanyID.Text, diagnosis.EventProcID, "GET_DIAGNOSIS_CODE");
        }
        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());
        }
    }
Пример #9
0
    protected void Btn_Update_Click(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
        {
            UserControl_Doctor objUsrDoc = new UserControl_Doctor();
            objUsrDoc = (UserControl_Doctor)FindControl("docname");
            ASPxComboBox cmbReading = (ASPxComboBox)objUsrDoc.FindControl("cmbActiveDoctor");

            objUsrDoc = (UserControl_Doctor)FindControl("docname");
            ASPxComboBox cmbReferring = (ASPxComboBox)objUsrDoc.FindControl("cmbReferrringDoctor");



            //if (this.extddlReadingDoctor.Text != "---Select---")
            //{
            //    Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();
            //    diagnosis = (Bil_Sys_Associate_Diagnosis)this.Session["DIAGNOS_ASSOCIATION"];
            //    new Bill_Sys_ProcedureCode_BO().UpdateReadingDoctor(Convert.ToInt32(diagnosis.EventProcID), this.extddlReadingDoctor.Text);

            //    this.lblMsg.Text = "Doctor Updated Sucessfully";
            //    this.lblMsg.Visible = true;

            //    if (txtSource.Text.ToString().ToLower() == "rr")
            //    {
            //        //window.parent.document.location.href=window.parent.document.location.href;window.self.close();window.top.parent.location='/application/AJAX Pages/Bill_Sys_ReffPaidBills.aspx';
            //        ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "Msg", "parent.document.getElementById('ctl00_ContentPlaceHolder1_hfupadate').value = 'true';", true);
            //    }


            //}
            //else
            //UserControl_Doctor objUsrDoc = new UserControl_Doctor();
            //objUsrDoc = (UserControl_Doctor)FindControl("docname");
            //ASPxComboBox cmbReferring = (ASPxComboBox)objUsrDoc.FindControl("cmbReferrringDoctor");
            if (TxtReferDoc.Text.Trim().ToString() != "")
            {
                if (CmbSpeciality.Value == "" || CmbSpeciality.Value == null)
                {
                    this.lblMsg.Text    = "To add new reffering doctor speciality is mandatory.";
                    this.lblMsg.Visible = true;
                    return;
                }
                if (CmbOffice.Value == "" || CmbOffice.Value == null)
                {
                    this.lblMsg.Text    = "To add new reffering doctor office is mandatory.";
                    this.lblMsg.Visible = true;
                    return;
                }
                cmbReferring.Value = AddReferringDoctor();
            }

            if ((cmbReading != null && cmbReferring != null) && (cmbReading.Text != "" && cmbReferring.Text != ""))
            {
                Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();
                diagnosis = (Bil_Sys_Associate_Diagnosis)this.Session["DIAGNOS_ASSOCIATION"];
                string readingDoctorName = cmbReading.Text;
                string readingDoctorID   = cmbReading.Value.ToString();

                string referrringDoctorName = cmbReferring.Text;
                string referrringDoctorID   = cmbReferring.Value.ToString();

                new Bill_Sys_ProcedureCode_BO().UpdateReadingDoctor(Convert.ToInt32(diagnosis.EventProcID), readingDoctorID);
                UpdateReferringDoctor(Convert.ToInt32(diagnosis.EventProcID), referrringDoctorID);
                this.lblMsg.Text    = "Doctor Updated Sucessfully";
                this.lblMsg.Visible = true;

                if (txtSource.Text.ToString().ToLower() == "rr")
                {
                    //window.parent.document.location.href=window.parent.document.location.href;window.self.close();window.top.parent.location='/application/AJAX Pages/Bill_Sys_ReffPaidBills.aspx';
                    ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "Msg", "parent.document.getElementById('ctl00_ContentPlaceHolder1_hfupadate').value = 'true';", true);
                }
            }
            else
            {
                this.lblMsg.Text    = "Please Select Doctor To Update";
                this.lblMsg.Visible = true;
            }
        }
        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());
        }
    }
Пример #10
0
    protected void btnDeassociateDiagCode_Click(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
        {
            string str = "";
            foreach (DataGridItem item in this.grdAssignedDiagnosisCode.Items)
            {
                CheckBox box = (CheckBox)item.Cells[0].FindControl("chkSelect");
                if (box.Checked)
                {
                    this._arrayList = new ArrayList();
                    this._arrayList.Add(item.Cells[1].Text.ToString());
                    this._arrayList.Add(this.txtCaseID.Text);
                    this._arrayList.Add(this.txtCompanyID.Text);
                    if (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
                    {
                        this._arrayList.Add("");
                    }
                    else
                    {
                        this._arrayList.Add("");
                    }
                    if (!this._associateDiagnosisCodeBO.DeleteAssociateProcedureDiagonisCode(this._arrayList))
                    {
                        str = str + "  " + item.Cells[2].Text.ToString() + ",";
                    }
                }
            }
            if (str == "")
            {
                this.lblMsg.Visible = true;
                this.lblMsg.Text    = " Diagnosis code deassociated successfully ...!";
            }
            else
            {
                this.lblMsg.Visible = true;
                this.lblMsg.Text    = str + " diagnosis code used in bills. You can not de-associate it.";
            }
            Bil_Sys_Associate_Diagnosis diagnosis = new Bil_Sys_Associate_Diagnosis();
            diagnosis = (Bil_Sys_Associate_Diagnosis)this.Session["DIAGNOS_ASSOCIATION"];
            this.GetProcedureDiagnosisCode(this.txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, diagnosis.EventProcID, "GET_DIAGNOSIS_CODE");
            this.grdAssignedDiagnosisCode.CurrentPageIndex = 0;
            this.GetAssignedProcedureDiagnosisCode(this.txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, diagnosis.EventProcID, "GET_DIAGNOSIS_CODE");
            this.BindGrid(this.extddlDiagnosisType.Text, this.txtDiagonosisCode.Text, this.txtDescription.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);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    private void SaveDiagnosisCode()
    {
        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();
        DataSet   _billDs = new DataSet();
        ArrayList _arrayList;

        try
        {
            string szDiagnosisCode = "";
            _associateDiagnosisCodeBO.DeleteCaseAssociateDignosisCodeWithProcCode(txtCaseID.Text, txtCompanyID.Text, "");//, lstPTDProcCode.Items[j].Value.Substring(0, lstPTDProcCode.Items[j].Value.IndexOf("|")), lstPTDProcCode.Items[j].Value.Substring((lstPTDProcCode.Items[j].Value.IndexOf("|") + 1), ((lstPTDProcCode.Items[j].Value.Length - lstPTDProcCode.Items[j].Value.IndexOf("|")) - 1)));
            txtDiagnosisSetID.Text = _associateDiagnosisCodeBO.GetDiagnosisSetID();
            Bil_Sys_Associate_Diagnosis _dianosis_Association = new Bil_Sys_Associate_Diagnosis();
            _dianosis_Association = (Bil_Sys_Associate_Diagnosis)Session["DIAGNOS_ASSOCIATION"];

            for (int i = 0; i < grdDiagnosisCode.VisibleRowCount; i++)
            {
                ASPxGridView       _ASPxGridView = (ASPxGridView)grdid.FindControl("grdDiagnosisCode");
                GridViewDataColumn c             = (GridViewDataColumn)grdDiagnosisCode.Columns[0];
                CheckBox           checkBox      = (CheckBox)grdDiagnosisCode.FindRowCellTemplateControl(i, c, "chkall");
                if (checkBox != null)
                {
                    if (checkBox.Checked)
                    {
                        _arrayList = new ArrayList();
                        _arrayList.Add(txtDiagnosisSetID.Text);
                        _arrayList.Add(txtCaseID.Text);
                        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                        {
                            _arrayList.Add("");
                        }
                        else
                        {
                            _arrayList.Add("");
                        }
                        szDiagnosisCode = Convert.ToString(grdDiagnosisCode.GetRowValues(i, "SZ_DIAGNOSIS_CODE_ID"));
                        _arrayList.Add(szDiagnosisCode);
                        _arrayList.Add(txtCompanyID.Text);
                        _arrayList.Add(_dianosis_Association.ProceuderGroupId);
                        _associateDiagnosisCodeBO.SaveCaseAssociateDignosisCode(_arrayList);
                    }
                }
            }


            //Put Condition here
            //---------Commented by Kunal---------------------------------------------------------
            if (objSystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT == "1")
            {
                GetAssignedProcedureDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, _dianosis_Association.EventProcID, "GET_DIAGNOSIS_CODE");
                GetProcedureDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, _dianosis_Association.EventProcID, "GET_DIAGNOSIS_CODE");
            }
            else
            {
                GetAssignedDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                GetDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
            }
            //--------------End---------------------------------------------------------------------
        }
        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 Page_Load(object sender, EventArgs e)
    {
        bool   _ischeck      = false;
        string _caseID       = "";
        int    _isSameCaseID = 0;

        _dianosis_Association.EventProcID      = Request.QueryString["szpatienttreatmentid"].ToString();
        _dianosis_Association.DoctorID         = Request.QueryString["szdoctorid"].ToString();
        _dianosis_Association.CaseID           = Request.QueryString["szcaseid"].ToString();
        _dianosis_Association.ProceuderGroupId = Request.QueryString["szprocgroupid"].ToString();
        Session["I_Event_ID"]          = Request.QueryString["szeventid"].ToString();
        Session["DIAGNOS_ASSOCIATION"] = _dianosis_Association;
        txtEventProcID.Text            = Request.QueryString["szpatienttreatmentid"].ToString();
        txtEventID.Text = Request.QueryString["szeventid"].ToString();
        btnAssign.Attributes.Add("OnClick", "callforSearch();");
        btnDeAssociate.Attributes.Add("OnClick", "callforSearch();");
        objSystemObject = (Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"];

        if (!(Request.QueryString["AcBilling"] == null))
        {
            redingdoctd1.InnerHtml = "&nbsp;";
            redingdoctd2.InnerHtml = "&nbsp;";
        }

        //tabcontainerDiagnosisCode.ActiveTabIndex = 1;
        lblMsg.Text = "";
        if (!IsPostBack)
        {
            extddlSpecialityDia.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlDiagnosisType.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlReadingDoctor.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            txtCompanyID.Text           = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            //Bil_Sys_Associate_Diagnosis _dianosis_Association = new Bil_Sys_Associate_Diagnosis();
            _dianosis_Association    = (Bil_Sys_Associate_Diagnosis)Session["DIAGNOS_ASSOCIATION"];
            extddlSpecialityDia.Text = _dianosis_Association.ProceuderGroupId;
            //_dianosis_Association.EventProcID
            txtCaseID.Text = _dianosis_Association.CaseID;
            // To Show Rading Doctor At Page Load:- Tushar
            extddlReadingDoctor.Text = _dianosis_Association.DoctorID;
            //End Of Code
            //Put Condition here
            //------Commented by Kunal--------------------------------------
            if (objSystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT == "1")
            {
                GetAssignedProcedureDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, _dianosis_Association.EventProcID, "GET_DIAGNOSIS_CODE");
                GetProcedureDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, _dianosis_Association.EventProcID, "GET_DIAGNOSIS_CODE");
            }
            else
            {
                GetAssignedDiagnosisCode(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                GetDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, "", "GET_DIAGNOSIS_CODE");
            }
            //-----------End------------------------------------------------

            grdDiagnosisCode.Visible = false;
        }


        if (hdnSearch.Value != "true")
        {
            GetAssignedProcedureDiagnosisCode(txtCaseID.Text, txtCompanyID.Text, txtEventProcID.Text, "GET_PROCEDURE_ASSOCIATED_DIAGNOSIS_CODE");
            BindGrid(extddlDiagnosisType.Text, txtDiagonosisCode.Text, txtDescription.Text);
        }
        else
        {
            hdnSearch.Value = "";
        }
    }