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

custom.covid.rules.custom_actions.set_all_activity_complete_date_to_today(case, rule)[source]

For any case matching the criteria, set the all_activity_complete_date property to today’s date, in YYYY-MM-DD format, based on the domain’s default time zone.

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?