Пример #1
0
        private string GetPrEPInitiation(int ptn_pk, int visitPK, int locationId)
        {
            string result = string.Empty;

            try
            {
                IPrEP ipatientPrEP;
                ipatientPrEP = (IPrEP)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPrEP, BusinessProcess.Clinical");
                Entities.Common.PrEP patientPrEP = ipatientPrEP.GetPrEPInitiationData(ptn_pk, visitPK, locationId);
                //PrEP patientPrEP = ipatientPrEP.GetPrEPInitiationData(ptn_pk, visitPK, locationId);

                result = SerializerUtil.ConverToJson <Entities.Common.PrEP>(patientPrEP);
            }
            catch (Exception ex)
            {
                string str = "ptn_pk: " + ptn_pk.ToString() + ",visitPK: " + visitPK.ToString() + ",locationId:" + locationId.ToString();
                CLogger.WriteLog(ELogLevel.ERROR, "GetPrEPInitiation() exception: " + str + "-" + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                result = SerializerUtil.ConverToJson <ResponseType>(response);
            }
            finally
            {
            }
            return(result);
        }
    private string GetOIChronicDiseaseData(int ptn_pk, int locationId)
    {
        string result = string.Empty;

        try
        {
            IClinicalEncounter clinicalencounter            = (IClinicalEncounter)ObjectFactory.CreateInstance("HIVCE.BusinessLayer.BLClinicalEncounter, HIVCE.BusinessLayer");
            HIVCE.Common.Entities.OIChronicDiseaseData oiCD = clinicalencounter.GetOIChronicDiseaseData(ptn_pk, locationId);

            result = SerializerUtil.ConverToJson <HIVCE.Common.Entities.OIChronicDiseaseData>(oiCD);
        }
        catch (Exception ex)
        {
            CLogger.WriteLog(ELogLevel.ERROR, "frmPatientCEOIChronicDisease() exception: " + ex.ToString());
            ResponseType response = new ResponseType()
            {
                Success = EnumUtil.GetEnumDescription(Success.False)
            };
            result = SerializerUtil.ConverToJson <ResponseType>(response);
        }
        finally
        {
        }
        return(result);
    }
Пример #3
0
        private void LoadDetails()
        {
            try
            {
                object conn;

                //SqlConnection cnn = null;
                //cnn = (SqlConnection)DatatTableUtil.CheckConnection();
                //if (cnn.State == ConnectionState.Open)
                //{
                IIPTDetails iiptdetails;
                DataSet     ds = new DataSet();
                iiptdetails = new BIPTDetails();
                ds          = iiptdetails.GetInitialDetails(
                    Convert.ToInt32(ConfigurationSettings.AppSettings["AppLocationId"].ToString()));

                moduleIdentifier = ds;
                BindDetails(ds);
                //}
                //else
                //{
                //    MessageBox.Show("Database is not available, please check your connection string.", "IQCare", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "IQCare", MessageBoxButtons.OK, MessageBoxIcon.Error);
                CLogger.WriteLog(ELogLevel.ERROR, ex.ToString());
            }
        }
Пример #4
0
    private void Init_Form()
    {
        try
        {
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: Init_Form() begin!");
            //Response.Write("SessionCount -" + Session.Count.ToString());
            Session.RemoveAll();
            Session.Timeout = Convert.ToInt32(((NameValueCollection)ConfigurationSettings.GetConfig("appSettings"))["SessionTimeOut"]);
            Session.Add("AppUserId", "");
            Session.Add("AppUserName", "");
            Session.Add("EnrollFlag", "");
            Session.Add("IdentifierFlag", "");
            Session.Add("AppLocationId", "");
            Session.Add("AppLocation", "");
            Session.Add("AppCountryId", "");
            Session.Add("AppPosID", "");
            Session.Add("AppSatelliteId", "");
            Session.Add("GracePeriod", "");
            Session.Add("AppDateFormat", "");
            Session.Add("UserRight", "");
            Session.Add("BackupDrive", "");
            Session.Add("SystemId", "1");
            Session.Add("ModuleId", "");
            Application.Add("AppCurrentDate", "");
            Application.Add("MasterData", "");
            Session.Add("Program", "");
            Session.Add("AppCurrency", "");
            Session.Add("AppUserEmployeeId", "");
            Session.Add("CustomfrmDrug", "");
            Session.Add("CustomfrmLab", "");
            Session.Add("AppUserCustomList", "");
            Session.Add("SCMModule", null);
            Session.Add("FactilityID", 0);
            Session.Add("PlugInMenuLoaded", "false");
            Session.Add("Billing", "false");
            ////////////////////////////////////////

            lblDate.Text      = "";
            lblUserName.Text  = "";
            lblLocation.Text  = "";
            txtuname.Text     = "";
            txtpassword.Text  = "";
            imgLogin.ImageUrl = "";
            chkPref.Checked   = true;
            BindCombo();
            GetApplicationParameters();
            //lblLocation.Text = Session["AppLocation"].ToString();

            txtuname.Focus();


            lblversion.Text = AuthenticationManager.AppVersion;
            lblrelDate.Text = AuthenticationManager.ReleaseDate;
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: Init_Form() end!");
        }
        catch (Exception ex)
        {
            CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: Init_Form()", ex);
        }
    }
Пример #5
0
        public bool SaveUpdateTransition(Transition obj)
        {
            CLogger.WriteLog(ELogLevel.INFO, "BLTransition.SaveUpdateTransition() method called");
            bool       flag = true;
            Transition tp   = new Transition();

            try
            {
                if (obj.Ptn_pk != 0)
                {
                    dbLayer = new DBTransition();
                    dbLayer.SaveUpdateTransition(obj);
                }
                else
                {
                    throw new Exception("Patient id can not be 0");
                }
            }
            catch (Exception ex)
            {
                flag = false;
                CLogger.WriteLog(ELogLevel.ERROR, "BLTransition.SaveUpdateTransition() Method:" + ex.ToString());
                throw ex;
            }
            return(flag);
        }
Пример #6
0
        private string GetVisitDetailsData(int ptn_pk, int visitPK, int locationId)
        {
            string result = string.Empty;

            try
            {
                IKNHMEI iANC = (IKNHMEI)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHMEI, BusinessProcess.Clinical");
                Entities.Common.ANCVisitDetails anc = iANC.GetANCVisitDetailsData(ptn_pk, locationId, visitPK);

                result = SerializerUtil.ConverToJson <Entities.Common.ANCVisitDetails>(anc);
            }
            catch (Exception ex)
            {
                CLogger.WriteLog(ELogLevel.ERROR, "GetVisitDetailsData() exception: " + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                result = SerializerUtil.ConverToJson <ResponseType>(response);
            }
            finally
            {
            }
            return(result);
        }
Пример #7
0
        private string GetClinicalSummaryData(int ptn_pk, int visitPK, int locationId)
        {
            string result = string.Empty;

            try
            {
                IClinicalSummaryForm ipatientClinicalSummary;
                ipatientClinicalSummary = (IClinicalSummaryForm)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BClinicalSummary, BusinessProcess.Clinical");
                ClinicalSummary patientClinicalSummary = ipatientClinicalSummary.GetClinicalSummaryData(ptn_pk, visitPK, locationId);

                result = SerializerUtil.ConverToJson <ClinicalSummary>(patientClinicalSummary);
            }
            catch (Exception ex)
            {
                string str = "ptn_pk: " + ptn_pk.ToString() + ",visitPK: " + visitPK.ToString() + ",locationId:" + locationId.ToString();
                CLogger.WriteLog(ELogLevel.ERROR, "GetClinicalSummaryData() exception: " + str + "-" + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                result = SerializerUtil.ConverToJson <ResponseType>(response);
            }
            finally
            {
            }
            return(result);
        }
Пример #8
0
        public string DeleteForm()
        {
            string result = string.Empty;

            try
            {
                IinitialFollowupVisit InitialFollowupvisit;
                int    theResultRow, OrderNo;
                string FormName;
                OrderNo  = Convert.ToInt32(Session["PatientVisitId"].ToString());
                FormName = "ANC";

                InitialFollowupvisit = (IinitialFollowupVisit)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BInitialFollowupVisit, BusinessProcess.Clinical");
                theResultRow         = (int)InitialFollowupvisit.DeleteInitialFollowupVisitForm(FormName, OrderNo, Convert.ToInt32(Session["PatientId"].ToString()), Convert.ToInt32(Session["AppUserId"].ToString()));
                if (theResultRow == 0)
                {
                    result = EnumUtil.GetEnumDescription(Success.False);
                }
                else
                {
                    //string theUrl;
                    //theUrl = string.Format("{0}", "frmPatient_Home.aspx?Func=Delete");
                    //Response.Redirect(theUrl);
                    result = EnumUtil.GetEnumDescription(Success.True);
                }
            }
            catch (Exception ex)
            {
                CLogger.WriteLog(ELogLevel.ERROR, "DeleteForm() exception: " + ex.ToString());
                result = EnumUtil.GetEnumDescription(Success.False);
            }
            return(result);
        }
Пример #9
0
    protected void Page_Error(object sender, EventArgs e)
    {
        Exception ex = Server.GetLastError();

        CLogger.WriteLog(ELogLevel.ERROR, ex.ToString());
        if (Session["PatientId"] == null || Convert.ToInt32(Session["PatientId"]) != 0)
        {
            //IQCareMsgBox.NotifyAction("Application has an issue, Please contact Administrator!", "Application Error", false, this, "window.location.href='../frmLogin.aspx'");
            //Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmFindAddCustom.aspx?srvNm=" + Session["TechnicalAreaName"] + "&mod=0'</script>");
            Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmFacilityHome.aspx'</script>");
        }
        else
        {
            if (Session["TechnicalAreaId"] != null || Convert.ToInt16(Session["TechnicalAreaId"]) != 0)
            {
                //IQCareMsgBox.NotifyAction("Application has an issue, Please contact Administrator!", "Application Error", false, this, "window.location.href='../frmFacilityHome.aspx';");
                Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmFacilityHome.aspx'</script>");
            }
            else
            {
                //IQCareMsgBox.NotifyAction("Application has an issue, Please contact Administrator!", "Application Error", false, this, "window.location.href='../frmLogin.aspx';");
                Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmLogin.aspx'</script>");
            }
        }
        Server.ClearError();
    }
Пример #10
0
        private string SaveCIFData(string jsonString, int patientID, int userID)
        {
            bool         responseStatus;
            ResponseType ObjResponse = new ResponseType();

            try
            {
                // HTSClientIntake CIform = SerializerUtil.ConverToObject<HTSClientIntake>(jsonString);
                IHTSClientIntake clientIntake;
                clientIntake        = (IHTSClientIntake)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BHTSClientIntake, BusinessProcess.Clinical");
                responseStatus      = clientIntake.SaveClientIntakeFormData(jsonString, patientID, userID);
                ObjResponse.Success = responseStatus.ToString();
            }
            catch (Exception ex)
            {
                CLogger.WriteLog(ELogLevel.ERROR, "GetClientIntakeFormData() exception: " + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                responseStatus      = Convert.ToBoolean(SerializerUtil.ConverToJson <ResponseType>(response.ToString()));
                ObjResponse.Success = responseStatus.ToString();
            }
            string result = SerializerUtil.ConverToJson <ResponseType>(ObjResponse);

            return(result);
        }
Пример #11
0
        private string GetPatientAdherenceBarriers(int ptn_pk, int visitPK, int locationId)
        {
            string result = string.Empty;

            try
            {
                IPatientAdherence ipatientadherence;
                ipatientadherence = (IPatientAdherence)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientAdherence, BusinessProcess.Clinical");
                PatientAdherenceBarrier patientadherencebarrier = ipatientadherence.GetPatientAdherenceBarriers(ptn_pk, visitPK, locationId);

                result = SerializerUtil.ConverToJson <PatientAdherenceBarrier>(patientadherencebarrier);
            }
            catch (Exception ex)
            {
                string str = "ptn_pk: " + ptn_pk.ToString() + ",visitPK: " + visitPK.ToString() + ",locationId:" + locationId.ToString();
                CLogger.WriteLog(ELogLevel.ERROR, "GetPatientAdherenceBarriers() exception: " + str + "-" + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                result = SerializerUtil.ConverToJson <ResponseType>(response);
            }
            finally
            {
            }
            return(result);
        }
Пример #12
0
        private string GetRefillEncounter(int ptn_pk, int visitPK, int locationId)
        {
            string result = string.Empty;

            try
            {
                IClinicalEncounter clinicalencounter     = (IClinicalEncounter)ObjectFactory.CreateInstance("HIVCE.BusinessLayer.BLClinicalEncounter, HIVCE.BusinessLayer");
                HIVCE.Common.Entities.RefillEncounter cl = clinicalencounter.GetRefillEncounter(ptn_pk, visitPK, locationId);

                result = SerializerUtil.ConverToJson <HIVCE.Common.Entities.RefillEncounter>(cl);
            }
            catch (Exception ex)
            {
                CLogger.WriteLog(ELogLevel.ERROR, "GetClinicalEnounter() exception: " + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                result = SerializerUtil.ConverToJson <ResponseType>(response);
            }
            finally
            {
            }
            return(result);
        }
Пример #13
0
        public DataTable GetARTReadinessAssessment(int ptn_pk, int visitPK)
        {
            CLogger.WriteLog(ELogLevel.INFO, "DBARTReadinessAssessment.GetTreatmentPreparation() Method Called.");
            DataTable dt       = new DataTable();
            ClsObject clsObjTP = new ClsObject();

            try
            {
                ClsUtility.Init_Hashtable();
                ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, ptn_pk.ToString());
                ClsUtility.AddParameters("@Visit_Id", SqlDbType.Int, visitPK.ToString());
                dt = (DataTable)clsObjTP.ReturnObject(ClsUtility.theParams, "Pr_HIVCE_GetARTReadinessAssessment", ClsDBUtility.ObjectEnum.DataTable);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                clsObjTP = null;
                if (this.Connection != null)
                {
                    DataMgr.ReleaseConnection(this.Connection);
                }
            }
            return(dt);
        }
Пример #14
0
        public async Task <IActionResult> Post([FromForm] UserInfo credentials)
        {
            DBResponse objResponse = new DBResponse();
            UserInfo   obj         = null;

            try
            {
                UserDetails acc = new UserDetails();
                obj = acc.UserLogin(credentials.Username, credentials.Password);
                if (obj.UserID > 0)
                {
                    obj.Token = await Tokens.GenerateJwt(_jwtFactory.GenerateClaimsIdentity(credentials.Username, credentials.UserID.ToString()), _jwtFactory, credentials.Username, _jwtOptions, new JsonSerializerSettings { Formatting = Formatting.Indented });

                    //obj.ImagePath = string.IsNullOrEmpty(obj.ImagePath) ? "" : obj.IsAWS ? new AmazonS3().DownloadUrSigned(obj.ImagePath) : iConfiguration.GetSection("AppSetting").GetSection("Mrigs").Value + "/" + obj.ImagePath;
                    objResponse.ID     = obj.UserID;
                    objResponse.Result = obj.UserID > 0;
                    objResponse.obj    = obj;
                }
                else
                {
                    objResponse.Message = "Provided username and password is incorrect";
                }
            }
            catch (Exception ex)
            {
                objResponse.Message = ex.Message;
                CLogger.WriteLog(ProjectSource.WebApi, ELogLevel.ERROR, "ERROR ocurred in  Account Controller  while calling LoginUser Action, Ex.: " + ex.Message);
            }
            return(Ok(objResponse));
        }
Пример #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: Page_Load() begin!");
            // ScriptManager.RegisterStartupScript(this, this.GetType(), "screenSize", "getScreenSize();", true);
            Ajax.Utility.RegisterTypeForAjax(typeof(frmLogin));
            if (!Page.IsPostBack)
            {
                Thread theThread = new Thread(new ParameterizedThreadStart(IQCareUtils.GenerateCache));
                theThread.Start(false);
                Init_Form();

                if (ConfigurationManager.AppSettings["TestingBuildDate"] != null)
                {
                    lblTestRelDate.Text = "Testing build release date: " + ConfigurationManager.AppSettings["TestingBuildDate"].ToString();
                }
            }
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: Page_Load() end!");
        }
        catch (Exception err)
        {
            MsgBuilder theBuilder = new MsgBuilder();
            theBuilder.DataElements["MessageText"] = err.Message.ToString();
            IQCareMsgBox.Show("#C1", theBuilder, this);
            CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: Page_Load()", err);
        }
    }
Пример #16
0
        public bool SaveUpdateARTReadinessAssessment(ARTReadinessAssessment obj)
        {
            CLogger.WriteLog(ELogLevel.INFO, "BLARTReadinessAssessment.SaveUpdateARTReadinessAssessment() method called");
            bool flag = true;
            ARTReadinessAssessment tp = new ARTReadinessAssessment();

            try
            {
                if (obj.Ptn_pk != 0)
                {
                    dbLayer = new DBARTReadinessAssessment();
                    dbLayer.SaveUpdateARTReadinessAssessment(obj);
                }
                else
                {
                    throw new Exception("Patient id can not be 0");
                }
            }
            catch (Exception ex)
            {
                flag = false;
                CLogger.WriteLog(ELogLevel.ERROR, "BLARTReadinessAssessment.SaveUpdateARTReadinessAssessment() Method:" + ex.ToString());
                throw ex;
            }
            return(flag);
        }
Пример #17
0
        private void btnFind_Click(object sender, EventArgs e)
        {
            try
            {
                List <Patient> patients = new List <Patient>();
                dgvPatients.DataSource = patients;
                IIPTDetails iiptdetails;
                DataSet     ds = new DataSet();
                iiptdetails = new BIPTDetails();
                ds          = iiptdetails.GetPatientDetails(Convert.ToInt32(ConfigurationSettings.AppSettings["AppLocationId"].ToString())
                                                            , Convert.ToInt32(this.cbService.SelectedValue)
                                                            , this.cbIdentifier.SelectedValue.ToString()
                                                            , this.textBox1.Text);

                //Convert.ToInt32(ConfigurationSettings.AppSettings["AppLocationId"].ToString()));

                //moduleIdentifier = ds;
                //BindDetails(ds);
                patients = ds.Tables[0].ToList <Patient>();

                dgvPatients.DataSource = patients;

                // Resize the DataGridView columns to fit the newly loaded content.
                dgvPatients.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);
                //dgvPatients.ClearSelection();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "IQCare", MessageBoxButtons.OK, MessageBoxIcon.Error);
                CLogger.WriteLog(ELogLevel.ERROR, ex.ToString());
            }
        }
Пример #18
0
 private bool ValidateLogin()
 {
     try
     {
         //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: ValidateLogin() begin!");
         if (txtuname.Text.Trim() == "")
         {
             IQCareMsgBox.Show("BlankUserName", this);
             return(false);
         }
         if (txtpassword.Text.Trim() == "")
         {
             IQCareMsgBox.Show("BlankPassword", this);
             return(false);
         }
         if (Convert.ToInt32(ddLocation.SelectedValue) < 1)
         {
             IQCareMsgBox.Show("BlankLocation", this);
             return(false);
         }
         //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: ValidateLogin() end!");
     }
     catch (Exception ex)
     {
         CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: ValidateLogin() ", ex);
         return(false);
     }
     return(true);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         PrescriptionManager = (Interface.Pharmacy.IDrug)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BDrug, BusinessProcess.Pharmacy");
         Init_Page();
     }
     catch (Exception ex)
     {
         CLogger.WriteLog(ELogLevel.ERROR, ex.ToString());
         if (Session["PatientId"] == null || Convert.ToInt32(Session["PatientId"]) != 0)
         {
             IQCareMsgBox.NotifyAction("Application has an issue, Please contact Administrator!", "Application Error", true, this, "window.location.href='../frmFindAddCustom.aspx?srvNm=" + Session["TechnicalAreaName"] + "&mod=0'");
             //Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmFindAddCustom.aspx?srvNm=" + Session["TechnicalAreaName"] + "&mod=0'</script>");
         }
         else
         {
             if (Session["TechnicalAreaId"] != null || Convert.ToInt16(Session["TechnicalAreaId"]) != 0)
             {
                 IQCareMsgBox.NotifyAction("Application has an issue, Please contact Administrator!", "Application Error", true, this, "window.location.href='../frmFacilityHome.aspx';");
                 //Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmFacilityHome.aspx'</script>");
             }
             else
             {
                 IQCareMsgBox.NotifyAction("Application has an issue, Please contact Administrator!", "Application Error", true, this, "window.location.href='../frmLogin.aspx';");
                 //Response.Write("<script>alert('Application has an issue, Please contact Administrator!') ; window.location.href='../frmLogin.aspx'</script>");
             }
         }
         ex = null;
     }
 }
Пример #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //CLogger.WriteLog(ELogLevel.INFO, "Form: AdminHeaderFooter.master, Method: Page_Load() begin!");

            InitMenu();

            lblTitle.InnerText = "International Quality Care Patient Management and Monitoring System [" + Session["AppLocation"].ToString() + "]";
            string url = Request.RawUrl.ToString();
            Application["PrvFrm"] = url;
            if (Session["AppUserName"] != null)
            {
                lblUserName.Text = Session["AppUserName"].ToString();
            }
            if (Session["AppLocation"] != null)
            {
                lblLocation.Text = Session["AppLocation"].ToString();
            }
            IIQCareSystem AdminManager;
            AdminManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");

            if (Session["AppDateFormat"] != "")
            {
                lblDate.Text = AdminManager.SystemDate().ToString(Session["AppDateFormat"].ToString());
            }
            else
            {
                lblDate.Text = AdminManager.SystemDate().ToString("dd-MMM-yyyy");
            }
            if (Session.Count == 0)
            {
                IQCareMsgBox.Show("SessionExpired", this);
                Response.Redirect("~/frmlogin.aspx", true);
            }
            if (Session["AppUserID"].ToString() == "")
            {
                IQCareMsgBox.Show("SessionExpired", this);
                Response.Redirect("~/frmlogin.aspx", true);
            }

            //####### Delete Patient #############
            string theUrl;
            theUrl = string.Format("{0}?mnuClicked={1}", "../frmFindAddPatient.aspx", "DeletePatient");
            mnuAdminDeletePatient.HRef = theUrl;

            lblversion.Text = AuthenticationManager.AppVersion;
            lblrelDate.Text = AuthenticationManager.ReleaseDate;
            if (Session["UserRight"] != "")
            {
                AuthenticationRights();
            }
            //CLogger.WriteLog(ELogLevel.INFO, "Form: AdminHeaderFooter.master, Method: Page_Load() end!");
        }
        catch (Exception ex)
        {
            CLogger.WriteLog(ELogLevel.ERROR, "Form: AdminHeaderFooter.master, Method: Page_Load", ex);
        }
    }
    void Page_Error(object sender, EventArgs e)
    {
        Exception ex = Server.GetLastError();

        CLogger.WriteLog(ELogLevel.ERROR, ex.ToString());
        Response.Write("<script>alert('Application has some issue, we are re-directing you to Login page.') ; location.href='../frmLogin.aspx'</script>");
        Server.ClearError();
    }
