public string CheckVitals(VitalsCategory vital) { var a = CheckSpo2(vital.Spo2); var b = CheckBpm(vital.Bpm); var c = CheckRespRate(vital.RespRate); var s = a + b + c; // SendMail(s); return(s); }
private async System.Threading.Tasks.Task AddPatientDetails_ClickAsync() { var newAddress = new PatientAddress() { HouseNo = textBoxHouseNo.Text, Street = textBoxStreet.Text, City = textBoxCity.Text, State = textBoxState.Text, Pincode = textBoxPincode.Text }; var newVitals = new VitalsCategory() { PatientId = textBoxPatientId.Text, Spo2 = float.Parse(textBoxSpo2.Text), Bpm = float.Parse(textBoxBpm.Text), RespRate = float.Parse(textBoxResp.Text) }; var newPatient = new PatientDetails() { PatientId = textBoxPatientId.Text, PatientName = textBoxPatientName.Text, Age = int.Parse(textBoxAge.Text), ContactNo = textBoxContactNo.Text, BedId = textBoxBedId.Text, IcuId = textBoxIcuId.Text, Email = textBoxEmail.Text, Address = newAddress, Vitals = newVitals }; var response = await Client.PostAsync("http://localhost:5000/api/IcuOccupancyDetails/Patients", new StringContent(JsonConvert.SerializeObject(newPatient), Encoding.UTF8, "application/json")); var responseString = await response.Content.ReadAsStringAsync(); textBoxPatientId.Text = responseString; }
public void ValidateVitalsList(VitalsCategory vitals) { _validator.IsWhitespaceOrEmptyOrNull(vitals.Bpm.ToString(CultureInfo.CurrentCulture)); _validator.IsWhitespaceOrEmptyOrNull(vitals.Spo2.ToString(CultureInfo.CurrentCulture)); _validator.IsWhitespaceOrEmptyOrNull(vitals.RespRate.ToString(CultureInfo.CurrentCulture)); }