Admin Staff Institution Assignment - hmislk/hmis GitHub Wiki
Assigning Staff to Institutions
Overview
For channelling, doctors and consultants must be explicitly assigned to the institutions where they hold sessions. This is separate from the doctor's primary institution on their staff record — a consultant may work at multiple hospitals, and each one needs a Person-Institution mapping before channelling sessions can be scheduled there.
When to Use
- A consultant is starting sessions at a new hospital branch and needs to be added to that institution's channelling list
- You need to find all consultants assigned to a specific institution
- A consultant has left an institution and their assignment needs to be removed
Navigating to Person-Institution Management
- Click Administration → Manage Staff
- In the left index, click Add Channelling Consultants to Institutions (under the Setup section)
- The Manage Person Institutions (Channelling) screen opens
Required privilege: AdminStaff
Adding Consultants to an Institution
The screen is divided into two panels:
Top Panel — Add Doctors
- Select the Institution using the autocomplete field
- Optionally filter by Speciality to narrow the list
- Click Fill Doctors — the table below populates with doctors who are not yet assigned to the selected institution
- Select one or more doctors in the table (checkbox selection, multiple rows allowed)
- Click Add Doctors
- The selected doctors are assigned to the institution
Bottom Panel — Search and Remove
- Filter by Institution, Speciality, and/or Staff member
- Click Fill Person Institutions to load matching assignments
- The table shows: Doctor Name, Speciality, Institution Name, Code, Phone, Mobile
- Click Remove next to any row to remove that doctor from the institution
Exporting the Assignment List
Click Excel to download the current search results as an Excel file.
Technical Notes (Admin/Developer)
Assignments are stored as PersonInstitution entities linking Staff to Institution. The personInstitutionController.createWithOutInstitutionPersonsStaffs() loads doctors not yet in the institution; addStaffToInstitutionPersons() creates the records; removeStaffToInstitutionPersons(pi) deletes them. This mapping drives the consultant dropdown in the channelling session creation forms.