Exemple #1
0
        //store patient in pharmacy
        private void button26_Click(object sender, EventArgs e)
        {
            patientForm.encounterData.planofCares.Clear();
            foreach (string[] plan in pharmacyTabStatus.allPlanList)
            {
                string s = plan[0];
                for (int i = 1; i < plan.Length - 2; i++)
                {
                    s += "|" + plan[i];
                }
                s += "|" + plan[plan.Length - 2];

                PlanOfCare p = new PlanOfCare();
                p.text = s;
                p.id = plan[plan.Length - 1];
                p.code = "";
                p.codeSystem = "";
                p.displayName = "";

                patientForm.encounterData.planofCares.Add(p);
            }
            xmlHandler.WriteCurrentPatientXML();
            LoadExitReviewPatient();
            InitializeClinicTabData();
        }
Exemple #2
0
        private void ButtonClinicSaveData_Click(object sender, EventArgs e)
        {
            patientForm.encounterData.encounter.notes = ClinicTabNotesEntry.Text;

            //write hemoglobin test
            if (textBox38.Text.Length > 0)
            {
                LabResult h = new LabResult();
                h.displayName = "Hemoglobin Test";
                h.value = textBox38.Text;
                h.referenceRange = label119.Text;
                h.comment = "Clinic Tab";
                h.id = patientForm.GetUUID();
                h.interpretCode = "NI";
                h.interpretCodeSystem = clinicData.resultsInterpretCode;
                h.referenceRange = clinicData.hemoglobinRange;
                h.status = "Completed";
                h.timeStamp = patientForm.GetTimeStamp() + clinicData.timeZone;
                h.typeCode = "NI";
                h.typeCodeSystem = clinicData.resultTypeCode;
                h.unit = "NI";
                patientForm.encounterData.labResults.Add(h);
            }

            //write orasure test
            if (comboBox22.Text.Length > 0)
            {
                LabResult o = new LabResult();
                o.displayName = "Orasure Test";
                o.value = comboBox22.Text;
                o.referenceRange = "NI";
                o.comment = "Clinic Tab";
                o.id = patientForm.GetUUID();
                o.interpretCode = "NI";
                o.interpretCodeSystem = clinicData.resultsInterpretCode;
                o.referenceRange = "NI";
                o.status = "Completed";
                o.timeStamp = patientForm.GetTimeStamp() + clinicData.timeZone;
                o.typeCode = "NI";
                o.typeCodeSystem = clinicData.resultTypeCode;
                o.unit = "NI";
                patientForm.encounterData.labResults.Add(o);
            }

            //write stool O&P test
            if (textBox39.Text.Length > 0 || comboBox23.Text.Length > 0)
            {
                LabResult s = new LabResult();
                s.displayName = "Stool O&P Test";
                s.value = comboBox23.Text + " Notes: " + textBox39.Text;
                s.referenceRange = "NI";
                s.comment = "Clinic Tab";
                s.id = patientForm.GetUUID();
                s.interpretCode = "NI";
                s.interpretCodeSystem = clinicData.resultsInterpretCode;
                s.referenceRange = "NI";
                s.status = "Completed";
                s.timeStamp = patientForm.GetTimeStamp() + clinicData.timeZone;
                s.typeCode = "NI";
                s.typeCodeSystem = clinicData.resultTypeCode;
                s.unit = "NI";
                patientForm.encounterData.labResults.Add(s);
            }

            foreach (string[] plan in clinicTabStatus.plansOfCareList)
            {
                string s = plan[0];
                for (int i = 1; i < plan.Length - 2; i++)
                {
                    s += "|" + plan[i];
                }
                s += "|" + plan[plan.Length - 2];

                PlanOfCare p = new PlanOfCare();
                p.text = s;
                p.id = plan[plan.Length - 1];
                p.code = "";
                p.codeSystem = "";
                p.displayName = "";
                int addIndex = Convert.ToInt16(plan[0]);
                if (patientForm.encounterData.planofCares.Count <= addIndex)
                {
                    while (patientForm.encounterData.planofCares.Count <= addIndex)
                    {
                        patientForm.encounterData.planofCares.Add(new PlanOfCare());
                    }
                }
                patientForm.encounterData.planofCares[addIndex] = p;
            }

            xmlHandler.WriteCurrentPatientXML();
            LoadExitReviewPatient();
            InitializeClinicTabData();
        }
Exemple #3
0
 private void ReadPlanOfCare(XmlTextReader textReader)
 {
     bool readingPlanOfCare = true;
     while (readingPlanOfCare)
     {
         textReader.Read();
         switch (textReader.LocalName)
         {
             case "planOfCare":
                 readingPlanOfCare = false;
                 break;
             case "plannedObservation":
                 PlanOfCare newPlanOfCare = new PlanOfCare();
                 bool readingPlannedObservation = true;
                 while (readingPlannedObservation)
                 {
                     textReader.Read();
                     switch (textReader.LocalName)
                     {
                         case "plannedObservation":
                             readingPlannedObservation = false;
                             break;
                         case "planId":
                             newPlanOfCare.id = textReader.GetAttribute(0);
                             break;
                         case "planType":
                             newPlanOfCare.code = textReader.GetAttribute(0);
                             newPlanOfCare.codeSystem = textReader.GetAttribute(1);
                             newPlanOfCare.displayName = textReader.GetAttribute(2);
                             break;
                         case "planFreeText":
                             textReader.Read();
                             newPlanOfCare.text = textReader.Value.ToString();
                             textReader.Read();
                             break;
                     }
                 }
                 patientForm.encounterData.planofCares.Add(newPlanOfCare);
                 break;
         }
     }
 }