Пример #22
0
    private void GetApplicationParameters()
    {
        try
        {
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: GetApplicationParameters() begin!");
            IUser ApplicationManager;
            ApplicationManager = (IUser)ObjectFactory.CreateInstance("BusinessProcess.Security.BUser, BusinessProcess.Security");
            DataSet   theDS = ApplicationManager.GetFacilitySettings(1);
            DataTable theDT = theDS.Tables[0];

            if (theDT.Rows.Count < 1)
            {
                string theUrl = string.Format("{0}", "./AdminForms/frmAdmin_FacilityList.aspx?BS=true");
                Response.Redirect(theUrl);
            }
            if (!string.IsNullOrEmpty(theDT.Rows[0]["Image"].ToString()))
            {
                imgLogin.ImageUrl = string.Format("images/{0}", theDT.Rows[0]["Image"].ToString());
            }
            else
            {
                imgLogin.ImageUrl = "~/Images/Login.jpg";
            }
            Session["SystemId"] = Convert.ToInt32(theDT.Rows[0]["SystemId"]);
            #region "Version Control"

            if (theDS.Tables[1].Rows[0]["AppVer"].ToString() != AuthenticationManager.AppVersion || ((DateTime)theDS.Tables[1].Rows[0]["RelDate"]).ToString("dd-MMM-yyyy") != AuthenticationManager.ReleaseDate)
            {
                string script = "<script language = 'javascript' defer ='defer' id = 'confirm'>\n";
                script += "var ans=true;\n";
                script += "alert('You are using a Wrong Version of Application. Please contact Support staff.');\n";
                script += "if (ans==true)\n";
                script += "{\n";
                script += "window.close() - y;\n";
                script += "}\n";
                script += "</script>\n";
                RegisterStartupScript("confirm", script);
                btnLogin.Enabled = false;
            }
            #endregion

            ApplicationManager = null;
            IIQCareSystem DateManager;
            DateManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
            DateTime theDTime = DateManager.SystemDate();

            ViewState["theCurrentDate"] = theDTime;
            lblDate.Text = theDTime.ToString("dd-MMM-yyyy");
            Application["AppCurrentDate"]  = theDTime.ToString("dd-MMM-yyyy");
            Session["AppCurrentDateClass"] = theDTime.ToString("dd-MMM-yyyy");
            //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: GetApplicationParameters() end!");
        }
        catch (Exception ex)
        {
            CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: GetApplicationParameters() ", ex);
        }
    }
