public List<IPatient> GetPatientPeriodic(List<IPatient> patients)
        {
            try
            {
                var lucene = new LuceneClient(_luceneIndexPath);
                Totalrecords = patients.Count;
                var patientsLucene = new List<IPatient>();
                while (totalRecordsProcess < Totalrecords)
                {
                    var records = patients.Skip(totalRecordsProcess).Take(fatia).ToList();
                    var patientsFatia = lucene.AdvancedSearch(records).ToList();
                    patientsLucene.AddRange(patientsFatia);
                    Fatiar();
                }
                return patientsLucene;
            }
            catch (Exception)
            {

                throw;
            }
        }
 public List<IPatient> GetPatientsAdvancedSearch(IPatient patient, List<string> hospitals)
 {
     var lucene = new LuceneClient(_luceneIndexPath);
     return lucene.AdvancedSearch(patient, hospitals).ToList();
 }
 public List<IPatient> GetPatients(string name)
 {
     var lucene = new LuceneClient(_luceneIndexPath);
     return lucene.SimpleSearch(name).Take(10).ToList();
 }
 public IPatient GetPatientBy(string cpf)
 {
     var lucene = new LuceneClient(_luceneIndexPath);
     return lucene.SearchBy(cpf);
 }
 public virtual void SavePatientsLucene(List<IPatient> patients)
 {
     var lucene = new LuceneClient(_luceneIndexPath);
     lucene.AddUpdateLuceneIndex(patients);
 }