public Core.Domain.Patient AddPatient(Core.Domain.Patient patient)
        {
            if (patient == null)
            {
                throw new ArgumentNullException(nameof(patient));
            }
            var checkPatient = _patientRepository.Table.Where(p => p.PatientIdNumber == patient.PatientIdNumber && p.OrganizationId == patient.OrganizationId).FirstOrDefault();

            if (checkPatient == null)
            {
                patient.CreatedDate = DateTime.Now;
                _patientRepository.Insert(patient);
                return(patient);
            }
            else
            {
                //checkPatient.Age = patient.Age;
                //checkPatient.FullName = patient.FullName;
                //checkPatient.Location = patient.Location;
                //checkPatient.PhoneNumber = patient.PhoneNumber;
                return(checkPatient);
            }
        }
 public void UpdatePatient(Core.Domain.Patient patient)
 {
     _patientRepository.Update(patient);
 }