Esempio n. 1
0
        public VitalSign AddVitals(VitalSign vsign)
        {
            VitalSign vitals = _vitals.FindAll().OrderBy(p => p.VitalsId).Last();

            vsign._id = ObjectId.GenerateNewId().ToString();
            Int32 newvitid = vitals.VitalsId + 1;

            vsign.VitalsId = newvitid;
            if (vsign.EncounterType == "P")
            {
                vsign.EncounterType = "I,A";
            }
            _vitals.Insert(vsign);
            return(vsign);
        }
        public VitalSign UpdatePatient(VitalSign vsign)
        {
            var session = HttpContext.Current.Session;

            if (session["UserId"] != null)
            {
                userId = session["UserId"].ToString();
            }
            VitalSign       vitals = _Vitals.UpdatePatient(vsign);
            EncounterReport erp    = new EncounterReport();

            erp.RefId     = vitals._id;
            erp.PatientId = vitals.UserId;
            erp.UpdateBy  = userId;
            erp.Action    = "update Vitals";
            var encreports = encrepo.AddEncReport(erp);

            return(vitals);
        }
Esempio n. 3
0
        public VitalSign UpdatePatient(VitalSign Vitalsign)
        {
            var vitalexist = GetByUserId(Vitalsign.UserId);

            if (Vitalsign.EncounterType == "P")
            {
                if (Vitalsign.UserId != "a8a56c1d-203c-4c53-9d95-972dec7a2ef5" || Vitalsign.UserId == "b6c625f5-653a-429f-b134-5b4d128ce4e8" || Vitalsign.UserId == "a24e6d62-414d-4434-bbe3-b3eec3a026e7")
                {
                    Vitalsign.EncounterType = "I,A";
                }
            }
            VitalSign vitals = vitalexist.Where(p => p._id == Vitalsign._id).First();

            vitals.BMI           = Vitalsign.BMI;
            vitals.BloodPressure = Vitalsign.BloodPressure;
            vitals.Height        = Vitalsign.Height;
            vitals.Weight        = Vitalsign.Weight;
            vitals.RecordedDate  = Vitalsign.RecordedDate;

            _vitals.Save(vitals);

            return(vitals);
        }