Admin Fees by Speciality and Staff - hmislk/hmis GitHub Wiki
Fees by Speciality and Staff Member
Overview
HMIS supports configuring different fee components for different doctors or specialities. This is used when multiple doctors consult in the same department but charge different amounts — for example, a senior consultant may charge Rs. 2,500 while a registrar charges Rs. 1,500. The fee type Staff enables this per-doctor or per-speciality pricing, and it applies at the fee component level within any service.
When to Use
- Different consultants in the same department charge different consultation fees
- You need to configure a staff-specific discount rate (e.g. staff members of the hospital see a doctor at a reduced rate)
- A speciality has a fixed consultation fee that differs from the general OPD rate
How Staff Fee Configuration Works
When adding a fee component to a service (in the Manage Base Fees or Manage Department Fees screen), selecting the fee type Staff reveals two additional fields:
- Speciality — select the medical speciality (autocomplete)
- Doctor / Staff — once a speciality is selected, the dropdown filters to show only staff in that speciality; select the specific doctor or leave blank for "any staff in this speciality"
Billing Logic
When the billing system is calculating the fee for a service:
- It checks if the selected doctor matches a Staff fee component linked to that specific doctor → applies that fee
- If no exact match, it checks if the doctor's speciality matches a Staff fee component linked to that speciality → applies that fee
- If neither, it falls back to the Outpatient or other applicable fee component
Configuring a Per-Doctor Fee
Step 1: Navigate to Base Fees (or Department Fees)
- Click Administration → Manage Pricing
- Select Manage Base Fees (for hospital-wide) or Manage Department Fees (for a specific department)
Step 2: Select the Service
Search for and select the consultation service (e.g. "General Consultation") in the Select Item autocomplete.
Step 3: Add a Staff Fee Component
- Click Add New Fee — the fee dialog opens
- Set Fee Name to something descriptive (e.g. "Dr. Silva Consultation Fee")
- Set Fee Type to Staff
- The Speciality autocomplete appears — search and select the doctor's speciality
- After selecting the speciality, the Doctor / Staff dropdown populates with all doctors in that speciality — select the specific doctor
- Set the Fee amount
- Optionally set the Foreigner Fee
- Configure Discounts Allowed and Service Charge Allowed as needed
- Click Save
Step 4: Add More Staff Fee Components for Other Doctors
Repeat Step 3 for each doctor who has a different rate.
Speciality-Level Fee (Without a Specific Doctor)
If you want a uniform rate for all doctors in a speciality (rather than per-doctor):
- Set Fee Type to Staff
- Select the Speciality
- Leave Doctor / Staff as "Select" (blank)
- Set the fee amount
This applies to any doctor in that speciality who does not have a more specific individual rate.
Example Configuration
General Consultation service:
- Fee component 1: Type=
Outpatient, Fee=Rs. 1,000 (default rate for all patients) - Fee component 2: Type=
Staff, Speciality=Cardiology, Doctor=Dr. Silva, Fee=Rs. 2,500 - Fee component 3: Type=
Staff, Speciality=General Medicine, Fee=Rs. 1,500 (all GPs) - Fee component 4: Type=
Staff, Speciality=Cardiology, Doctor=Dr. Perera, Fee=Rs. 3,000
Result during billing:
- Dr. Silva (Cardiology) consultation → Rs. 2,500
- Dr. Perera (Cardiology) consultation → Rs. 3,000
- Dr. Fernando (General Medicine) consultation → Rs. 1,500
- Any other doctor → Rs. 1,000 (Outpatient fallback)
Technical Notes (Admin/Developer)
Fee entities with feeType = Staff have non-null speciality (linking to Speciality) and optionally a non-null staff (linking to Staff). The billing engine uses a priority order: exact staff match > speciality match > type fallback. itemFeeManager.fillStaff() populates the staff dropdown after speciality selection. The staff list is filtered to WHERE staff.speciality = selectedSpeciality.