//load text boxes
    protected void LoadTextBoxes(DataSet dsEnc)
    {
        CDataUtils utils = new CDataUtils();

        txtVisitDate.Text   = utils.GetDateValueAsStringFromDS(dsEnc, "ENCOUNTER_DATE");
        txtSessionTime.Text = utils.GetStringValueFromDS(dsEnc, "SESSION_TIME");

        txtSubjective.Text = utils.GetStringValueFromDS(dsEnc, "SUBJECTIVE");
        txtObjective.Text  = utils.GetStringValueFromDS(dsEnc, "OBJECTIVE");
        txtAssessment.Text = utils.GetStringValueFromDS(dsEnc, "ASSESSMENT");
    }
Exemple #2
0
    protected void GetPatientDetails()
    {
        trEditInfo.Visible = true;
        trReadInfo.Visible = false;

        Session["PATIENT_DOB"]    = null;
        Session["PATIENT_AGE"]    = null;
        Session["PATIENT_GENDER"] = null;
        Session["PATIENT_WEIGHT"] = null;
        Session["PATIENT_HEIGHT"] = null;

        CDataUtils utils   = new CDataUtils();
        CPatient   patient = new CPatient();
        CEncounter enc     = new CEncounter();

        DataSet dsPat = patient.GetPatientDemographicsDS(Master);

        if (dsPat != null)
        {
            Master.PatientDOB    = Convert.ToDateTime(utils.GetDateValueAsStringFromDS(dsPat, "DOB"));
            Master.PatientAge    = utils.GetLongValueFromDS(dsPat, "PATIENT_AGE");
            Master.PatientGender = utils.GetStringValueFromDS(dsPat, "GENDER");
        }

        DataSet dsEnc = enc.GetPatientDetailsDS(Master, Master.SelectedEncounterID);

        if (dsEnc != null)
        {
            long lPatHeight = utils.GetLongValueFromDS(dsEnc, "PATIENT_HEIGHT");
            if (lPatHeight > 0)
            {
                int iFeet   = (int)lPatHeight / 12;
                int iInches = (int)lPatHeight % 12;

                lblPatHeight.Text      = iFeet.ToString() + "' - " + iInches.ToString() + "\"";
                htxtHeightFeet.Value   = iFeet.ToString();
                htxtHeightInches.Value = iInches.ToString();

                Master.PatientHeight = lPatHeight;

                foreach (ListItem li in cboFeet.Items)
                {
                    if (li.Value == iFeet.ToString())
                    {
                        li.Selected = true;
                    }
                }

                foreach (ListItem li in cboInches.Items)
                {
                    if (li.Value == iInches.ToString())
                    {
                        li.Selected = true;
                    }
                }
            }
            else
            {
                lblPatHeight.Text      = String.Empty;
                htxtHeightFeet.Value   = String.Empty;
                htxtHeightInches.Value = String.Empty;

                cboFeet.SelectedIndex   = 0;
                cboInches.SelectedIndex = 0;

                Master.PatientHeight = 0;
            }

            long lPatWeight = utils.GetLongValueFromDS(dsEnc, "PATIENT_WEIGHT");
            if (lPatWeight > 0)
            {
                txtWeight.Text = lPatWeight.ToString();

                lblPatWeight.Text      = lPatWeight.ToString() + " pounds";
                htxtWeightPounds.Value = lPatWeight.ToString();

                Master.PatientWeight = lPatWeight;
            }
            else
            {
                txtWeight.Text = String.Empty;

                lblPatWeight.Text      = String.Empty;
                htxtWeightPounds.Value = String.Empty;

                Master.PatientWeight = 0;
            }

            if (lPatHeight > 0 && lPatWeight > 0)
            {
                trEditInfo.Visible = false;
                trReadInfo.Visible = true;
                HasWeightHeight    = true;
            }
            else
            {
                trEditInfo.Visible = true;
                trReadInfo.Visible = false;
                HasWeightHeight    = false;
            }
        }
    }