(startdate, enddate, domains, should_create=False)
return missing_case_counts_per_domain
:param startdate: search for missing case repeat records after this date
    :param enddate: search for missing case repeat records before this date
    :param domains: list of domains to check
    :param should_create: if  True, missing repeat records that are discovered will be registered with the repeater
    :return: a dictionary containing stats about the missing repeat records and metadata
:param startdate: search for missing case repeat records after this date
    :param enddate: search for missing case repeat records before this date
    :param domains: list of domains to check
    :param should_create: if  True, missing repeat records that are discovered will be registered with the repeater
    :return: a dictionary containing stats about the missing repeat records and metadata
: param startdate : search for missing case repeat records after this date : param enddate : search for missing case repeat records before this date : param domains : list of domains to check : param should_create : if True missing repeat records that are discovered will be registered with the repeater : return : a dictionary containing stats about the missing repeat records and metadata
def find_missing_case_repeat_records(startdate, enddate, domains, should_create=False):
    """
    :param startdate: search for missing case repeat records after this date
    :param enddate: search for missing case repeat records before this date
    :param domains: list of domains to check
    :param should_create: if  True, missing repeat records that are discovered will be registered with the repeater
    :return: a dictionary containing stats about the missing repeat records and metadata
    """
    missing_case_counts_per_domain = {}
    for index, domain in enumerate(domains):
        t0 = time.time()
        try:
            missing_case_counts = find_missing_case_repeat_records_for_domain(
                domain, startdate, enddate, should_create
            )
            t1 = time.time()
            time_to_run = t1 - t0

            number_of_records_missing = missing_case_counts[MISSING_REPEAT_RECORD_COUNT]
            number_of_records_expected = missing_case_counts[EXPECTED_REPEAT_RECOUNT_COUNT]
            if number_of_records_missing > 0:
                missing_case_counts_per_domain[domain] = missing_case_counts
                pct_missing = f'{round((number_of_records_missing / number_of_records_expected) * 100, 2)}%'
                rounded_time = f'{round(time_to_run, 0)} seconds'
                logger.info(f'{domain} complete. Found {number_of_records_missing}" missing case repeat records '
                            f'in {rounded_time}. This accounts for {pct_missing} of all case repeat records in '
                            f'the specified date range'
                            )
            else:
                logger.info(f"Found 0 missing case repeat records in {domain}.")
            if index + 1 % 10 == 0:
                logger.info(f"{(index + 1)}/{len(domains)} domains complete.")

        except Exception as e:
            logger.error(f"Encountered error with {domain}: {e}")

    return missing_case_counts_per_domain
def find_missing_case_repeat_records ( startdate , enddate , domains , should_create = False ) : missing_case_counts_per_domain = { } for index , domain in enumerate ( domains ) : t0 = time . time ( ) try : missing_case_counts = find_missing_case_repeat_records_for_domain ( domain , startdate , enddate , should_create ) t1 = time . time ( ) time_to_run = t1 - t0 number_of_records_missing = missing_case_counts [ MISSING_REPEAT_RECORD_COUNT ] number_of_records_expected = missing_case_counts [ EXPECTED_REPEAT_RECOUNT_COUNT ] if number_of_records_missing > 0 : missing_case_counts_per_domain [ domain ] = missing_case_counts pct_missing = f'{round((number_of_records_missing / number_of_records_expected) * 100, 2)}%' rounded_time = f'{round(time_to_run, 0)} seconds' logger . info ( f'{domain} complete. Found {number_of_records_missing}" missing case repeat records ' f'in {rounded_time}. This accounts for {pct_missing} of all case repeat records in ' f'the specified date range' ) else : logger . info ( f"Found 0 missing case repeat records in {domain}." ) if index + 1 % 10 == 0 : logger . info ( f"{(index + 1)}/{len(domains)} domains complete." ) except Exception as e : logger . error ( f"Encountered error with {domain}: {e}" ) return missing_case_counts_per_domain