Archiving Families and Family Members

This document scopes the business logic required when archiving families and family members. The Reveal Android client has the feature to archive families and family members. We do not delete families or family members from the system, we put them into an inactive status so any references to them are not broken in the future.

Archive Family Member

Affected Task Types:

  • Blood Screening
  • Case Confirmation

Archive Family Member Logical Flow:

  • Complete the form to archive a family member (choose the family member and reason)
  • Post Save Actions:
    • Remove the family member from the family members list by changing their status to "Archived"
    • Search through the system and see if there are any relationships between this person and another (This is just a precaution so the app doesn't crash)
    • Identify if there are any tasks with status="Ready" assigned to that person
      • If the task is has code:"Case Confirmation" we may be dealing with a special case where the case confirmation was assigned to the wrong person.
        • Change the task status to "Cancelled"
        • Remove the target from the household
        • Generate a new case confirmation task at the operational area level
      • For all other tasks, update the task status to "Cancelled"
      • Remove them from the task list view
      • Make sure these task changes are synced back up to the server
    • Search for any tasks that have been completed
      • Remove them from the task list view (the link to the person will no longer work)
      • Update the color coding of the location in the map view if appropriate based on the new color coding schema

Archive Family

Affected Task Types:

  • RACD Register Family
  • Bednet Distribution ← Samuel Githengi, please confirm this (Currently this attached to the structure, but its possible to archive the task)

Archive Family Member Logical Flow:

  • Complete the form to archive the family
  • Post Save Actions:
    • Loop through each family member and perform the archive process as defined above
    • Identify if there are any tasks with status = "Ready" assigned to that location
      • (Rare case) If the task as code="RACD Register Family" do nothing
      • If a task has code="Bednet Distribution", update the task status to "Cancelled" and remove it from the list view
    • Identify if there are any tasks that do not have a status="Ready"
      • Remove them from the task list view
      • Remove them from the map view (update the color schema on the map view if appropriate)
      • Create a new "RACD Register Family" task on the Android client so the user can register another family to that location.

Web UI and reporting implications

This section identifies implications of this process on the web app and reporting solution. This information will not show up in the web UI dashboards. It's not actionable, but needs to remain available for auditing purposes.

  • Archived families and family members should propagate through the ETL process and show up in the data warehouse
  • We need to review the queries and remove any archived families, family members, form submissions and tasks from the dashboards so they don't show up as real information
  • Superset users should be able to build a report that shows counts of the number of families archived and family members archived.

General Android Client Logic

  • These changes should sync from the Android client to the server
  • Archived clients should no longer be considered in any sync activities between the client and server
  • Cancelled tasks should not sync from the server to the Android client