def make_print_msg_specific(
        integration_rate, starting_msg, err_type):
    """
    Function is used to make the print message more specific
    by replacing 'generic' phrases with phrases that more
    completely explain the data quality issue at play.

    :param
    integration_rate (bool): determines if the data quality
        metric to be printed is an 'integration rate' rather
        than a problem with data quality. This warrants a
        change in how the message will be printed.

    starting_msg (str): the message to build off that
        will ultimately be displayed

    err_type (str): indicates the type of error metric that is
        being reported. Used to change what is printed so it is
        more appropriate.

    :return:
    starting_msg (str): the message with the data quality issue
        that now has a more specific indicator for the
        problem at hand
    """
    if integration_rate:
        # only one issue; make first informative
        starting_msg = starting_msg.replace(
            'of data)^', 'of expected concepts are not '
                         'successfully integrated)')

        # series of issues; make first informative
        starting_msg = starting_msg.replace(
            'of data),^', 'of expected concepts are not '
                          'successfully integrated),')

        # do not make non-first messages overly long
        starting_msg = starting_msg.replace(
            'of data', ' of concepts not integrated')

    elif err_type in ['concept']:
        starting_msg = starting_msg.replace(
            'of data)^', 'of concept_ids are not '
            'properly mapped)')

        starting_msg = starting_msg.replace(
            'of data),^', 'of concept_ids are not '
            'properly mapped),')

        starting_msg = starting_msg.replace(
            'of data', 'of concept_ids')

    elif err_type in ['drug_routes']:
        starting_msg = starting_msg.replace(
            'of data)^', 'of route_concept_ids '
            'are not properly populated)'
        )

        starting_msg = starting_msg.replace(
            'of data),^', 'of route_concept_ids '
            'are not properly populated),'
        )

        starting_msg = starting_msg.replace(
            'of data', 'of drugs'
        )

    elif err_type in ['end_before_begin']:
        starting_msg = starting_msg.replace(
            'of data)^', 'of end dates precede '
                         'start dates')

        starting_msg = starting_msg.replace(
            'of data),^', 'of end dates precede '
                          'start dates')

    elif err_type in ['drug_success']:
        starting_msg = starting_msg.replace(
            'of data)^', 'of drug ingredients '
            'are properly populated)'
        )

        starting_msg = starting_msg.replace(
            'of data),^', 'of drug ingredients '
            'are properly populated),'
        )

        starting_msg = starting_msg.replace(
            'of data', 'of drugs'
        )

    elif err_type in ['sites_measurement']:
        starting_msg = starting_msg.replace(
            'of data)^', 'of measurement concepts '
            'are properly populated)'
        )

        starting_msg = starting_msg.replace(
            'of data),^', 'of measurement concepts '
            'are properly populated),'
        )

        starting_msg = starting_msg.replace(
            'of data', 'of measurements'
        )

    # get rid of lingering underscores
    starting_msg = starting_msg.replace('^', '')

    return starting_msg