Пример #23
0
        /// <summary>
        /// main
        /// </summary>
        /// <param name="args">program arguments</param>
        static void Main(string[] args)
        {
            CLogger.WriteLog(ELogLevel.INFO, "ImuFlash Server v.0.2");
            CLogger.WriteLog(ELogLevel.INFO, "Searching for IMU...");

            IMUFlashServer p = new IMUFlashServer();

            p.searchForIMU();
        }
Пример #24
0
        private string SaveSession(string nodeJson, int ptn_pk, int visitPK, int locationId, int userId, int sessionId)
        {
            string       result      = string.Empty;
            ResponseType ObjResponse = new ResponseType();

            try
            {
                PatientAdherenceCounseling patientAdherenceCounselling = SerializerUtil.ConverToObject <PatientAdherenceCounseling>(nodeJson);
                IPatientAdherence          ipatientadherence;
                ipatientadherence = (IPatientAdherence)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientAdherence,BusinessProcess.Clinical");
                patientAdherenceCounselling.Ptn_Pk         = ptn_pk;
                patientAdherenceCounselling.Visit_Id       = visitPK;
                patientAdherenceCounselling.LocationId     = locationId;
                patientAdherenceCounselling.CurrentSession = sessionId;
                bool flag    = true;
                int  visitId = 0;

                visitId = ipatientadherence.SaveUpdateEnhanceAdherenceCounsellingSessions(patientAdherenceCounselling, userId);

                if (visitId > 0)
                {
                    flag = true;
                }
                else
                {
                    flag = false;
                }

                Session["PatientVisitId"] = visitId.ToString();
                this.hidVId.Value         = visitId.ToString();

                if (flag)
                {
                    ObjResponse.Success = EnumUtil.GetEnumDescription(Success.True);
                }
                else
                {
                    ObjResponse.Success = EnumUtil.GetEnumDescription(Success.False);
                }
            }
            catch (Exception ex)
            {
                if (ex.Message.ToLower().Contains("visit already exists"))
                {
                    ObjResponse.ErrorMessage = ex.Message;
                }
                ObjResponse.Success = EnumUtil.GetEnumDescription(Success.False);
                CLogger.WriteLog(ELogLevel.ERROR, "SavePatientAdherenceBarriersData() exception: " + ex.ToString());
            }
            finally
            {
            }

            result = SerializerUtil.ConverToJson <ResponseType>(ObjResponse);
            return(result);
        }
