Exemple #1
0
        public IHttpActionResult UpdateMedicalInformation(string ClientId, MedicalInformation medicalInformation)
        {
            MedicalInformation mInfo = _medicalInformationRepository.Find(x => x.clientId == ClientId).FirstOrDefault();

            mInfo.Hight                = medicalInformation.Hight;
            mInfo.Wight                = medicalInformation.Wight;
            mInfo.BloodGroup           = medicalInformation.BloodGroup;
            mInfo.Diseases             = medicalInformation.Diseases;
            mInfo.AnyAllergies         = medicalInformation.AnyAllergies;
            mInfo.AnyHealthCrisis      = medicalInformation.AnyHealthCrisis;
            mInfo.AnyRegularMedication = medicalInformation.AnyRegularMedication;
            mInfo.Disability           = medicalInformation.Disability;
            mInfo.Smoke                = medicalInformation.Smoke;
            mInfo.Drink                = medicalInformation.Drink;
            mInfo.OtherDetails         = medicalInformation.OtherDetails;
            return(Ok(_medicalInformationRepository.Update(mInfo)));
        }
        public HttpResponseMessage GetMedicalInformation(string Id)
        {
            var result = _medicalInformationRepo.Find(m => m.clientId == Id).ToList();

            return(Request.CreateResponse(HttpStatusCode.Accepted, result));
        }