

def get_supply_point_ids_in_domain_by_location(domain):
    """
    Returns a dict that maps from associated location id's
    to supply point id's for all supply point cases in the passed
    domain.
    """
    from corehq.apps.commtrack.models import SupplyPointCase
    return {
        row['key'][1]: row['id'] for row in SupplyPointCase.get_db().view(
            'supply_point_by_loc/view',
            startkey=[domain],
            endkey=[domain, {}],
        )
    }

6f8f8d1cfaf3b6f36aafb2d8ded8dd9874d86c85
<mask token>

def get_supply_point_ids_in_domain_by_location(domain):
    """
    Returns a dict that maps from associated location id's
    to supply point id's for all supply point cases in the passed
    domain.
    """
    from corehq.apps.commtrack.models import SupplyPointCase
    return {row['key'][1]: row['id'] for row in SupplyPointCase.get_db().
        view('supply_point_by_loc/view', startkey=[domain], endkey=[domain,
        {}])}



def get_supply_point_ids_in_domain_by_location(domain):
    """
    Returns a dict that maps from associated location id's
    to supply point id's for all supply point cases in the passed
    domain.
    """
    from corehq.apps.commtrack.models import SupplyPointCase
    return {
        row['key'][1]: row['id'] for row in SupplyPointCase.get_db().view(
            'supply_point_by_loc/view',
            startkey=[domain],
            endkey=[domain, {}],
        )
    }