Пример #25
0
        public void SaveUpdateTransition(Transition obj)
        {
            CLogger.WriteLog(ELogLevel.INFO, "DBTransition.SaveUpdateTransition() method called");
            bool      flag     = true;
            ClsObject clsObjTP = new ClsObject();

            try
            {
                ClsUtility.Init_Hashtable();
                ClsUtility.AddParameters("@Id", SqlDbType.Int, obj.Id.ToString());
                ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, obj.Ptn_pk.ToString());
                ClsUtility.AddParameters("@Visit_Id", SqlDbType.Int, obj.Visit_Id.ToString());
                ClsUtility.AddParameters("@G1Q1", SqlDbType.Int, obj.G1Q1.ToString());
                ClsUtility.AddParameters("@G1Q2", SqlDbType.Int, obj.G1Q2.ToString());
                ClsUtility.AddParameters("@G1Q3", SqlDbType.Int, obj.G1Q3.ToString());
                ClsUtility.AddParameters("@G1Q4", SqlDbType.Int, obj.G1Q4.ToString());

                ClsUtility.AddParameters("@G2Q1", SqlDbType.Int, obj.G2Q1.ToString());
                ClsUtility.AddParameters("@G2Q1Date", SqlDbType.DateTime, obj.G2Q1Date.ToString());
                ClsUtility.AddParameters("@G2Q2", SqlDbType.Int, obj.G2Q2.ToString());
                ClsUtility.AddParameters("@G2Q2Date", SqlDbType.DateTime, obj.G2Q2Date.ToString());
                ClsUtility.AddParameters("@G2Q3", SqlDbType.Int, obj.G2Q3.ToString());
                ClsUtility.AddParameters("@G2Q3Date", SqlDbType.DateTime, obj.G2Q3Date.ToString());
                ClsUtility.AddParameters("@G3Q1", SqlDbType.Int, obj.G3Q1.ToString());

                ClsUtility.AddParameters("@G3Q1Date", SqlDbType.DateTime, obj.G3Q1Date.ToString());
                ClsUtility.AddParameters("@G3Q2", SqlDbType.Int, obj.G3Q2.ToString());
                ClsUtility.AddParameters("@G3Q2Date", SqlDbType.DateTime, obj.G3Q2Date.ToString());
                ClsUtility.AddParameters("@G4Q1", SqlDbType.Int, obj.G4Q1.ToString());
                ClsUtility.AddParameters("@G4Q1Date", SqlDbType.DateTime, obj.G4Q1Date.ToString());
                ClsUtility.AddParameters("@G4Q2", SqlDbType.Int, obj.G4Q2.ToString());
                ClsUtility.AddParameters("@G4Q2Date", SqlDbType.DateTime, obj.G4Q2Date.ToString());
                ClsUtility.AddParameters("@G4Q3", SqlDbType.Int, obj.G4Q3.ToString());
                ClsUtility.AddParameters("@G4Q3Date", SqlDbType.DateTime, obj.G4Q3Date.ToString());
                ClsUtility.AddParameters("@G4Q4", SqlDbType.Int, obj.G4Q4.ToString());
                ClsUtility.AddParameters("@G4Q4Date", SqlDbType.DateTime, obj.G4Q4Date.ToString());



                DataTable dt = (DataTable)clsObjTP.ReturnObject(ClsUtility.theParams, "Pr_HIVCE_UpdateTransition", ClsDBUtility.ObjectEnum.DataTable);
            }
            catch (Exception ex)
            {
                flag = false;
                throw ex;
            }
            finally
            {
                clsObjTP = null;
                if (this.Connection != null)
                {
                    DataMgr.ReleaseConnection(this.Connection);
                }
            }
        }
