Eligibility Manager

The eligibility manager verifies if a beneficiary is eligible for a given program. The eligibility determination can be based on data stored in OpenG2P-ng or on an external system using API calls.

g2p_programs.models.managers.eligibility_manager provides the class BaseEligibilityManager define the interface for this manager. DefaultEligibilityManager is the default implementation of this class that should be used in most of the cases.

class g2p_programs.models.managers.eligibility_manager.BaseEligibilityManager(*args: Any, **kwargs: Any)[source]
enroll_eligible_registrants(program_memberships)[source]

This method is used to validate if a user match the criteria needed to be enrolled in a program. Args:

program_membership:

Returns:

bool: True if the user match the criterias, False otherwise.

import_eligible_registrants()[source]

This method is used to import the beneficiaries in a program. Returns:

verify_cycle_eligibility(cycle, program_memberships)[source]

This method is used to validate if a beneficiary match the criteria needed to be enrolled in a cycle. Args:

cycle: program_membership:

Returns:

bool: True if the cycle match the criterias, False otherwise.

class g2p_programs.models.managers.eligibility_manager.DefaultEligibilityManager(*args: Any, **kwargs: Any)[source]
enroll_eligible_registrants(program_memberships)[source]
verify_cycle_eligibility(cycle, membership)[source]