Пример #1
0
    protected void btn_save_Click(object sender, EventArgs e)
    {
        IPatientARTCare ACManager;

        ACManager  = (IPatientARTCare)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientARTCare, BusinessProcess.Clinical");
        LocationID = Convert.ToInt32(Session["AppLocationId"]);
        PatientID  = Convert.ToInt32(Session["PatientId"]);
        DataTable theCustomDataDT = null;

        if ((Convert.ToInt32(Session["PatientVisitId"]) > 0))
        {
            visitPK = Convert.ToInt32(Session["PatientVisitId"]);

            CustomFieldClinical theCustomManager = new CustomFieldClinical();
            theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Update", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
        }
        else
        {
            CustomFieldClinical theCustomManager = new CustomFieldClinical();
            theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Insert", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
        }
        Hashtable htparam = ArtCareParameters();

        ACManager.Save_Update_ARTCare(PatientID, visitPK, LocationID, htparam, Convert.ToInt32(Session["AppUserId"]), 0, theCustomDataDT);
        SaveCancel();
    }
    protected void btnsave_Click(object sender, EventArgs e)
    {
        if (FieldValidation() == false)
        {
            return;
        }

        Hashtable            theHT       = AddUpdateData();
        IPatientRegistration ptnMgrPMTCT = (IPatientRegistration)ObjectFactory.CreateInstance(ObjFactoryParameter);

        CustomFieldClinical theCustomManager = new CustomFieldClinical();
        DataTable           theCustomDataDT  = new DataTable();

        //if (Request.QueryString["Name"] == "Add")
        if (Convert.ToInt32(Session["PatientId"]) == 0)
        {
            theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Insert", ApplicationAccess.PMTCTEnrollment, (DataSet)ViewState["CustomFieldsDS"]);
        }
        else ////if (Request.QueryString["Name"] == "Edit")
        {
            //CustomFieldClinical theCustomManager = new CustomFieldClinical();
            theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Update", ApplicationAccess.PMTCTEnrollment, (DataSet)ViewState["CustomFieldsDS"]);
            //DataTable theDS = ptnMgrPMTCT.UpdatePatientRegistrationPMTCT(theHT,theCustomDataDT);
            //ViewState["PtnID"] = theDS.Rows[0]["PatientID"].ToString();
            //UpdateCancel();
        }

        DataTable theDS = ptnMgrPMTCT.SavePatientRegistrationPMTCT(theHT, theCustomDataDT);

        ViewState["PtnID"]   = theDS.Rows[0]["PatientID"].ToString();
        Session["PatientId"] = theDS.Rows[0]["PatientID"].ToString();
        SaveCancel();

        #region "Refresh Patient Records"
        IPatientHome PManager;
        PManager = (IPatientHome)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientHome, BusinessProcess.Clinical");
        System.Data.DataSet thePDS = PManager.GetPatientDetails(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["SystemId"]), Convert.ToInt32(Session["TechnicalAreaId"]));
        Session["PatientInformation"] = thePDS.Tables[0];
        #endregion

        Session["PatientStatus"] = 0;
    }
Пример #3
0
    protected void DQ_Check_Click(object sender, EventArgs e)
    {
        if (Validate_Data_Quality() == false)
        {
            return;
        }
        string msg = DataQuality_Msg();

        if (msg.Length > 69)
        {
            MsgBuilder theBuilder1 = new MsgBuilder();
            theBuilder1.DataElements["MessageText"] = msg;
            IQCareMsgBox.Show("#C1", theBuilder1, this);
            return;
        }
        else
        {
            IPatientARTCare ACManager;
            ACManager  = (IPatientARTCare)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientARTCare, BusinessProcess.Clinical");
            LocationID = Convert.ToInt32(Session["AppLocationId"]);
            PatientID  = Convert.ToInt32(Session["PatientId"]);
            DataTable theCustomDataDT = null;
            if ((Convert.ToInt32(Session["PatientVisitId"]) > 0))
            {
                visitPK = Convert.ToInt32(Session["PatientVisitId"]);
                CustomFieldClinical theCustomManager = new CustomFieldClinical();
                theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Update", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
            }
            else
            {
                CustomFieldClinical theCustomManager = new CustomFieldClinical();
                theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Insert", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
            }
            Hashtable htparam = ArtCareParameters();
            ACManager.Save_Update_ARTCare(PatientID, visitPK, LocationID, htparam, Convert.ToInt32(Session["AppUserId"]), 1, theCustomDataDT);
            SaveCancel();
        }
    }