コード例 #1
0
        private bool SaveForm(int patientId, int providerId)
        {
            bool objReturn = false;

            //if (ServiceInterfaceManager.REFERRAL_PATIENT_EXISTS(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, patientId))
            //{
            //    lblResult.Text = "The selected Patient has already been added to this Registry.<br /><br />";
            //}
            //else
            //{
            int referralId = ServiceInterfaceManager.REFERRAL_SAVE_MANUAL(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, patientId, providerId);

            if (referralId > 0)
            {
                REFERRAL r = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, referralId);
                if (r != null)
                {
                    UserSession.CurrentRegistryId = r.STD_REGISTRY_ID;
                    UserSession.CurrentReferralId = r.REFERRAL_ID;
                    UserSession.CurrentPatientId  = r.PATIENT_ID;
                    UserSession.CurrentProviderId = r.PROVIDER_ID.GetValueOrDefault();
                }

                objReturn = true;
            }
            else
            {
                lblResult.Text = "An error occurred while attempting to save, please try again.<br /><br />";
            }
            //}

            return(objReturn);
        }
コード例 #2
0
        protected void LinkSelect_Click(object sender, EventArgs e)
        {
            ServiceInterfaceManager.LogInformation("POSTBACK_EVENT", String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);

            try
            {
                LinkButton lb = (LinkButton)sender;
                if (lb != null)
                {
                    int id = 0;

                    if (int.TryParse(lb.CommandArgument, out id))
                    {
                        REFERRAL r = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);
                        if (r != null)
                        {
                            UserSession.CurrentRegistryId = r.STD_REGISTRY_ID;
                            UserSession.CurrentReferralId = r.REFERRAL_ID;
                            UserSession.CurrentPatientId  = r.PATIENT_ID;
                            UserSession.CurrentProviderId = r.PROVIDER_ID.GetValueOrDefault();

                            Response.Redirect("~/Common/Referral.aspx", false);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ServiceInterfaceManager.LogError(ex.Message, String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);
                throw ex;
            }
        }
コード例 #3
0
        private void LoadForm(int id)
        {
            REFERRAL referral = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);

            if (referral != null)
            {
                LoadPatient(referral.PATIENT_ID);
                if (referral.PROVIDER_ID != null)
                {
                    LoadProvider(referral.PROVIDER_ID.Value);
                }
            }
        }
コード例 #4
0
        protected void LinkEdit_Click(object sender, EventArgs e)
        {
            ServiceInterfaceManager.LogInformation("POSTBACK_EVENT", String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);

            try
            {
                UserSession.RefreshCommon();

                LinkButton lb = (LinkButton)sender;
                if (lb != null)
                {
                    int id = 0;
                    int.TryParse(lb.CommandArgument, out id);

                    if (id > 0)
                    {
                        REFERRAL r = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);
                        if (r != null)
                        {
                            UserSession.CurrentReferralId = r.REFERRAL_ID;
                            UserSession.CurrentPatientId  = r.PATIENT_ID;

                            if (r.PROVIDER_ID != null)
                            {
                                UserSession.CurrentProviderId = r.PROVIDER_ID.Value;
                            }

                            pnlProviders.Visible = false;
                            pnlProvider.Visible  = true;
                            LoadForm(id);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ServiceInterfaceManager.LogError(ex.Message, String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);
                throw ex;
            }
        }
コード例 #5
0
        protected void BtnSaveDisqualifyReason_Click(object sender, EventArgs e)
        {
            ServiceInterfaceManager.LogInformation("POSTBACK_EVENT", String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);
            int referralId = 0;

            try
            {
                if (!string.IsNullOrEmpty(txtDisqualifyReason.Text.Trim()))
                {
                    STD_REFERRALSTS status = ServiceInterfaceManager.STD_REFERRALSTS_GET_BY_CODE(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, "DISQUALIFIED");
                    REFERRAL        r      = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, UserSession.CurrentReferralId);

                    if (r != null && status != null)
                    {
                        r.COMMENT_TEXT       = txtDisqualifyReason.Text.Trim();
                        r.STD_REFERRALSTS_ID = status.ID;
                        referralId           = ServiceInterfaceManager.REFERRAL_SAVE(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, r);
                    }

                    if (referralId > 0)
                    {
                        lblResult.Text = "This Referral has been disqualified.<br /><br />";
                        LoadForm();
                    }
                    else
                    {
                        lblResult.Text = "An unexpected error occurred, please try again.<br /><br />";
                    }
                }
                else
                {
                    lblResult.Text = "Please enter a Disqualify Reason and try again.<br /><br />";
                }
            }
            catch (Exception ex)
            {
                ServiceInterfaceManager.LogError(ex.Message, String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name), HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);
                throw ex;
            }
        }
コード例 #6
0
        private void ResetForm()
        {
            hideWorkstreamId.Value = string.Empty;

            listWorkstreamName.ClearSelection();
            listWorkstreamName.Items.Clear();

            listWorkstreamName.Enabled = true;

            List <STD_WKFCASETYPE> cases = ServiceInterfaceManager.STD_WKFCASETYPE_GET_ALL_BY_REGISTRY(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);

            listWorkstreamName.Items.Add(new ListItem("", "0"));
            listWorkstreamName.AppendDataBoundItems = true;
            if (cases != null)
            {
                listWorkstreamName.DataSource = cases;
                listWorkstreamName.DataBind();
            }

            if (UserSession.CurrentReferralId > 0)
            {
                REFERRAL r = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, UserSession.CurrentReferralId);
                if (r != null)
                {
                    hideReferralId.Value = r.REFERRAL_ID.ToString();

                    if (r.REFERRAL_DATE != null)
                    {
                        txtReferralDate.Text = r.REFERRAL_DATE.Value.ToString("MM/dd/yyyy");
                    }

                    if (UserSession.CurrentPatientId <= 0)
                    {
                        UserSession.CurrentPatientId = r.PATIENT_ID;
                    }
                }
            }
            else
            {
                txtReferralDate.Text = string.Empty;
            }

            if (UserSession.CurrentPatientId > 0)
            {
                PATIENT p = ServiceInterfaceManager.PATIENT_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, UserSession.CurrentPatientId);
                if (p != null)
                {
                    hidePatientId.Value = p.PATIENT_ID.ToString();

                    if (!string.IsNullOrEmpty(p.LAST_NAME) && !string.IsNullOrEmpty(p.FIRST_NAME))
                    {
                        txtPatientName.Text = p.LAST_NAME + ", " + p.FIRST_NAME;
                    }
                    else if (!string.IsNullOrEmpty(p.LAST_NAME))
                    {
                        txtPatientName.Text = p.LAST_NAME;
                    }
                    else if (!string.IsNullOrEmpty(p.FIRST_NAME))
                    {
                        txtPatientName.Text = p.FIRST_NAME;
                    }
                }
            }
            else
            {
                txtPatientName.Text = string.Empty;
            }

            txtCaseNumber.Text    = string.Empty;
            txtCaseStartDate.Text = string.Empty;
            txtCaseDueDate.Text   = string.Empty;
        }
