protected void Page_Load(object sender, EventArgs e)
        {
            NigAdultIE = (INigeriaARTCard)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BNigeriaARTCard, BusinessProcess.Clinical");
            DataTable DT = NigAdultIE.GetNigeriaInitialVisitId(Convert.ToInt32(Session["PatientId"].ToString()));

            if (DT.Rows.Count > 0)
            {
                Session["PatientVisitId"] = DT.Rows[0]["Visit_Id"].ToString();
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         JavaScriptFunctionsOnLoad();
         if (Convert.ToInt32(Session["PatientVisitId"]) > 0)
         {
             INigeriaARTCard NigAdultIE = (INigeriaARTCard)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BNigeriaARTCard, BusinessProcess.Clinical");
             DataSet         dsGet      = NigAdultIE.GetNigeriaPriorARTDetails(Convert.ToInt32(Session["PatientId"].ToString()), Convert.ToInt32(Session["PatientVisitId"].ToString()));
             if (dsGet.Tables[0].Rows.Count > 0)
             {
                 Session["PriorGridData"] = dsGet.Tables[0];
                 GrdPriorART.Columns.Clear();
                 BindGrid();
                 GrdPriorART.DataSource = dsGet.Tables[0];
                 GrdPriorART.DataBind();
             }
         }
     }
 }
        public void Save(int dqchk)
        {
            if (fieldValidation() == false)
            {
                //ErrorLoad();
                return;
            }
            Hashtable theHT = HtParameters();

            DataSet DsReturns = new DataSet();

            NigAdultIE = (INigeriaARTCard)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BNigeriaARTCard, BusinessProcess.Clinical");
            DsReturns  = NigAdultIE.SaveUpdateInitialVisitData(theHT, dqchk, Convert.ToInt32(Session["AppUserId"]));

            Session["Redirect"] = "0";
            if (Convert.ToInt32(DsReturns.Tables[0].Rows[0]["Visit_Id"]) > 0)
            {
                Session["PatientVisitId"] = Convert.ToInt32(DsReturns.Tables[0].Rows[0]["Visit_Id"]);
                SaveCancel();
            }
        }
        public void BindExistingData()
        {
            string script = string.Empty;

            if (Convert.ToInt32(Session["PatientVisitId"].ToString()) > 0)
            {
                NigAdultIE = (INigeriaARTCard)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BNigeriaARTCard, BusinessProcess.Clinical");
                DataSet dsGet = NigAdultIE.GetNigeriaInitialVisitDetails(Convert.ToInt32(Session["PatientId"].ToString()), Convert.ToInt32(Session["PatientVisitId"].ToString()));
                if (dsGet.Tables[0].Rows.Count > 0)
                {
                    if (dsGet.Tables[0].Rows[0]["AdhCounsellingDate"] != DBNull.Value)
                    {
                        if ((Convert.ToDateTime(dsGet.Tables[0].Rows[0]["AdhCounsellingDate"]).Year != 1900))
                        {
                            txtIntAdhCounsling.Value = String.Format("{0:dd-MMM-yyyy}", dsGet.Tables[0].Rows[0]["AdhCounsellingDate"]);
                        }
                    }
                    if (dsGet.Tables[0].Rows[0]["Careeentry"] != DBNull.Value)
                    {
                        ddlCareEntryPoint.SelectedValue = dsGet.Tables[0].Rows[0]["Careeentry"].ToString();
                        if (ddlCareEntryPoint.SelectedItem.Text.ToUpper() == "OTHER (SPECIFY)")
                        {
                            ScriptManager.RegisterStartupScript(this, GetType(), "Careeentry", "$('#" + ddlCareEntryPoint.ClientID + "').trigger('onchange');", true);
                        }
                    }
                    if (dsGet.Tables[0].Rows[0]["OtherCareEntry"] != DBNull.Value)
                    {
                        txtCareEntryOther.Text = dsGet.Tables[0].Rows[0]["OtherCareEntry"].ToString();
                    }
                }
                if (dsGet.Tables[1].Rows.Count > 0)
                {
                    if (dsGet.Tables[1].Rows[0]["ConfirmHIVPosDate"] != DBNull.Value)
                    {
                        if ((Convert.ToDateTime(dsGet.Tables[1].Rows[0]["ConfirmHIVPosDate"]).Year != 1900))
                        {
                            txtConfHIVdate.Value = String.Format("{0:dd-MMM-yyyy}", dsGet.Tables[1].Rows[0]["ConfirmHIVPosDate"]);
                        }
                    }
                    if (dsGet.Tables[1].Rows[0]["HIVTestType"] != DBNull.Value)
                    {
                        ddlModeHIVTest.SelectedValue = dsGet.Tables[1].Rows[0]["HIVTestType"].ToString();
                    }
                    if (dsGet.Tables[1].Rows[0]["TestLocationOther"] != DBNull.Value)
                    {
                        txtmodetestwhere.Text = dsGet.Tables[1].Rows[0]["TestLocationOther"].ToString();
                    }
                    if (dsGet.Tables[1].Rows[0]["PrevART"] != DBNull.Value)
                    {
                        ddlPriorART.SelectedValue = dsGet.Tables[1].Rows[0]["PrevART"].ToString();
                    }
                }
                if (dsGet.Tables[2].Rows.Count > 0)
                {
                    if (dsGet.Tables[2].Rows[0]["dateEligible"] != DBNull.Value)
                    {
                        if ((Convert.ToDateTime(dsGet.Tables[2].Rows[0]["dateEligible"]).Year != 1900))
                        {
                            txtMedElligDate.Value = String.Format("{0:dd-MMM-yyyy}", dsGet.Tables[2].Rows[0]["dateEligible"]);
                        }
                    }
                    if (dsGet.Tables[2].Rows[0]["eligibleThrough"] != DBNull.Value)
                    {
                        ddlwhyelligible.SelectedValue = dsGet.Tables[2].Rows[0]["eligibleThrough"].ToString();
                    }
                }
                if (dsGet.Tables[3].Rows.Count > 0)
                {
                    if (dsGet.Tables[3].Rows[0]["ARTTransferInDate"] != DBNull.Value)
                    {
                        if ((Convert.ToDateTime(dsGet.Tables[3].Rows[0]["ARTTransferInDate"]).Year != 1900))
                        {
                            txtTransferedIn.Value = String.Format("{0:dd-MMM-yyyy}", dsGet.Tables[3].Rows[0]["ARTTransferInDate"]);
                        }
                    }
                    if (dsGet.Tables[3].Rows[0]["ARTTransferInFrom"] != DBNull.Value)
                    {
                        ddlFacTransfFrom.SelectedValue = dsGet.Tables[3].Rows[0]["ARTTransferInFrom"].ToString();
                    }
                }
            }
        }