Exemplo n.º 1
0
        private void butDelete_Click(object sender, EventArgs e)
        {
            if (EhrNotPerfCur.IsNew)
            {
                DialogResult = DialogResult.Cancel;
                return;
            }
            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?"))
            {
                return;
            }
            Vitalsign vitCur = Vitalsigns.GetFromEhrNotPerformedNum(EhrNotPerfCur.EhrNotPerformedNum);

            if (vitCur != null)
            {
                if (!MsgBox.Show(this, MsgBoxButtons.YesNo, "Deleting this will remove it from the vitalsign exam it refers to.\r\nDelete anyway?"))
                {
                    return;
                }
                vitCur.EhrNotPerformedNum = 0;
                Vitalsigns.Update(vitCur);
            }
            EhrNotPerformeds.Delete(EhrNotPerfCur.EhrNotPerformedNum);
            DialogResult = DialogResult.Cancel;
        }
Exemplo n.º 2
0
        private void butDelete_Click(object sender, EventArgs e)
        {
            if (IsNew)
            {
                //This code is never hit in current implementation 09/26/2013.
                DialogResult = DialogResult.Cancel;
                return;
            }
            List <Vitalsign> listVitals = Vitalsigns.GetListFromPregDiseaseNum(DiseaseCur.DiseaseNum);

            if (listVitals.Count > 0)           //if attached to vital sign exam, block delete
            {
                string dates = "";
                for (int i = 0; i < listVitals.Count; i++)
                {
                    if (i > 5)
                    {
                        break;
                    }
                    dates += "\r\n" + listVitals[i].DateTaken.ToShortDateString();
                }
                MsgBox.Show(this, "Not allowed to delete this problem.  It is attached to " + listVitals.Count.ToString() + "vital sign exams with dates including:" + dates + ".");
                return;
            }
            else
            {
                if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?"))
                {
                    return;
                }
            }
            SecurityLogs.MakeLogEntry(Permissions.PatProblemListEdit, DiseaseCur.PatNum, DiseaseDefs.GetName(DiseaseCur.DiseaseDefNum) + " deleted");
            Diseases.Delete(DiseaseCur);
            DialogResult = DialogResult.OK;
        }
Exemplo n.º 3
0
        private void CalcBMI()
        {
            //BMI = (lbs*703)/(in^2)
            float height;
            float weight;

            try{
                height = float.Parse(textHeight.Text);
                weight = float.Parse(textWeight.Text);
            }
            catch {
                return;
            }
            if (height == 0)
            {
                return;
            }
            if (weight == 0)
            {
                return;
            }
            float bmi = Vitalsigns.CalcBMI(weight, height);          // ((float)(weight*703)/(height*height));

            textBMI.Text = bmi.ToString("n1");
            return;
        }
Exemplo n.º 4
0
        public static List <Vitalsign> Update(Vitalsign vitals, long patNum)
        {
            VitalsignCrud.Insert(vitals);
            Vitalsign currVitals = Vitalsigns.GetOne(vitals.VitalsignNum);

            VitalsignCrud.Update(vitals);
            return(Vitalsigns.Refresh(patNum));
        }
Exemplo n.º 5
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            long vitalNum = listVs[e.Row].VitalsignNum;
            //change for EHR 2014
            FormVitalsignEdit2014 FormVSE = new FormVitalsignEdit2014();

            //FormEhrVitalsignEdit FormVSE=new FormEhrVitalsignEdit();
            FormVSE.VitalsignCur = Vitalsigns.GetOne(vitalNum);
            FormVSE.ShowDialog();
            FillGrid();
        }
Exemplo n.º 6
0
 private void butDelete_Click(object sender, EventArgs e)
 {
     if (VitalsignCur.IsNew)
     {
         DialogResult = DialogResult.Cancel;
         return;
     }
     if (MessageBox.Show("Delete?", "", MessageBoxButtons.OKCancel) != DialogResult.OK)
     {
         return;
     }
     Vitalsigns.Delete(VitalsignCur.VitalsignNum);
     DialogResult = DialogResult.Cancel;
 }
