Admin Data Administration - hmislk/hmis GitHub Wiki
Data Administration and Schema Utilities
Overview
The Data Administration module (labelled Manage Metadata in the menu) is a collection of system maintenance, data quality, and diagnostic utilities. It is intended for use by system administrators and is not part of regular clinical operations. The tools here help with database schema checks, bill error investigation, data corrections, and system process management.
Navigating to Data Administration
- Click Administration in the main menu
- Click Manage Metadata
- The Manage Metadata hub opens with a left navigation panel
Required privilege: AdminItems
Available Sections
Manage Processes
| Button | Description |
|---|---|
| Process Definition | Define automated process workflows |
| Process Definition Step | Define steps within a process |
| Process Definition Step Action | Define actions at each step |
Schedules
| Button | Description |
|---|---|
| Scheduled Process Configuration | Configure processes that run on a timer |
Upload
| Button | Description |
|---|---|
| Members | Bulk upload membership data |
Analysis Report Templates
| Button | Description |
|---|---|
| Add New Template | Create a custom analysis report template |
| List Templates | View all report templates |
Manage Frontend Website
Content management for the patient-facing website, including short/long content items, list contents, images, languages, templates, and template components.
Manage Data Entry Forms
Create and list custom data entry form designs using the form builder.
Data
| Button | Description |
|---|---|
| Generate Historical Record | Create a historical data snapshot for archival or reporting |
| Historical Record List | View previously generated historical records |
| Archive Old Stock History | Archive stock history records older than a threshold (requires ArchiveOldStockHistory privilege) |
Search & Lists
| Button | Description |
|---|---|
| Search Any Bill | Universal bill search across all modules (requires Search privilege) |
| Bills with Errors | Lists bills that have data integrity issues |
| OPD Bills and Bill Items | Browse OPD billing data with item-level detail |
| Bill Summary | Aggregate bill summary view |
| List Payments | View payment records |
| List OPD Services | View OPD service/investigation list |
| OPD Service Department List | Mapping of services to departments |
| Download Log Files | Access server log files for diagnostics |
| Fill Missing Dept Bill Number | Repair bills missing department bill numbers |
| Bill Dept ID Editor | Correct department ID assignments on bills |
Missing Database Fields
The missing_database_fields.xhtml page performs a schema audit — comparing the current database schema against a reference version and identifying any fields that are missing from the database tables. This is used to detect incomplete database migrations.
It features:
- DDL Version Check — compares the wiki DDL version against the stored
DATABASE_DDL_VERSIONConfigOption - If versions differ, runs the full legacy field scan
- Displays a list of missing fields with migration SQL
Navigate via the Search & Lists section or directly from the metadata index.
When to Use These Tools
- Bills with Errors — when a report shows unexpected zero totals or data gaps
- Fill Missing Dept Bill Number — after a deployment when some bill numbers were not generated
- Missing Database Fields — after upgrading HMIS to verify the database is fully current
- Search Any Bill — for cross-module bill investigation
- Archive Old Stock History — before a reporting period to reduce table size
Technical Notes (Admin/Developer)
The hub is managed by DataAdministrationController.navigateToAdminDataAdministration(). Schema audit is implemented in DataAdministrationController.checkMissingFields(). The DDL version check compares configOptionApplicationController.getShortTextValueByKey('DATABASE_DDL_VERSION') against the wiki page version string. Tools in the "Search & Lists" and "Data" sections access the Bill, Payment, BillItem, and related entities directly.