Esempio n. 1
0
        static public VitalSign NewVitalSign(Transform parent, Vector3 pos, Color color, string name, string high, string low)
        {
            VitalSign vital = Instantiate(VitalSignPrefab, parent).GetComponentInChildren <VitalSign>();

            vital.Init(pos, color, name, high, low);
            return(vital);
        }
Esempio n. 2
0
        internal VitalSign buildVitalSign(IDataReader reader)
        {
            SiteId facility = new SiteId()
            {
                Id   = DbReaderUtil.getInt16Value(reader, reader.GetOrdinal("Sta3n")),
                Name = DbReaderUtil.getValue(reader, reader.GetOrdinal("Location"))
            };

            string          id        = DbReaderUtil.getInt64Value(reader, reader.GetOrdinal("VitalSignSID"));
            string          dateTaken = DbReaderUtil.getDateTimeValue(reader, reader.GetOrdinal("VitalSignTakenDateTime"));
            string          vitalType = DbReaderUtil.getValue(reader, reader.GetOrdinal("VitalType"));
            string          typeId    = DbReaderUtil.getInt32Value(reader, reader.GetOrdinal("VitalTypeSID"));
            ObservationType type      = new ObservationType(typeId, VitalSign.VITAL_SIGN, vitalType);

            VitalSign vitalSign = new VitalSign()
            {
                Id        = id,
                Facility  = facility,
                Type      = type,
                Value1    = DbReaderUtil.getValue(reader, reader.GetOrdinal("Result")),
                Timestamp = dateTaken
            };

            return(vitalSign);
        }
Esempio n. 3
0
 public VitalSignTO(VitalSign mdo)
 {
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment    = mdo.Comment;
     this.value1     = mdo.Value1;
     this.value2     = mdo.Value2;
     this.units      = mdo.Units;
     this.qualifiers = mdo.Qualifiers;
 }
Esempio n. 4
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,PatientId,Height,Weight,Temperature,BloodSugar,BloodPressureUNo,BloodPressureLNo")] VitalSign vitalSign)
        {
            if (id != vitalSign.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(vitalSign);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!VitalSignExists(vitalSign.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PatientId"] = new SelectList(_context.Patients, "Id", "Name", vitalSign.PatientId);
            return(View(vitalSign));
        }
 internal void setVitalSignQualifierStrings(VitalSignSet set, string s, string qualifier)
 {
     string[] keys = new string[]
     {
         "TEMP", "PULSE", "BP", "RESP", "WT", "HT", "PAIN", "O2", "CG", "CVP", "BMI"
     };
     for (int i = 0; i < keys.Length; i++)
     {
         string value = getVitalSignQualifierItem(s, keys[i]);
         if (!String.IsNullOrEmpty(value))
         {
             VitalSign theSign = getSignFromSet(set, keys[i]);
             if (theSign == null)
             {
                 continue;
             }
             if (String.Equals(qualifier, "Units", StringComparison.CurrentCultureIgnoreCase))
             {
                 theSign.Units = value;
                 if (keys[i] == "BP")
                 {
                     theSign = set.getVitalSign(VitalSign.SYSTOLIC_BP);
                     if (theSign != null)
                     {
                         theSign.Units = value;
                     }
                     theSign = set.getVitalSign(VitalSign.DIASTOLIC_BP);
                     if (theSign != null)
                     {
                         theSign.Units = value;
                     }
                 }
             }
             else if (String.Equals(qualifier, "Qualifiers", StringComparison.CurrentCultureIgnoreCase))
             {
                 theSign.Qualifiers = value;
                 if (keys[i] == "BP")
                 {
                     theSign = set.getVitalSign(VitalSign.SYSTOLIC_BP);
                     if (theSign != null)
                     {
                         theSign.Qualifiers = value;
                     }
                     theSign = set.getVitalSign(VitalSign.DIASTOLIC_BP);
                     if (theSign != null)
                     {
                         theSign.Qualifiers = value;
                     }
                 }
             }
             else
             {
                 throw new Exception("Invalid qualifier: " + qualifier);
             }
         }
     }
 }
Esempio n. 6
0
        private VitalSign BuildVitalSign(Visit visit, int?heightFeetMeasure, int?heightInchesMeasure, int?weightMeasure)
        {
            var vitalSign = new VitalSign(visit, VitalSignActivityType);

            vitalSign.ReviseHeight(new Height(heightFeetMeasure, heightInchesMeasure));
            vitalSign.ReviseWeight(weightMeasure);

            Session.SaveOrUpdate(vitalSign);
            return(vitalSign);
        }
Esempio n. 7
0
 public TaggedVitalSignArray(string tag, VitalSign mdo)
 {
     this.tag = tag;
     if (mdo == null)
     {
         this.count = 0;
         return;
     }
     this.vitals    = new VitalSignTO[1];
     this.vitals[0] = new VitalSignTO(mdo);
     this.count     = 1;
 }
Esempio n. 8
0
        public async Task <IActionResult> Create([Bind("PatientId,Height,Weight,Temperature,BloodSugar,BloodPressureUNo,BloodPressureLNo")] VitalSign vitalSign)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vitalSign);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PatientId"] = new SelectList(_context.Patients, "Id", "Name", vitalSign.PatientId);
            return(View(vitalSign));
        }
