Bill Number Configuration Guide - hmislk/hmis GitHub Wiki
This guide explains how to configure yearly bill number generation for pharmacy modules in HMIS. The system supports both legacy bill number generation methods and new yearly-based bill number generation for better organization and tracking.
Yearly bill number generation creates bill numbers that reset each year and include the year in the bill numbering sequence. This provides:
- Better Organization: Bills are grouped by year
- Clear Identification: Year is included in bill number
- Simplified Tracking: Easier to track bills within specific years
- Consistent Format: Unified bill numbering across different bill types
Use yearly bill number generation when:
- โ You want bills organized by year
- โ You need consistent bill numbering across departments
- โ You prefer simpler bill number sequences
- โ You want to start fresh numbering each year
Keep legacy generation when:
- โ You have complex department-specific numbering requirements
- โ You need separate numbering for different institutions
- โ You have existing processes that depend on legacy numbering
The following configuration options are available for enabling yearly bill number generation:
Page/Module | Configuration Key | Default | BillTypeAtomic |
---|---|---|---|
Pharmacy Retail Sale for Cashier | Bill Number Generation Strategy For Pharmacy Retail Sale For Cashier Is By Year, Bill Type Atomic And Logged Department |
false |
PHARMACY_RETAIL_SALE_PRE_TO_SETTLE_AT_CASHIER |
Pharmacy Disposal Issue | Bill Number Generation Strategy For Pharmacy Disposal Issue Is By Year, Bill Type Atomic And Logged Department |
false |
PHARMACY_DISPOSAL_ISSUE |
Pharmacy Transfer Issue (Direct Department) | Bill Number Generation Strategy For Pharmacy Transfer Issue Is By Year, Bill Type Atomic And Logged Department |
false |
PHARMACY_DIRECT_ISSUE |
Pharmacy Transfer Issue | Bill Number Generation Strategy For Pharmacy Transfer Issue Is By Year, Bill Type Atomic And Logged Department |
false |
PHARMACY_ISSUE |
Page/Module | Status | BillTypeAtomic |
---|---|---|
Direct Purchase | โ Always yearly | PHARMACY_DIRECT_PURCHASE |
Purchase Order Request | โ Always yearly | PHARMACY_ORDER_PRE |
Purchase Order Approval | โ Always yearly | PHARMACY_ORDER_APPROVAL |
GRN Return | โ Always yearly | PHARMACY_GRN_RETURN |
Direct Purchase Return | โ Always yearly | PHARMACY_DIRECT_PURCHASE_REFUND |
-
Access Configuration:
- Navigate to System Administration
- Go to Configuration Options
- Search for "Bill Number Generation Strategy"
-
Enable Yearly Generation:
- Find the specific configuration for your bill type
- Set the value to
true
- Save the configuration
-
Test the Configuration:
- Create a test bill of the configured type
- Verify the bill number follows the yearly format
For system administrators, here are the exact configuration keys to add:
Key 1: Bill Number Generation Strategy For Pharmacy Retail Sale For Cashier Is By Year, Bill Type Atomic And Logged Department
Type: Boolean
Default: false
Description: Enable yearly bill number generation for Pharmacy Retail Sale for Cashier
Key 2: Bill Number Generation Strategy For Pharmacy Disposal Issue Is By Year, Bill Type Atomic And Logged Department
Type: Boolean
Default: false
Description: Enable yearly bill number generation for Pharmacy Disposal Issue
Key 3: Bill Number Generation Strategy For Pharmacy Transfer Issue Is By Year, Bill Type Atomic And Logged Department
Type: Boolean
Default: false
Description: Enable yearly bill number generation for Pharmacy Transfer Issue (covers both Direct Department and regular Transfer Issue)
- Access Configuration Panel: System Administration โ Configuration Options
- Add New Configuration: Use "Add New" or "Create Configuration" button
- Enter Details: Copy the key name exactly as shown above
- Set Type: Select "Boolean" from dropdown
-
Set Default: Set to
false
- Save: Save the configuration
-
Enable: Change value to
true
when ready to use yearly generation
For comprehensive bill number customization, here are all available configuration options:
1. Bill Number Generation Strategy For Pharmacy Retail Sale For Cashier Is By Year, Bill Type Atomic And Logged Department
Type: Boolean | Default: false
2. Bill Number Generation Strategy For Pharmacy Disposal Issue Is By Year, Bill Type Atomic And Logged Department
Type: Boolean | Default: false
3. Bill Number Generation Strategy For Pharmacy Transfer Issue Is By Year, Bill Type Atomic And Logged Department
Type: Boolean | Default: false
4. Add the Institution Code to the Bill Number Generator
Type: Boolean | Default: true
Purpose: Include/exclude institution code in bill numbers
5. Bill Number Suffix for PHARMACY_RETAIL_SALE_PRE_TO_SETTLE_AT_CASHIER
Type: Text | Default: "" (empty)
Purpose: Custom suffix for retail sale bills
6. Bill Number Suffix for PHARMACY_DISPOSAL_ISSUE
Type: Text | Default: "" (empty)
Purpose: Custom suffix for disposal issue bills
7. Bill Number Suffix for PHARMACY_DIRECT_ISSUE
Type: Text | Default: "" (empty)
Purpose: Custom suffix for direct transfer issue bills
8. Bill Number Suffix for PHARMACY_ISSUE
Type: Text | Default: "" (empty)
Purpose: Custom suffix for regular transfer issue bills
9. Bill Number Generation Strategy - Common Bill Number for All Departments, Institutions and Bill Types
Type: Boolean | Default: false
Purpose: Use single sequence across all departments and bill types
10. Bill Number Generation Strategy - Separate Bill Number for All Departments, Institutions and Bill Types
Type: Boolean | Default: false
Purpose: Separate sequences for each department-institution-billtype combination
11. Bill Number Generation Strategy - Separate Bill Number for Institutions Only
Type: Boolean | Default: false
Purpose: Separate sequences per institution only
12. Bill Number Generation Strategy - Separate Bill Number for Departments Only
Type: Boolean | Default: false
Purpose: Separate sequences per department only
13. Bill Number Generation Strategy - Separate Bill Number for Bill Types Only
Type: Boolean | Default: false
Purpose: Separate sequences per bill type only
When multiple strategy configurations are enabled, they are applied in this priority order:
- Common Bill Number (if enabled) - Single sequence for everything
- Separate for All (if enabled) - Department + Institution + Bill Type combination
- Institutions Only (if enabled) - Per institution sequences
- Departments Only (if enabled) - Per department sequences
- Bill Types Only (if enabled) - Per bill type sequences
- Default - Department + Bill Type combination
Goal: Enable yearly generation with simple format
Configuration:
- Bill Number Generation Strategy For Pharmacy Retail Sale For Cashier... = true
- Add the Institution Code to the Bill Number Generator = false
- No bill suffixes configured
Result: PHARM/24/000001
Goal: Complete bill number with all components
Configuration:
- Bill Number Generation Strategy For Pharmacy Retail Sale For Cashier... = true
- Add the Institution Code to the Bill Number Generator = true
- Bill Number Suffix for PHARMACY_RETAIL_SALE_PRE_TO_SETTLE_AT_CASHIER = "PRS"
Result: HOSPPHARM/PRS/24/000001
Goal: Simple department-based numbering
Configuration:
- Bill Number Generation Strategy For Pharmacy Disposal Issue... = true
- Add the Institution Code to the Bill Number Generator = false
- Bill Number Suffix for PHARMACY_DISPOSAL_ISSUE = ""
Result: PHARM/24/000001
Goal: Different suffixes for different bill types
Configuration:
- Enable yearly generation for all desired bill types = true
- Add the Institution Code to the Bill Number Generator = true
- Bill Number Suffix for PHARMACY_RETAIL_SALE_PRE_TO_SETTLE_AT_CASHIER = "RS"
- Bill Number Suffix for PHARMACY_DISPOSAL_ISSUE = "DI"
- Bill Number Suffix for PHARMACY_DIRECT_ISSUE = "TI"
Results:
- Retail Sale: HOSPPHARM/RS/24/000001
- Disposal: HOSPPHARM/DI/24/000001
- Transfer: HOSPPHARM/TI/24/000001
Module | Configuration Required | Status |
---|---|---|
Pharmacy Retail Sale for Cashier | Yes - Enable configuration | โ Configurable |
Pharmacy Disposal Issue | Yes - Enable configuration | โ Configurable |
Pharmacy Transfer Issue (Direct Department) | Yes - Enable configuration | โ Configurable |
Pharmacy Transfer Issue | Yes - Enable configuration | โ Configurable |
Module | Status |
---|---|
Direct Purchase | โ Always uses yearly generation |
Purchase Order Request | โ Always uses yearly generation |
Purchase Order Approval | โ Always uses yearly generation |
GRN Return | โ Always uses yearly generation |
Direct Purchase Return | โ Always uses yearly generation |
When yearly generation is enabled, bill numbers follow this comprehensive pattern:
[Institution Code][Department Code]/[Bill Suffix]/[Year]/[Sequential Number]
Component | Description | Configurable | Example |
---|---|---|---|
Institution Code | Institution identifier | โ Optional via config | HOSP |
Department Code | Department identifier | โ Required | PHARM |
Bill Suffix | Bill type specific suffix | โ Optional | RS |
Year | Last 2 digits of year | โ Automatic | 24 |
Sequential Number | 6-digit sequence | โ Automatic | 000001 |
With Institution Code + Bill Suffix:
HOSPPHARM/RS/24/000001
Without Institution Code, With Bill Suffix:
PHARM/RS/24/000001
Without Bill Suffix:
PHARM/24/000001
Minimal Format:
PHARM/24/000001
Legacy generation uses various patterns depending on configuration:
[Institution Code]/[Department Code]/[Sequential Number]
Example: INS001/DEPT001/12345
Configuration Key | Type | Default | Purpose |
---|---|---|---|
Add the Institution Code to the Bill Number Generator |
Boolean | true |
Include institution code in bill number |
Individual bill suffixes can be configured for each bill type:
Configuration Key Format | Example Key | Type | Purpose |
---|---|---|---|
Bill Number Suffix for [BillTypeAtomic] |
Bill Number Suffix for PHARMACY_RETAIL_SALE_PRE_TO_SETTLE_AT_CASHIER |
Text | Custom suffix for specific bill type |
Bill Number Suffix for PHARMACY_DISPOSAL_ISSUE |
Text | Custom suffix for disposal issues | |
Bill Number Suffix for PHARMACY_DIRECT_ISSUE |
Text | Custom suffix for transfer issues |
Bill Type | Suggested Suffix | Example Bill Number |
---|---|---|
Pharmacy Retail Sale for Cashier | PRS |
PHARM/PRS/24/000001 |
Pharmacy Disposal Issue | PDI |
PHARM/PDI/24/000001 |
Pharmacy Transfer Issue | PTI |
PHARM/PTI/24/000001 |
Direct Purchase | DP |
PHARM/DP/24/000001 |
-
Plan the Migration:
- Enable yearly generation at the beginning of a fiscal year
- Communicate the change to all pharmacy staff
- Ensure all users understand the new bill number format
-
Test Before Production:
- Test yearly generation in a development environment
- Verify bill numbers are generated correctly
- Check integration with reporting systems
-
Monitor After Implementation:
- Monitor bill generation for the first few days
- Ensure no duplicate bill numbers are generated
- Verify compatibility with existing processes
-
Document Changes:
- Record when yearly generation was enabled
- Note the previous configuration settings
- Keep backup of configuration before changes
-
User Training:
- Train staff on new bill number format
- Update standard operating procedures
- Provide quick reference guides
Issue: Bill numbers are not following yearly format
- Solution: Verify the configuration is enabled and saved correctly
- Check: Ensure you're using the correct configuration key name
Issue: Duplicate bill numbers generated
- Solution: Check if multiple configurations are conflicting
- Action: Contact system administrator to reset bill number sequence
Issue: Old bill number format still appearing
- Solution: Clear browser cache and restart the application
- Check: Verify configuration changes were saved properly
If you encounter issues with bill number configuration:
- Check Configuration: Verify all settings are correct
- Review Logs: Check system logs for error messages
- Contact Support: Reach out to your system administrator
- Documentation: Refer to technical documentation for developers
Q: Can I switch back to legacy generation after enabling yearly generation? A: Yes, you can disable the yearly generation configuration to return to legacy generation. However, plan this carefully as it may affect bill number continuity.
Q: Will yearly generation affect existing bills? A: No, existing bills keep their original numbers. Only new bills will use the yearly generation format.
Q: Do all pharmacy modules support yearly generation? A: Most modules support yearly generation, but some may require configuration while others use it by default. See the module list above for details.
Q: What happens to bill numbers when the year changes? A: The sequential numbering resets to 1 at the beginning of each new year, and the year portion of the bill number updates automatically.
Q: Can I customize the yearly bill number format? A: The basic format is standardized, but system administrators may be able to customize prefixes and formatting through advanced configuration options.
Last Updated: [Current Date] Version: 1.0 Author: System Documentation Team