Beispiel #1
0
        public void AddCardixPatient(CardixPatient patient)
        {
            try
            {
                using (IDbConnection dbConnection = Connection)
                {
                    dbConnection.Open();
                    DynamicParameters parameters = new DynamicParameters();
                    parameters.Add("PatientId", patient.PatientId);
                    parameters.Add("Name", patient.Name);
                    parameters.Add("Age", patient.Age);
                    parameters.Add("Sex", patient.Sex);
                    parameters.Add("HealthCondition", patient.HealthCondition);
                    parameters.Add("CurrentTemperature", patient.CurrentTemperature);
                    parameters.Add("CurrentBP", patient.CurrentBP);
                    parameters.Add("CurrentHPR", patient.CurrentHPR);
                    parameters.Add("SleepRestHours", patient.SleepRestHours);
                    parameters.Add("ExcerciseHours", patient.ExcerciseHours);
                    parameters.Add("MonitorName", patient.MonitorName);
                    parameters.Add("MonitorPhone", patient.MonitorPhone);
                    parameters.Add("MonitorEmail", patient.MonitorEmail);
                    parameters.Add("RegistrationHospital", patient.RegistrationHospital);
                    parameters.Add("PatientLocationLat", patient.PatientLocationLat);
                    parameters.Add("PatientLocationLong", patient.PatientLocationLong);
                    parameters.Add("PatientRegistrationDate", patient.PatientRegistrationDate);
                    parameters.Add("LastCheckUpDate", patient.LastCheckUpDate);
                    parameters.Add("LastIncidentDate", patient.LastIncidentDate);

                    SqlMapper.Execute(dbConnection, "AddNewCardixPatient", param: parameters, commandType: CommandType.StoredProcedure);
                }
            }catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
 public void UpdateCardixPatient([FromBody] CardixPatient patient)
 {
     _cardixPatientService.UpdateCardixPatient(patient);
 }
Beispiel #3
0
 public IActionResult AddNewCardixPatient([FromBody] CardixPatient patient)
 {
     _cardixPatientService.AddCardixPatient(patient);
     return(CreatedAtAction(nameof(GetCardixPatientById), patient.Id, patient));
 }
 public void UpdateCardixPatient(CardixPatient patient)
 {
     _patientRepository.UpdateCardixPatient(patient);
 }
 public void AddCardixPatient(CardixPatient patient)
 {
     _patientRepository.AddCardixPatient(patient);
 }