Esempio n. 9
0
        public void Test_EnableVitals1()
        {
            AllotBedViewModel bed = new AllotBedViewModel();

            bed.PatientId = "boo";
            VitalSign vital = new VitalSign
            {
                IsEnabled = true,
                Type      = 0
            };

            bed.EnableVitals1();
            Assert.AreEqual("boo", bed.PatientId);
        }
Esempio n. 10
0
        public VitalSignDescription AddVitalSign(int checkupId, int vitalType, String Value, String Desc, bool isEdit)
        {
            try
            {
                var       checkup   = m_model.Checkups.Single(P => P.Id == checkupId);
                var       user      = m_model.Profiles.Single(P => P.UserID.Equals(checkup.DoctorID));
                var       patient   = m_model.Profiles.Single(P => P.UserID.Equals(checkup.UserID));
                var       count     = m_model.VitalSigns.Count(P => P.CheckUpID == checkupId && P.TypeID == vitalType);
                VitalSign vitalSign = new VitalSign();
                if (count > 0)
                {
                    vitalSign = m_model.VitalSigns.Single(P => P.CheckUpID == checkupId && P.TypeID == vitalType);
                    if (isEdit == true)
                    {
                        vitalSign.Value = Value;
                        vitalSign.Desc  = Desc;
                        //  vitalSign.Date = DateTime.Now;
                    }
                }
                else
                {
                    vitalSign       = new VitalSign();
                    vitalSign.Value = Value;
                    vitalSign.Desc  = Desc;
                    //vitalSign.Date = DateTime.Now;
                    vitalSign.TypeID    = vitalType;
                    vitalSign.CheckUpID = checkupId;
                    m_model.VitalSigns.InsertOnSubmit(vitalSign);
                }

                m_model.SubmitChanges();

                return(new VitalSignDescription
                {
                    CategoryId = vitalSign.VitalType.CategoryId == null ? -1 : (int)vitalSign.VitalType.CategoryId,
                    CategoryName = vitalSign.VitalType.VitalCategory.CategoryName,
                    Description = vitalSign.Desc,
                    TypeId = vitalSign.TypeID == null ? -1 : (int)vitalSign.TypeID,
                    TypeName = vitalSign.VitalType.Name
                });
            }
            catch (Exception ex)
            {
                OutgoingWebResponseContext response = WebOperationContext.Current.OutgoingResponse;
                response.StatusCode        = System.Net.HttpStatusCode.NotFound;
                response.StatusDescription = ex.Message;
                return(null);
            }
        }
Esempio n. 11
0
        public VitalSignDto MapToVitalSignDto(VitalSign vitalSign)
        {
            if (vitalSign == null)
            {
                return(null);
            }

            VitalSignDto vitalSignDto = new VitalSignDto();

            vitalSignDto.VitalSignId = vitalSign.VitalSignId;
            vitalSignDto.Name        = vitalSign.Name;
            vitalSignDto.SortKey     = vitalSign.SortKey;

            return(vitalSignDto);
        }
        /// <summary>
        /// This function returns alert message after validation of vital signs
        /// </summary>
        /// <param name="item"></param>
        /// <param name="patientVitals"></param>
        /// <returns>alert message</returns>
        public string SendAlert(VitalSign item, PatientVitals patientVitals)
        {
            StringBuilder stringBuilder = new StringBuilder(40);

            if (item.IsEnabled)
            {
                PropertyInfo property        = typeof(PatientVitals).GetProperty(item.Type.ToString());
                var          vitalsValidator = InstanceCreator.Create_Instance(property.Name, "Validator") as IPatientVitalsValidate;
                if (!vitalsValidator.Validate((double)property.GetValue(patientVitals)))
                {
                    stringBuilder.Append(property.Name + "Alert ");
                }
            }
            return(stringBuilder.ToString());
        }
