def dvr_due_followups():

    query = (FS("followup") == True) & \
            (FS("followup_date") <= datetime.datetime.utcnow().date()) & \
            (FS("completed") != True) & \
            (FS("person_id$dvr_case.archived") == False)
    resource = current.s3db.resource("dvr_case_activity", filter=query)

    return resource.count()

# =============================================================================
UNIXPasswordDatabase.requestAvatarId loops through each getpwnam
dataset/ETHPy150Open sahana/eden/modules/s3db/dvr.py/dvr_due_followups--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/conch/test/test_checkers.py/UNIXPasswordDatabaseTests.test_loopThroughFunctions