Пример #26
0
 public void ChangePassword(int chngpwdflag) //1 for mandatory change 0 for optional
 {
     try
     {
         string theUrl = string.Format("{0}", "./AdminForms/frmAdmin_ChangePassword.aspx");
         Response.Redirect(theUrl);
     }
     catch (Exception ex)
     {
         CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: ChangePassword() ", ex);
     }
 }
Пример #27
0
        static void Main(string[] args)
        {
            CLogger.WriteLog(ELogLevel.INFO, "Business Server Activated.");

            string Config = @"RemServer.exe.config";

            RemotingConfiguration.Configure(Config);
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(BusinessServerFactory), "BusinessProcess.rem", WellKnownObjectMode.Singleton);
            Console.Write("Business Server Activated. Press Any Key to Disconnect");
            Console.ReadLine();
            CLogger.WriteLog(ELogLevel.INFO, "Business Server Disconnect.");
        }
Пример #28
0
        public void SaveUpdateTreatmentPreparation(TreatmentPreparation obj)
        {
            CLogger.WriteLog(ELogLevel.INFO, "DBTreatmentPreparation.SaveUpdateTreatmentPreparation() method called");
            bool      flag     = true;
            ClsObject clsObjTP = new ClsObject();

            try
            {
                ClsUtility.Init_Hashtable();
                ClsUtility.AddParameters("@Id", SqlDbType.Int, obj.Id.ToString());
                ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, obj.Ptn_pk.ToString());
                ClsUtility.AddParameters("@HIVIT", SqlDbType.DateTime, obj.HIVIT.ToString());
                ClsUtility.AddParameters("@HIVR", SqlDbType.DateTime, obj.HIVR.ToString());
                ClsUtility.AddParameters("@ViralLoadIT", SqlDbType.DateTime, obj.ViralLoadIT.ToString());
                ClsUtility.AddParameters("@ViralLoadR", SqlDbType.DateTime, obj.ViralLoadR.ToString());
                ClsUtility.AddParameters("@CD4IT", SqlDbType.DateTime, obj.CD4IT.ToString());
                ClsUtility.AddParameters("@CD4R", SqlDbType.DateTime, obj.CD4R.ToString());
                ClsUtility.AddParameters("@AntiretroviralIT", SqlDbType.DateTime, obj.AntiretroviralIT.ToString());
                ClsUtility.AddParameters("@AntiretroviralR", SqlDbType.DateTime, obj.AntiretroviralR.ToString());
                ClsUtility.AddParameters("@TreatmentFailureIT", SqlDbType.DateTime, obj.TreatmentFailureIT.ToString());
                ClsUtility.AddParameters("@TreatmentFailureR", SqlDbType.DateTime, obj.TreatmentFailureR.ToString());
                ClsUtility.AddParameters("@ARTSEIT", SqlDbType.DateTime, obj.ARTSEIT.ToString());
                ClsUtility.AddParameters("@ARTSER", SqlDbType.DateTime, obj.ARTSER.ToString());
                ClsUtility.AddParameters("@AdherenceIT", SqlDbType.DateTime, obj.AdherenceIT.ToString());
                ClsUtility.AddParameters("@AdherenceR", SqlDbType.DateTime, obj.AdherenceR.ToString());
                ClsUtility.AddParameters("@OtherMedicationsIT", SqlDbType.DateTime, obj.OtherMedicationsIT.ToString());
                ClsUtility.AddParameters("@OtherMedicationsR", SqlDbType.DateTime, obj.OtherMedicationsR.ToString());
                ClsUtility.AddParameters("@NutritionIT", SqlDbType.DateTime, obj.NutritionIT.ToString());
                ClsUtility.AddParameters("@NutritionR", SqlDbType.DateTime, obj.NutritionR.ToString());
                ClsUtility.AddParameters("@FollowUpIT", SqlDbType.DateTime, obj.FollowUpIT.ToString());
                ClsUtility.AddParameters("@FollowUpR", SqlDbType.DateTime, obj.FollowUpR.ToString());
                ClsUtility.AddParameters("@ARTReadinessAssessment", SqlDbType.Int, obj.ARTReadinessAssessment.ToString());
                ClsUtility.AddParameters("@ManagementPlanIT", SqlDbType.DateTime, obj.ManagementPlanIT.ToString());
                ClsUtility.AddParameters("@ManagementPlanR", SqlDbType.DateTime, obj.ManagementPlanR.ToString());
                ClsUtility.AddParameters("@Notes", SqlDbType.VarChar, obj.Notes.ToString());

                DataTable dt = (DataTable)clsObjTP.ReturnObject(ClsUtility.theParams, "Pr_HIVCE_UpdateTreatmentPreparation", ClsDBUtility.ObjectEnum.DataTable);
            }
            catch (Exception ex)
            {
                flag = false;
                throw ex;
            }
            finally
            {
                clsObjTP = null;
                if (this.Connection != null)
                {
                    DataMgr.ReleaseConnection(this.Connection);
                }
            }
        }