Esempio n. 13
0
        public VitalSign MapToVitalSign(VitalSignDto vitalSignDto)
        {
            if (vitalSignDto == null)
            {
                return(null);
            }

            VitalSign vitalSign = new VitalSign();

            if (vitalSignDto.VitalSignId != null)
            {
                vitalSign.VitalSignId = vitalSignDto.VitalSignId.Value;
            }

            vitalSign.Name    = vitalSignDto.Name;
            vitalSign.SortKey = vitalSignDto.SortKey;

            return(vitalSign);
        }
Esempio n. 14
0
    // Start is called before the first frame update
    void Start()
    {
        HRValue   = "--";
        SpO2Value = "--";

        GameObject VitalSignPrefab = Resources.Load("VitalSign/VitalSign") as GameObject;

        HR = UnityEngine.Object.Instantiate(VitalSignPrefab, transform).GetComponentInChildren <VitalSign>();
        HR.Init(new Vector3(XOffset, YOffset + 0.00f, 0f), Color.green, "HR", "160", "75");

        SpO2 = UnityEngine.Object.Instantiate(VitalSignPrefab, transform).GetComponentInChildren <VitalSign>();
        SpO2.Init(new Vector3(XOffset, YOffset + 0.25f, 0f), Color.cyan, "SpO2", "100", "90");
        //Camera.transform.position
        //(Camera.transform.up * cornerOffsetY) + (Camera.transform.left * cornerOffsetX)
        //new Vector3(-2.5f, 1.5f, 0.0f)
        transform.SetPositionAndRotation((Camera.transform.position + Camera.transform.forward * Distantce) + (Camera.transform.up * cornerOffsetY) + (Camera.transform.right * cornerOffsetX),
                                         Quaternion.LookRotation(Camera.transform.forward, Camera.transform.up));
        gameObject.SetActive(true);
    }
Esempio n. 15
0
        private void Start()
        {
            oxiConn = ConnectionManager.Instance["Oximeter"] as NoninOximeterConnection;

            HR   = ObjectFactory.NewVitalSign(transform, new Vector3(XOffset, YOffset + 0.00f, 0f), Color.green, "HR", "160", "75");
            SpO2 = ObjectFactory.NewVitalSign(transform, new Vector3(XOffset, YOffset + 0.25f, 0f), Color.cyan, "SpO2", "100", "90");

            Configurations.Instance.SetAndAddCallback("*VitalSigns_Distance", Distantce, v =>
            {
                Distantce = v;
                if (gameObject.activeInHierarchy)
                {
                    Configurations.Instance.Invoke("*VitalSigns_Place");
                }
            }, Configurations.RunOnMainThead.YES);
            Configurations.Instance.AddCallback("*VitalSigns_Place", () =>
            {
                transform.SetPositionAndRotation(Camera.transform.position + Camera.transform.forward * Distantce,
                                                 Quaternion.LookRotation(Camera.transform.forward, Vector3.up));
                gameObject.SetActive(true);
            }, Configurations.RunOnMainThead.YES);
            Configurations.Instance.AddCallback("*VitalSigns_Remove", () => gameObject.SetActive(false), Configurations.RunOnMainThead.YES);
        }
