コード例 #1
0
        private void LoadForm(int id)
        {
            ResetForm();

            listSurveyName.Enabled = false;

            SURVEYS survey = ServiceInterfaceManager.SURVEYS_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);

            if (survey != null)
            {
                hideSurveyId.Value = survey.SURVEYS_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 (survey.PATIENT_ID != null && survey.PATIENT_ID > 0)
                {
                    PATIENT p = ServiceInterfaceManager.PATIENT_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, survey.PATIENT_ID.Value);
                    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;
                        }
                    }
                }

                foreach (ListItem li in listSurveyName.Items)
                {
                    if (li.Value == survey.STD_SURVEY_TYPE_ID.ToString())
                    {
                        li.Selected = true;
                        break;
                    }
                }

                txtSurveyDate.Text = survey.SURVEY_DATE.ToString("MM/dd/yyyy");
            }
        }
コード例 #2
0
        private void ResetForm()
        {
            hideSurveyId.Value = string.Empty;

            listSurveyName.ClearSelection();
            listSurveyName.Items.Clear();

            listSurveyName.Enabled = true;

            List <STD_SURVEY_TYPE> surveys = ServiceInterfaceManager.STD_SURVEY_TYPE_GET_ALL_BY_REGISTRY(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId);

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

            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;
            }

            txtSurveyDate.Text = string.Empty;
        }
コード例 #3
0
        private void LoadPatient(int id)
        {
            PATIENT patient = ServiceInterfaceManager.PATIENT_GET(HttpContext.Current.User.Identity.Name, UserSession.CurrentRegistryId, id);

            if (patient != null)
            {
                hidePatientId.Value = patient.PATIENT_ID.ToString();
                if (!string.IsNullOrEmpty(patient.LAST_NAME) && !string.IsNullOrEmpty(patient.FIRST_NAME))
                {
                    txtPatient.Text = patient.LAST_NAME + ", " + patient.FIRST_NAME;
                }
                else if (!string.IsNullOrEmpty(patient.LAST_NAME))
                {
                    txtPatient.Text = patient.LAST_NAME;
                }
                else if (!string.IsNullOrEmpty(patient.FIRST_NAME))
                {
                    txtPatient.Text = patient.FIRST_NAME;
                }
            }
        }
コード例 #4
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;
        }
コード例 #5
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");
                }
            }
        }