コード例 #7
0
        private void LoadForm(int id)
        {
            ResetForm();

            listWorkstreamName.Enabled = false;

            WKF_CASE workstream = ServiceInterfaceManager.WKF_CASE_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);

            if (workstream != null)
            {
                hideWorkstreamId.Value = workstream.WKF_CASE_ID.ToString();

                //TODO: Patient ID should not be null or 0 here, but may need to add logic
                //here at some point in case it is.
                if (workstream.PATIENT_ID > 0)
                {
                    PATIENT p = ServiceInterfaceManager.PATIENT_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, workstream.PATIENT_ID);
                    if (p != null)
                    {
                        hidePatientId.Value = p.PATIENT_ID.ToString();

                        if (!string.IsNullOrEmpty(p.LAST_NAME) && !string.IsNullOrEmpty(p.FIRST_NAME))
                        {
                            txtPatientName.Text = p.LAST_NAME + ", " + p.FIRST_NAME;
                        }
                        else if (!string.IsNullOrEmpty(p.LAST_NAME))
                        {
                            txtPatientName.Text = p.LAST_NAME;
                        }
                        else if (!string.IsNullOrEmpty(p.FIRST_NAME))
                        {
                            txtPatientName.Text = p.FIRST_NAME;
                        }
                    }
                }

                if (workstream.REFERRAL_ID != null && workstream.REFERRAL_ID > 0)
                {
                    REFERRAL r = ServiceInterfaceManager.REFERRAL_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, workstream.REFERRAL_ID.Value);
                    if (r != null)
                    {
                        hideReferralId.Value = r.REFERRAL_ID.ToString();
                        if (r.REFERRAL_DATE != null)
                        {
                            txtReferralDate.Text = r.REFERRAL_DATE.Value.ToString("MM/dd/yyyy");
                        }
                    }
                }

                foreach (ListItem li in listWorkstreamName.Items)
                {
                    if (li.Value == workstream.STD_WKFCASETYPE_ID.ToString())
                    {
                        li.Selected = true;
                        break;
                    }
                }

                txtCaseNumber.Text = workstream.CASE_NUMBER;

                if (workstream.CASE_START_DATE != null)
                {
                    txtCaseStartDate.Text = workstream.CASE_START_DATE.Value.ToString("MM/dd/yyyy");
                }

                if (workstream.CASE_DUE_DATE != null)
                {
                    txtCaseDueDate.Text = workstream.CASE_DUE_DATE.Value.ToString("MM/dd/yyyy");
                }
            }
        }