Esempio n. 16
0
        public TaggedVitalSignArrays getLatestVitalSigns()
        {
            TaggedVitalSignArrays result = new TaggedVitalSignArrays();

            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            if (result.fault != null)
            {
                return(result);
            }

            try
            {
                IndexedHashtable t = VitalSign.getLatestVitalSigns(mySession.ConnectionSet);
                result = new TaggedVitalSignArrays(t);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return(result);
        }
Esempio n. 17
0
        internal VitalSignSet[] toVitalSignsFromRdv(string response)
        {
            if (response == "")
            {
                return(null);
            }
            string[] lines = StringUtils.split(response, StringUtils.CRLF);
            lines = StringUtils.trimArray(lines);
            ArrayList    lst = new ArrayList();
            VitalSignSet rec = null;
            VitalSign    s   = null;

            for (int i = 0; i < lines.Length; i++)
            {
                string[] flds   = StringUtils.split(lines[i], StringUtils.CARET);
                int      fldnum = Convert.ToInt16(flds[0]);
                switch (fldnum)
                {
                case 1:
                    if (rec != null)
                    {
                        lst.Add(rec);
                    }
                    rec = new VitalSignSet();
                    string[] subflds = StringUtils.split(flds[1], StringUtils.SEMICOLON);
                    if (subflds.Length == 1)
                    {
                        rec.Facility = new SiteId("200", subflds[0]);
                    }
                    else
                    {
                        rec.Facility = new SiteId(subflds[1], subflds[0]);
                    }
                    break;

                case 2:
                    if (flds.Length == 2)
                    {
                        rec.Timestamp = VistaTimestamp.toUtcFromRdv(flds[1]);
                    }
                    break;

                case 3:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.TEMPERATURE);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.TEMPERATURE, s);
                    break;

                case 4:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.PULSE);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.PULSE, s);
                    break;

                case 5:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.RESPIRATION);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.RESPIRATION, s);
                    break;

                case 6:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.BLOOD_PRESSURE);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.BLOOD_PRESSURE, s);
                    break;

                case 7:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.HEIGHT);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.HEIGHT, s);
                    break;

                case 8:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.WEIGHT);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.WEIGHT, s);
                    break;

                case 9:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.PAIN);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.PAIN, s);
                    break;

                case 10:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.PULSE_OXYMETRY);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.PULSE_OXYMETRY, s);
                    break;

                case 11:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.CENTRAL_VENOUS_PRESSURE);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.CENTRAL_VENOUS_PRESSURE, s);
                    break;

                case 12:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.CIRCUMFERENCE_GIRTH);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.CIRCUMFERENCE_GIRTH, s);
                    break;

                case 15:
                    if (flds.Length == 2)
                    {
                        setVitalSignQualifierStrings(rec, flds[1], "Qualifiers");
                        rec.Qualifiers = flds[1];
                    }
                    break;

                case 16:
                    s      = new VitalSign();
                    s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.BODY_MASS_INDEX);
                    if (flds.Length == 2)
                    {
                        s.Value1 = flds[1];
                    }
                    rec.addVitalSign(VitalSign.BODY_MASS_INDEX, s);
                    break;

                case 17:
                    if (flds.Length == 2)
                    {
                        setVitalSignQualifierStrings(rec, flds[1], "Units");
                        rec.Units = flds[1];
                    }
                    break;

                default:
                    break;
                }
            }
            lst.Add(rec);
            return((VitalSignSet[])lst.ToArray(typeof(VitalSignSet)));
        }
Esempio n. 18
0
        internal VitalSign[] toLatestVitalSigns(string response)
        {
            if (!cxn.IsConnected)
            {
                throw new NotConnectedException();
            }

            if (response == "")
            {
                return null;
            }
            string[] lines = StringUtils.split(response, StringUtils.CRLF);
            ArrayList lst = new ArrayList(lines.Length);
            string category = "Vital Signs";
            for (int i = 0; i < lines.Length; i++)
            {
                if (lines[i] == "")
                {
                    continue;
                }
                string[] flds = StringUtils.split(lines[i], StringUtils.CARET);
                ObservationType observationType = null;
                if (flds[1] == "T")
                {
                    observationType = new ObservationType(flds[0], category, "Temperature");
                }
                else if (flds[1] == "P")
                {
                    observationType = new ObservationType(flds[0], category, "Pulse");
                }
                else if (flds[1] == "R")
                {
                    observationType = new ObservationType(flds[0], category, "Respiration");
                }
                else if (flds[1] == "BP")
                {
                    observationType = new ObservationType(flds[0], category, "Blood Pressure");
                }
                else if (flds[1] == "HT")
                {
                    observationType = new ObservationType(flds[0], category, "Height");
                }
                else if (flds[1] == "WT")
                {
                    observationType = new ObservationType(flds[0], category, "Weight");
                }
                else if (flds[1] == "PN")
                {
                    observationType = new ObservationType(flds[0], category, "Pain");
                }
                if (observationType == null)
                {
                    continue;
                }
                VitalSign observation = new VitalSign();
                observation.Type = observationType;
                observation.Value1 = flds[4];
                if (flds.Length == 6)
                {
                    observation.Value2 = flds[5];
                }
                observation.Timestamp = VistaTimestamp.toUtcString(flds[3]);
                lst.Add(observation);
            }
            return (VitalSign[])lst.ToArray(typeof(VitalSign));
        }
