public Domain.Triage setTriageDetails(models.Note note)
        {
            Domain.Triage triage = new Domain.Triage();
            triage.id = note.triageId;
            triage.abdominalPerimeter = note.triage.vitalFunctions.waistCircumference;
            triage.bmi                    = note.triage.vitalFunctions.bmi;
            triage.breathingRate          = note.triage.vitalFunctions.respiratoryRate;
            triage.diastolicBloodPressure = note.triage.vitalFunctions.diastolic;
            triage.heartRate              = note.triage.vitalFunctions.heartRate;
            triage.heartRisk              = note.triage.vitalFunctions.cardiovascularAge;
            triage.hypertensionRisk       = note.triage.vitalFunctions.hypertensionRisk;
            triage.systolicBloodPressure  = note.triage.vitalFunctions.systolic;
            triage.temperature            = note.triage.vitalFunctions.temperature;
            triage.weight                 = note.triage.vitalFunctions.weight;
            triage.size                   = note.triage.vitalFunctions.height;

            triage.sleep           = note.triage.biologicalFunctions.sleep;
            triage.hunger          = note.triage.biologicalFunctions.hunger;
            triage.deposition      = note.triage.biologicalFunctions.deposition;
            triage.thirst          = note.triage.biologicalFunctions.thirst;
            triage.urine           = note.triage.biologicalFunctions.urine;
            triage.weightEvolution = note.triage.biologicalFunctions.weightEvolution;

            triage.glycemia         = note.triage.others.glycemia;
            triage.hdlCholesterol   = note.triage.others.hdlCholesterol;
            triage.ldlCholesterol   = note.triage.others.ldlCholesterol;
            triage.totalCholesterol = note.triage.others.totalCholesterol;
            triage.patientId        = note.patientId;
            return(triage);
        }
Esempio n. 2
0
        public HttpResponseMessage GetLatest(Domain.Patient mPatient)
        {
            HttpResponseMessage response = null;

            try
            {
                Domain.Triage mTriage = triageService.GetLatest(mPatient);
                if (mTriage == null)
                {
                    response = Request.CreateResponse(HttpStatusCode.NotFound, "Requested entity was not found in database.");
                }
                else
                {
                    response = Request.CreateResponse(HttpStatusCode.OK, mTriage);
                }
            }
            catch (Exception ex)
            {
                response = Request.CreateResponse(HttpStatusCode.NotFound, ex.Message);
            }
            return(response);
        }