private bool IsMatch(SearchPatient patient, string[] searchTerms)
        {
            switch (searchTerms.Length)
            {
            case 0:
                return(false);

            case 1:
                return(IsMatchWithOneSearchTerm(patient, searchTerms[0]));

            default:
                return(IsMatchWithTwoSearchTerms(patient, searchTerms[0], searchTerms[1]));
            }
        }
 private bool IsMatchWithLastThenFirstName(SearchPatient patient, string lastName, string firstName) =>
 IsSubstring(lastName, patient.LastName) && IsSubstring(firstName, patient.FirstName);
 private bool IsMatchWithTwoSearchTerms(SearchPatient patient, string term1, string term2) =>
 IsMatchWithLastThenFirstName(patient, term1, term2) ||
 IsMatchWithLastThenFirstName(patient, term2, term1);
 private bool IsMatchWithOneSearchTerm(SearchPatient patient, string term) =>
 IsSubstring(term, patient.Id) ||
 IsSubstring(term, patient.LastName) ||
 IsSubstring(term, patient.FirstName);