Esempio n. 19
0
        internal VitalSign[] toLatestVitalSigns(string response)
        {
            if (!cxn.IsConnected)
            {
                throw new NotConnectedException();
            }

            if (response == "")
            {
                return(null);
            }
            string[]  lines    = StringUtils.split(response, StringUtils.CRLF);
            ArrayList lst      = new ArrayList(lines.Length);
            string    category = "Vital Signs";

            for (int i = 0; i < lines.Length; i++)
            {
                if (lines[i] == "")
                {
                    continue;
                }
                string[]        flds            = StringUtils.split(lines[i], StringUtils.CARET);
                ObservationType observationType = null;
                if (flds[1] == "T")
                {
                    observationType = new ObservationType(flds[0], category, "Temperature");
                }
                else if (flds[1] == "P")
                {
                    observationType = new ObservationType(flds[0], category, "Pulse");
                }
                else if (flds[1] == "R")
                {
                    observationType = new ObservationType(flds[0], category, "Respiration");
                }
                else if (flds[1] == "BP")
                {
                    observationType = new ObservationType(flds[0], category, "Blood Pressure");
                }
                else if (flds[1] == "HT")
                {
                    observationType = new ObservationType(flds[0], category, "Height");
                }
                else if (flds[1] == "WT")
                {
                    observationType = new ObservationType(flds[0], category, "Weight");
                }
                else if (flds[1] == "PN")
                {
                    observationType = new ObservationType(flds[0], category, "Pain");
                }
                if (observationType == null)
                {
                    continue;
                }
                VitalSign observation = new VitalSign();
                observation.Type   = observationType;
                observation.Value1 = flds[4];
                if (flds.Length == 6)
                {
                    observation.Value2 = flds[5];
                }
                observation.Timestamp = VistaTimestamp.toUtcString(flds[3]);
                lst.Add(observation);
            }
            return((VitalSign[])lst.ToArray(typeof(VitalSign)));
        }
Esempio n. 20
0
 internal VitalSignSet[] toVitalSignsFromRdv(string response)
 {
     if (response == "")
     {
         return null;
     }
     string[] lines = StringUtils.split(response, StringUtils.CRLF);
     lines = StringUtils.trimArray(lines);
     ArrayList lst = new ArrayList();
     VitalSignSet rec = null;
     VitalSign s = null;
     for (int i = 0; i < lines.Length; i++)
     {
         string[] flds = StringUtils.split(lines[i], StringUtils.CARET);
         int fldnum = Convert.ToInt16(flds[0]);
         switch (fldnum)
         {
             case 1:
                 if (rec != null)
                 {
                     lst.Add(rec);
                 }
                 rec = new VitalSignSet();
                 string[] subflds = StringUtils.split(flds[1], StringUtils.SEMICOLON);
                 if (subflds.Length == 1)
                 {
                     rec.Facility = new SiteId("200", subflds[0]);
                 }
                 else
                 {
                     rec.Facility = new SiteId(subflds[1], subflds[0]);
                 }
                 break;
             case 2:
                 if (flds.Length == 2)
                 {
                     rec.Timestamp = VistaTimestamp.toUtcFromRdv(flds[1]);
                 }
                 break;
             case 3:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.TEMPERATURE);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.TEMPERATURE, s);
                 break;
             case 4:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.PULSE);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.PULSE, s);
                 break;
             case 5:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.RESPIRATION);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.RESPIRATION, s);
                 break;
             case 6:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.BLOOD_PRESSURE);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.BLOOD_PRESSURE, s);
                 break;
             case 7:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.HEIGHT);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.HEIGHT, s);
                 break;
             case 8:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.WEIGHT);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.WEIGHT, s);
                 break;
             case 9:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.PAIN);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.PAIN, s);
                 break;
             case 10:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.PULSE_OXYMETRY);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.PULSE_OXYMETRY, s);
                 break;
             case 11:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.CENTRAL_VENOUS_PRESSURE);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.CENTRAL_VENOUS_PRESSURE, s);
                 break;
             case 12:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.CIRCUMFERENCE_GIRTH);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.CIRCUMFERENCE_GIRTH, s);
                 break;
             case 15:
                 if (flds.Length == 2)
                 {
                     setVitalSignQualifierStrings(rec, flds[1], "Qualifiers");
                     rec.Qualifiers = flds[1];
                 }
                 break;
             case 16:
                 s = new VitalSign();
                 s.Type = new ObservationType("", VitalSign.VITAL_SIGN, VitalSign.BODY_MASS_INDEX);
                 if (flds.Length == 2)
                 {
                     s.Value1 = flds[1];
                 }
                 rec.addVitalSign(VitalSign.BODY_MASS_INDEX, s);
                 break;
             case 17:
                 if (flds.Length == 2)
                 {
                     setVitalSignQualifierStrings(rec, flds[1], "Units");
                     rec.Units = flds[1];
                 }
                 break;
             default:
                 break;
         }
     }
     lst.Add(rec);
     return (VitalSignSet[])lst.ToArray(typeof(VitalSignSet));
 }
