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();
 }