Exemplo n.º 7
0
        private void FillGrid()
        {
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col = new GridColumn("Date", 80);

            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Pulse", 55);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Height", 55);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Weight", 55);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("BP", 55);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("BMI", 55);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn("Documentation for Followup or Ineligible", 150);
            gridMain.ListGridColumns.Add(col);
            listVs = Vitalsigns.Refresh(PatNum);
            gridMain.ListGridRows.Clear();
            GridRow row;

            for (int i = 0; i < listVs.Count; i++)
            {
                row = new GridRow();
                row.Cells.Add(listVs[i].DateTaken.ToShortDateString());
                row.Cells.Add(listVs[i].Pulse.ToString() + " bpm");
                row.Cells.Add(listVs[i].Height.ToString() + " in.");
                row.Cells.Add(listVs[i].Weight.ToString() + " lbs.");
                row.Cells.Add(listVs[i].BpSystolic.ToString() + "/" + listVs[i].BpDiastolic.ToString());
                //BMI = (lbs*703)/(in^2)
                float bmi = Vitalsigns.CalcBMI(listVs[i].Weight, listVs[i].Height);
                if (bmi != 0)
                {
                    row.Cells.Add(bmi.ToString("n1"));
                }
                else                  //leave cell blank because there is not a valid bmi
                {
                    row.Cells.Add("");
                }
                row.Cells.Add(listVs[i].Documentation);
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }
Exemplo n.º 8
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textDateStart.errorProvider1.GetError(textDateStart) != "" ||
         textDateStop.errorProvider1.GetError(textDateStop) != "")
     {
         MsgBox.Show(this, "Please fix date.");
         return;
     }
     DiseaseCur.DateStart  = PIn.Date(textDateStart.Text);
     DiseaseCur.DateStop   = PIn.Date(textDateStop.Text);
     DiseaseCur.ProbStatus = (ProblemStatus)comboStatus.SelectedIndex;
     DiseaseCur.PatNote    = textNote.Text;
     if (comboSnomedProblemType.SelectedIndex == 1)           //Finding
     {
         DiseaseCur.SnomedProblemType = "404684003";
     }
     else if (comboSnomedProblemType.SelectedIndex == 2)           //Complaint
     {
         DiseaseCur.SnomedProblemType = "409586006";
     }
     else if (comboSnomedProblemType.SelectedIndex == 3)           //Dignosis
     {
         DiseaseCur.SnomedProblemType = "282291009";
     }
     else if (comboSnomedProblemType.SelectedIndex == 4)           //Condition
     {
         DiseaseCur.SnomedProblemType = "64572001";
     }
     else if (comboSnomedProblemType.SelectedIndex == 5)           //FunctionalLimitation
     {
         DiseaseCur.SnomedProblemType = "248536006";
     }
     else if (comboSnomedProblemType.SelectedIndex == 6)           //Symptom
     {
         DiseaseCur.SnomedProblemType = "418799008";
     }
     else              //Problem
     {
         DiseaseCur.SnomedProblemType = "55607006";
     }
     DiseaseCur.FunctionStatus = (FunctionalStatus)comboEhrFunctionalStatus.SelectedIndex;
     if (IsNew)
     {
         //This code is never hit in current implementation 09/26/2013.
         Diseases.Insert(DiseaseCur);
         SecurityLogs.MakeLogEntry(Permissions.PatProblemListEdit, DiseaseCur.PatNum, DiseaseDefs.GetName(DiseaseCur.DiseaseDefNum) + " added");
     }
     else
     {
         //See if this problem is the pregnancy linked to a vitalsign exam
         List <Vitalsign> listVitalsAttached = Vitalsigns.GetListFromPregDiseaseNum(DiseaseCur.DiseaseNum);
         if (listVitalsAttached.Count > 0)
         {
             //See if the vitalsign exam date is now outside of the active dates of the disease (pregnancy)
             string dates = "";
             for (int i = 0; i < listVitalsAttached.Count; i++)
             {
                 if (listVitalsAttached[i].DateTaken < DiseaseCur.DateStart || (DiseaseCur.DateStop.Year > 1880 && listVitalsAttached[i].DateTaken > DiseaseCur.DateStop))
                 {
                     dates += "\r\n" + listVitalsAttached[i].DateTaken.ToShortDateString();
                 }
             }
             //If vitalsign exam is now outside the dates of the problem, tell the user they must fix the dates of the pregnancy dx
             if (dates.Length > 0)
             {
                 MsgBox.Show(this, "This problem is attached to 1 or more vital sign exams as a pregnancy diagnosis with dates:" + dates + "\r\nNot allowed to change the active dates of the diagnosis to be outside the dates of the exam(s).  You must first remove the diagnosis from the vital sign exam(s).");
                 return;
             }
         }
         Diseases.Update(DiseaseCur);
         SecurityLogs.MakeLogEntry(Permissions.PatProblemListEdit, DiseaseCur.PatNum, DiseaseDefs.GetName(DiseaseCur.DiseaseDefNum) + " edited");
     }
     DialogResult = DialogResult.OK;
 }
