Admin Bulk Upload Services - hmislk/hmis GitHub Wiki
Bulk Upload of Services and Items
Overview
HMIS supports bulk upload of OPD services, investigations, fees, and other item data from spreadsheet files. This is used during initial system setup, when migrating from another system, or when making large-scale price updates. This page covers the available upload options and how to use them.
When to Use
- Setting up a new institution with hundreds of services
- Applying a price revision across all services at once
- Migrating item data from an existing system
- Uploading new doctor/hospital fee schedules
Navigating to Upload Pages
- Click Administration → Manage Items
- In the item management index, look for upload options — they are grouped under setup/utility sections
Required privilege: AdminItems
Available Upload Options
Item and Fee Uploads
| Upload Page | What It Does |
|---|---|
| Item and Fees Upload | Bulk upload items with their base fees |
| Item and Fees Upload with Foreigner Fee | Upload items + base fees + separate foreigner fee |
| Item and Fee Upload for Collecting Centres | Upload items and fees specific to collecting centres |
| Item and Fee Upload for Outsource Investigations | Upload outsourced investigation items and fees |
| OPD Items and Doctor Fee Upload | Upload OPD services with doctor-specific fee components |
| OPD Items and Hospital Fee Upload | Upload OPD services with hospital fee components |
| OPD Items Upload to Correct Code | Correct item codes for existing OPD services |
| Upload Add Professional Fees | Add professional fee components to existing items |
Investigation Uploads
| Upload Page | What It Does |
|---|---|
| Investigation Upload | Bulk upload lab investigation items |
Export / Download
| Export Page | What It Does |
|---|---|
| Download Items | Export all items to a spreadsheet |
General Upload Process
For all upload pages, the workflow is:
- Prepare your spreadsheet in the required format (each upload page specifies the column structure)
- Navigate to the appropriate upload page
- Click Choose File and select your spreadsheet
- Click the upload/process button
- Review any error messages — rows with errors are usually skipped or flagged
Important: Always download and review a sample or template before uploading. Incorrect column formats will cause data to be imported incorrectly.
Downloading the Current Item List
Before making changes, download the current item list:
- Navigate to Download Items from the item management index
- The current item data is exported as a spreadsheet
This is useful for creating an update file based on current data.
Data Integrity Notes
- Upload operations are typically non-destructive for existing data unless you are using a "replace" variant
- The "Upload to Replace" variants overwrite existing fee values — use with caution
- Test uploads on a staging environment before running on production
- If an upload creates duplicates, use the Item Bulk Un-Delete or Fix Item Categories by Code utilities to correct issues
Technical Notes (Admin/Developer)
Upload processing is handled by UploadController and DataUploadController. Each upload page expects a specific spreadsheet format. The upload reads each row, looks up or creates the Item entity, and creates or updates associated Fee records. Error handling varies by upload type — some skip invalid rows; others halt on first error.