Admin Institution Department Audit - hmislk/hmis GitHub Wiki

Department and Institution Audit History

Overview

Individual departments and institutions have their own dedicated audit history pages, accessible directly from their management screens. This makes it easy to investigate the history of a specific entity without searching through a system-wide log.

Viewing Department Audit History

  1. Click AdministrationManage InstitutionsDepartments
  2. Select the department from the list
  3. Click History in the action buttons
  4. The Department Audit Events page opens

The page shows:

  • Department details at the top: Name, Code, Status, Type, Institution, Site, and total event count
  • Audit Events table below with all historical changes

Click Refresh Events to reload the latest events. Click Back to Department List to return.

Events recorded for departments:

  • Create Department
  • Update Department
  • Delete Department
  • Activate Department
  • Deactivate Department

Viewing Institution Audit History

  1. Click AdministrationManage InstitutionsInstitutions
  2. Select the institution
  3. Click History from the institution management page
  4. The Institution Audit Events page opens with the same column structure as department audit events

Events recorded for institutions:

  • Create Institution
  • Update Institution
  • Delete/Retire Institution
  • Activate Institution

Viewing Site Audit History

From the Site Management screen, select a site and click History to see site-level audit events. The events include:

  • Site creation
  • Site edits
  • Status changes (Activate / Deactivate)

The Editing Details tab on the site form also shows who deactivated the site and when.

Audit Event Columns

Column Description
ID Record identifier
Date / Time Timestamp of the event
Action Event type, colour-coded by action
User Who performed the action
Changes Field-by-field diff of what changed
Status Completed, Failed, or Pending
IP Address Network address of the user's device

Technical Notes (Admin/Developer)

Department audit events are loaded by departmentController.fillDepartmentAuditEvents() which queries AuditEvent WHERE entityId = department.id AND entityType = 'Department'. Institution audit events follow the same pattern via institutionController. The difference field stores a pre-formatted diff string generated at save time by AuditEventApplicationController.

Related Features