Exemplo n.º 9
0
 private void FormGrowthCharts_Load(object sender, EventArgs e)
 {
     listVS = Vitalsigns.Refresh(PatNum);
     pat    = Patients.GetPat(PatNum);
     Text  += " - " + pat.Gender.ToString() + " Growth Chart for " + pat.FName + " " + pat.LName + " age " + pat.Age;
 }
Exemplo n.º 10
0
        private void butOK_Click(object sender, EventArgs e)
        {
            //validate
            DateTime date;

            if (textDateTaken.Text == "")
            {
                MessageBox.Show("Please enter a date.");
                return;
            }
            try {
                date = DateTime.Parse(textDateTaken.Text);
            }
            catch {
                MessageBox.Show("Please fix date first.");
                return;
            }
            //validate height
            float height = 0;

            try {
                if (textHeight.Text != "")
                {
                    height = float.Parse(textHeight.Text);
                }
            }
            catch {
                MessageBox.Show("Please fix height first.");
                return;
            }
            //validate weight
            float weight = 0;

            try {
                if (textWeight.Text != "")
                {
                    weight = float.Parse(textWeight.Text);
                }
            }
            catch {
                MessageBox.Show("Please fix weight first.");
                return;
            }
            //validate bp
            int BPsys = 0;
            int BPdia = 0;

            try {
                if (textBPs.Text != "")
                {
                    BPsys = int.Parse(textBPs.Text);
                }
                if (textBPd.Text != "")
                {
                    BPdia = int.Parse(textBPd.Text);
                }
            }
            catch {
                MessageBox.Show("Please fix BP first.");
                return;
            }
            if (checkFollowup.Checked || checkIneligible.Checked)
            {
                if (textDocumentation.Text == "")
                {
                    MessageBox.Show("Documentation must be entered.");
                    return;
                }
            }
            //save------------------------------------------------------------------
            VitalsignCur.DateTaken         = date;
            VitalsignCur.Height            = height;
            VitalsignCur.Weight            = weight;
            VitalsignCur.BpDiastolic       = BPdia;
            VitalsignCur.BpSystolic        = BPsys;
            VitalsignCur.HasFollowupPlan   = checkFollowup.Checked;
            VitalsignCur.ChildGotNutrition = checkNutrition.Checked;
            VitalsignCur.ChildGotPhysCouns = checkActivity.Checked;
            VitalsignCur.IsIneligible      = checkIneligible.Checked;
            VitalsignCur.Documentation     = textDocumentation.Text;
            if (VitalsignCur.IsNew)
            {
                Vitalsigns.Insert(VitalsignCur);
            }
            else
            {
                Vitalsigns.Update(VitalsignCur);
            }
            DialogResult = DialogResult.OK;
        }