Esempio n. 21
0
 private static void AddHeartRate(HeartRateDto heartRateDto, VitalSign vitalSign)
 {
     vitalSign.AddHeartRate(new HeartRate(heartRateDto.BeatsPerMinuteMeasure.GetValueOrDefault()));
 }
Esempio n. 22
0
 private static void AddBloodPressure(BloodPressureDto bloodPressureDto, VitalSign vitalSign)
 {
     vitalSign.AddBloodPressure(
         new BloodPressure(bloodPressureDto.SystollicMeasure.GetValueOrDefault(), bloodPressureDto.DiastollicMeasure.GetValueOrDefault()));
 }
Esempio n. 23
0
 private static void ChangeBloodPressure(BloodPressureDto bloodPressureDto, VitalSign vitalSign, BloodPressure bloodPressure)
 {
     RemoveBloodPressure(bloodPressureDto, vitalSign, bloodPressure);
     AddBloodPressure(bloodPressureDto, vitalSign);
 }
Esempio n. 24
0
 private static void ChangeHeartRate(HeartRateDto heartRateDto, VitalSign vitalSign, HeartRate heartRate)
 {
     RemoveHeartRate(heartRateDto, vitalSign, heartRate);
     AddHeartRate(heartRateDto, vitalSign);
 }
Esempio n. 25
0
 private static void RemoveBloodPressure(BloodPressureDto bloodPressureDto, VitalSign vitalSign, BloodPressure bloodPressure)
 {
     vitalSign.RemoveBloodPressure(bloodPressure);
 }
Esempio n. 26
0
 private static void RemoveHeartRate(HeartRateDto heartRateDto, VitalSign vitalSign, HeartRate heartRate)
 {
     vitalSign.RemoveHeartRate(heartRate);
 }
Esempio n. 27
0
        // not finished - need to determin in domain objects are correct/consider migrating to standard
        internal IList<VitalSignSet> toVitalsFromXmlNode(XmlNode node)
        {
            IList<VitalSignSet> vitals = new List<VitalSignSet>();

            int total = verifyTopLevelNode(node);
            if (total == 0)
            {
                return vitals;
            }

            XmlNodeList vitalsNodes = node.SelectNodes("/vital");
            if (vitalsNodes == null || vitalsNodes.Count == 0)
            {
                return vitals;
            }

            foreach (XmlNode vitalNode in vitalsNodes)
            {
                XmlNodeList measurementNodes = vitalNode.SelectNodes("/measurements/measurement");
                if (measurementNodes == null || measurementNodes.Count == 0)
                {
                    continue;
                }
                VitalSignSet vitalsSet = new VitalSignSet();
                IList<VitalSign> vitalsSetVitals = new List<VitalSign>();

                foreach (XmlNode measurementNode in measurementNodes)
                {
                    VitalSign vital = new VitalSign();
                }
            }

            return vitals;
        }