Пример #29
0
        public int SaveUpdateClinicalSummaryData(ClinicalSummary obj, int userID)
        {
            CLogger.WriteLog(ELogLevel.INFO, "BPatientAdherence.SaveUpdateClinicalSummaryData() method called");
            bool      flag     = true;
            int       visitId  = 0;
            ClsObject clsObjTP = new ClsObject();

            try
            {
                ClsUtility.Init_Hashtable();
                ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, obj.Ptn_pk.ToString());
                ClsUtility.AddParameters("@Visit_Id", SqlDbType.Int, obj.Visit_Id.ToString());
                ClsUtility.AddParameters("@location_id", SqlDbType.Int, obj.location_id.ToString());
                ClsUtility.AddParameters("@Form_filling_date", SqlDbType.Int, obj.Form_filling_date);
                ClsUtility.AddParameters("@CliniciansName", SqlDbType.VarChar, obj.CliniciansName.ToString());
                ClsUtility.AddParameters("@Telephone", SqlDbType.VarChar, obj.Telephone.ToString());
                ClsUtility.AddParameters("@Email", SqlDbType.VarChar, obj.Email.ToString());
                ClsUtility.AddParameters("@PrimaryReason", SqlDbType.VarChar, obj.PrimaryReason.ToString());
                ClsUtility.AddParameters("@ClinicalEvaluation", SqlDbType.VarChar, obj.ClinicalEvaluation.ToString());
                ClsUtility.AddParameters("@NumberOfAdherence", SqlDbType.Int, obj.NumberOfAdherence.ToString());
                ClsUtility.AddParameters("@NumberOfHomeVisit", SqlDbType.Int, obj.NumberOfHomeVisit.ToString());
                ClsUtility.AddParameters("@SupportStructures", SqlDbType.VarChar, obj.SupportStructures.ToString());
                ClsUtility.AddParameters("@EvidenceOfAdherence", SqlDbType.VarChar, obj.EvidenceOfAdherence.ToString());
                ClsUtility.AddParameters("@NumberOfDOTS", SqlDbType.Int, obj.NumberOfDOTS.ToString());
                ClsUtility.AddParameters("@PoorAdherence", SqlDbType.VarChar, obj.PoorAdherence.ToString());
                ClsUtility.AddParameters("@EvaluationForOtherText", SqlDbType.VarChar, obj.EvaluationForOtherText.ToString());
                ClsUtility.AddParameters("@EvaluationForOtherVal", SqlDbType.VarChar, obj.EvaluationForOtherVal.ToString());
                ClsUtility.AddParameters("@CommentOnTreatment", SqlDbType.VarChar, obj.CommentOnTreatment.ToString());
                ClsUtility.AddParameters("@HasDrugResistance", SqlDbType.VarChar, obj.HasDrugResistance.ToString());
                ClsUtility.AddParameters("@HasFacilityMultidisciplinary", SqlDbType.VarChar, obj.HasFacilityMultidisciplinary.ToString());
                ClsUtility.AddParameters("@MDTMembers", SqlDbType.VarChar, obj.MDTMembers.ToString());
                ClsUtility.AddParameters("@UserId", SqlDbType.Int, userID.ToString());

                visitId = (int)clsObjTP.ReturnObject(ClsUtility.theParams, "Pr_SaveUpdateClinicalSummaryData", ClsDBUtility.ObjectEnum.ExecuteNonQuery);
                return(visitId);
            }
            catch (Exception ex)
            {
                flag = false;
                CLogger.WriteLog(ELogLevel.ERROR, "BPatientAdherence.SaveUpdateClinicalSummaryData() Method:" + ex.ToString());
                throw ex;
            }
            finally
            {
                clsObjTP = null;
                if (this.Connection != null)
                {
                    DataMgr.ReleaseConnection(this.Connection);
                }
            }
        }
Пример #30
0
 protected void chkPref_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: chkPref_CheckedChanged() begin!");
         ViewState["pwd"] = txtpassword.Text;
         BindCombo();
         //CLogger.WriteLog(ELogLevel.INFO, "Form: frmLogin, Method: chkPref_CheckedChanged() end!");
     }
     catch (Exception ex)
     {
         CLogger.WriteLog(ELogLevel.ERROR, "Form: frmLogin, Method: chkPref_CheckedChanged()", ex);
     }
 }