Custom Modules

CommCare HQ includes some code written for specific projects.

Most of this consists of custom reports or customized messaging logic.

COVID: Available Actions

The following actions can be used in messaging in projects using the covid custom module.

custom.covid.rules.custom_actions.close_cases_assigned_to_checkin(checkin_case, rule)[source]

For any associated checkin case that matches the rule criteria, the following occurs:

  1. For all cases of a given type, find all assigned cases. An assigned case is a case for which all of the following are true:

    • Case type patient or contact

    • Exists in the same domain as the user case

    • The case property assigned_to_primary_checkin_case_id equals an associated checkin case’s case_id

  2. For every assigned case, the following case properties are blanked out (set to “”):

    • assigned_to_primary_checkin_case_id

    • is_assigned_primary

    • assigned_to_primary_name

    • assigned_to_primary_username

COVID: Available Criteria

The following criteria can be used in messaging in projects using the covid custom module.

custom.covid.rules.custom_criteria.associated_usercase_closed(case, now)[source]

Is this an open checkin case where the associated usercase has been closed?