def getNextURL(links):
    """
    Helper function for getAllPatients, get the next url so we can loop to get all resources
    :param links:
    :return:
    """
    if type(links) == list:
        for link in links:
            if link.relation == 'next':
                return link.url
    return None