public IActionResult CreatePatient(
            [FromBody] Patient patient)
        {
            if (_patientDbService.FindPatient(patient.FirstName,
                                              patient.LastName, patient.DateOfBirth) != null)
            {
                return(ReturnProblem("Patient already exists.", StatusCodes.Status400BadRequest));
            }

            _patientDbService.AddPatient(patient);

            return(NoContent());
        }
Пример #2
0
 public static void InitializeDb(IPatientDbService patientDbService)
 {
     patientDbService.AddPatient(Patient);
     patientDbService.AddPatientContact(PatientContact);
 }