Beispiel #1
0
    public void Save_Psy_Info(Bill_Sys_Psyinfo _Bill_Sys_Psyinfo)
    {
        SqlConnection sqlCon = new SqlConnection(strConn);

        try
        {
            sqlCon.Open();
            comm = new SqlCommand("sp_txn_update_psy_patient_info", conn);

            comm.CommandTimeout = Convert.ToInt32(ConfigurationManager.AppSettings["CommandTimeOut"].ToString());
            comm.CommandType    = CommandType.StoredProcedure;
            comm.Connection     = sqlCon;
            comm.Parameters.AddWithValue("@i_attending_psy", _Bill_Sys_Psyinfo.RBATTENDING);
            comm.Parameters.AddWithValue("@bt_service_provider", _Bill_Sys_Psyinfo.SERVICEPROVIDER);
            comm.Parameters.AddWithValue("@sz_incident_description", _Bill_Sys_Psyinfo.INCIDENT);
            comm.Parameters.AddWithValue("@sz_preexisting_psy", _Bill_Sys_Psyinfo.HISTORY);
            comm.Parameters.AddWithValue("@bt_referal_for", _Bill_Sys_Psyinfo.BREFERAL);
            comm.Parameters.AddWithValue("@sz_evalution", _Bill_Sys_Psyinfo.EVALUATION);
            comm.Parameters.AddWithValue("@sz_patient_condition", _Bill_Sys_Psyinfo.CONDITION);
            comm.Parameters.AddWithValue("@bt_authentication_req", _Bill_Sys_Psyinfo.CHK_TREATEMENT);
            comm.Parameters.AddWithValue("@sz_authentication_req", _Bill_Sys_Psyinfo.TREATEMENTTEXT);
            comm.Parameters.AddWithValue("@dt_dateof_visited", _Bill_Sys_Psyinfo.VISITEDDATE);
            comm.Parameters.AddWithValue("@dt_first_dateof_visit", _Bill_Sys_Psyinfo.FIRSTVISITEDDATE);
            comm.Parameters.AddWithValue("@bt_will_patient_see_again", _Bill_Sys_Psyinfo.PATIANTSEEN);
            comm.Parameters.AddWithValue("@dt_yes_seen", _Bill_Sys_Psyinfo.NOPATIENTSEEN);
            comm.Parameters.AddWithValue("@i_no_seen", _Bill_Sys_Psyinfo.PATIANTATTENDING_DOCTOR);
            comm.Parameters.AddWithValue("@i_is_patient_working", _Bill_Sys_Psyinfo.PATIANT_WORKING);
            comm.Parameters.AddWithValue("@sz_yes_patient_working", _Bill_Sys_Psyinfo.LIMITEDWORK);
            comm.Parameters.AddWithValue("@sz_patient_regular_work", _Bill_Sys_Psyinfo.REGULARWORK);
            comm.Parameters.AddWithValue("@i_sustained", _Bill_Sys_Psyinfo.SUSTAINED);
            comm.Parameters.AddWithValue("@sz_additional_info", _Bill_Sys_Psyinfo.ADDITIONALINFO);
            comm.Parameters.AddWithValue("@i_vfbl_or_vawbl", _Bill_Sys_Psyinfo.VLBF);
            comm.Parameters.AddWithValue("@sz_patient_acc_number", _Bill_Sys_Psyinfo.PATIANTACCNO);
            comm.Parameters.AddWithValue("@i_case_id", _Bill_Sys_Psyinfo.CASEID);
            comm.Parameters.AddWithValue("@sz_company_id", _Bill_Sys_Psyinfo.COMPANYID);
            comm.Parameters.AddWithValue("@dt_historyof_injury", _Bill_Sys_Psyinfo.DATEOFFORTH);

            comm.ExecuteNonQuery();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
        }
        finally { sqlCon.Close(); }
    }
    private void SaveData()
    {
        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());
        }
        //rdbreferral
        try
        {
            Bill_Sys_Psyinfo _objBill_Sys_Psyinfo = new Bill_Sys_Psyinfo();
            Bill_save        _obj_Bill_save       = new Bill_save();
            _objBill_Sys_Psyinfo.RBATTENDING             = rbattenting_psy.SelectedValue;
            _objBill_Sys_Psyinfo.SERVICEPROVIDER         = rbserviceprovider.SelectedValue;
            _objBill_Sys_Psyinfo.INCIDENT                = txtincident.Text;
            _objBill_Sys_Psyinfo.HISTORY                 = txthistory.Text;
            _objBill_Sys_Psyinfo.BREFERAL                = rdbreferral.SelectedValue;
            _objBill_Sys_Psyinfo.EVALUATION              = txtEvaluation.Text;
            _objBill_Sys_Psyinfo.CONDITION               = txtcondition.Text;
            _objBill_Sys_Psyinfo.TREATEMENTTEXT          = txtTreatment.Text;
            _objBill_Sys_Psyinfo.VISITEDDATE             = txtVisitDate.Text;
            _objBill_Sys_Psyinfo.FIRSTVISITEDDATE        = txtFirstVisitDate.Text;
            _objBill_Sys_Psyinfo.PATIANTSEEN             = rdnpatientseen.Text;
            _objBill_Sys_Psyinfo.NOPATIENTSEEN           = txtPatientSeen.Text;
            _objBill_Sys_Psyinfo.PATIANTATTENDING_DOCTOR = rbpatientAttendingDoctor.SelectedValue;
            _objBill_Sys_Psyinfo.PATIANT_WORKING         = rbPatientWorking.SelectedValue;
            _objBill_Sys_Psyinfo.LIMITEDWORK             = txtlimitedwork.Text;
            _objBill_Sys_Psyinfo.REGULARWORK             = txtregularwork.Text;
            _objBill_Sys_Psyinfo.SUSTAINED               = rbsustained.SelectedValue;
            _objBill_Sys_Psyinfo.ADDITIONALINFO          = txtadditionalinfo.Text;
            _objBill_Sys_Psyinfo.VLBF        = rbvfblorvawbl.SelectedValue;
            _objBill_Sys_Psyinfo.DATEOFFORTH = txtdateof_forth_history.Text;

            _objBill_Sys_Psyinfo.CASEID       = txtCaseID.Text;
            _objBill_Sys_Psyinfo.PATIANTACCNO = txtPatientAccNo.Text;
            _objBill_Sys_Psyinfo.COMPANYID    = txtCompanyID.Text;


            if (chkTreatment.Checked)
            {
                _objBill_Sys_Psyinfo.CHK_TREATEMENT = "1";
            }
            else
            {
                _objBill_Sys_Psyinfo.CHK_TREATEMENT = "0";
            }

            _obj_Bill_save.Save_Psy_Info(_objBill_Sys_Psyinfo);
        }
        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());
        }
    }