Pharmacy Bill Number Configuration - hmislk/hmis GitHub Wiki

Pharmacy Bill Number Configuration

Overview

The HMIS system provides flexible bill number generation for pharmacy operations. You can configure how bill numbers are formatted for different types of pharmacy bills, including Purchase Orders, GRNs, Transfers, Sales, and other transactions.

Bill numbers can be configured to include:

  • Department codes (e.g., ICU, OPD, WARD)
  • Institution codes (e.g., MPH, GH, DH)
  • Year (e.g., 25 for 2025)
  • Prefixes (e.g., POR, GRN, TI)
  • Sequential numbers (e.g., 000001)

When to Use

Configure bill numbers when you need:

  • Unique identification across multiple departments or institutions
  • Year-based numbering that resets annually
  • Department-specific numbering for tracking purposes
  • Institution-wide numbering for consolidated reporting
  • Custom prefixes for different bill types

How to Access Configuration

Step 1: Access System Configuration

  1. Log in as a system administrator
  2. Navigate to Admin โ†’ System Configuration โ†’ Application Configuration
  3. Look for configuration options starting with "Bill Number"

Step 2: Find Bill Number Options

The configuration options are organized by:

  • Bill Number Generation Strategy - Controls the format
  • Bill Number Suffix - Sets the prefix for each bill type

Bill Number Format Options

Option 1: Traditional Format (Default)

Format: 000001/2025

  • Simple sequential number with year
  • No department or institution codes
  • Backward compatible with existing systems

When to Use: For single-department institutions or when simplicity is preferred

Option 2: Department + Institution Format

Format: POR/ICU/MPH/25/000001

  • POR = Bill type prefix (Purchase Order Request)
  • ICU = Department code
  • MPH = Institution code
  • 25 = Year (2025)
  • 000001 = Sequential number

Configuration Key: Bill Number Generation Strategy for Pharmacy [BILL_TYPE] - Prefix + Department Code + Institution Code + Year + Yearly Number

When to Use: For multi-department institutions needing detailed tracking

Option 3: Institution-Wide Format

Format: POR/MPH/25/000001

  • POR = Bill type prefix
  • MPH = Institution code
  • 25 = Year (2025)
  • 000001 = Sequential number (counts all bills institution-wide)

Configuration Key: Bill Number Generation Strategy for Pharmacy [BILL_TYPE] - Prefix + Institution Code + Year + Yearly Number

When to Use: For institution-wide numbering without department separation

Bill Types and Default Prefixes

Bill Type Default Prefix Description
Purchase Order Request POR Purchase requests from departments
Purchase Order Approval POA Approved purchase orders
Cancelled Purchase Order C-POR Cancelled purchase requests
GRN (Goods Received Note) GRN Items received from suppliers
Cancelled GRN C-GRN Cancelled goods receipts
GRN Return GRNR Items returned to suppliers
Direct Purchase DP Direct pharmacy purchases
Cancelled Direct Purchase C-DP Cancelled direct purchases
Transfer Issue TI Items transferred between departments
Direct Issue DTI Direct issues to patients/departments
Sale Pre Bill SPB Pre-bills for pharmacy sales
Sale Cashier Pre Bill SCPB Cashier pre-bills
Sale Bill SB Final sale bills
Sale Return SR Returned sale items
Sale Return Pre Bill SRP Pre-bills for returns
Sale Cancelled SC Cancelled sales
Direct Purchase Refund DPR Refunds for direct purchases
Issue Cancelled C-DIS Cancelled issue bills
Transfer Receive TR Items received from transfers
Disposal Issue DIS Items disposed/discarded
Transfer Request PHTRQ Transfer requests between departments

Configuration Examples

Example 1: Enable Department + Institution Format for Purchase Orders

  1. Access Configuration: Admin โ†’ System Configuration โ†’ Application Configuration
  2. Find Option: Bill Number Generation Strategy for Pharmacy Purchase Order Request - Prefix + Department Code + Institution Code + Year + Yearly Number
  3. Set Value: true
  4. Result: Purchase order numbers will be formatted as POR/ICU/MPH/25/000001

Example 2: Enable Institution-Wide Format for GRN

  1. Access Configuration: Admin โ†’ System Configuration โ†’ Application Configuration
  2. Find Option: Bill Number Generation Strategy for Pharmacy GRN - Prefix + Institution Code + Year + Yearly Number
  3. Set Value: true
  4. Result: GRN numbers will be formatted as GRN/MPH/25/000001

Example 3: Change Bill Number Prefix

  1. Access Configuration: Admin โ†’ System Configuration โ†’ Application Configuration
  2. Find Option: Bill Number Suffix for Purchase Order Request
  3. Change Value: From POR to PUR
  4. Result: Purchase order numbers will use PUR instead of POR

Understanding Configuration Combinations

Scenario 1: Default Configuration (All Options Disabled)

  • Department Bills: 000001/2025
  • Institution Bills: 000001/2025
  • Behavior: Uses traditional numbering format

Scenario 2: Department + Institution Format Enabled

  • Configuration: Enable "Prefix + Department Code + Institution Code + Year + Yearly Number"
  • Department Bills: POR/ICU/MPH/25/000001
  • Institution Bills: POR/ICU/MPH/25/000001 (same as department)
  • Behavior: Both use detailed format with department code

Scenario 3: Institution-Wide Format Enabled

  • Configuration: Enable "Prefix + Institution Code + Year + Yearly Number"
  • Department Bills: POR/MPH/25/000001
  • Institution Bills: POR/MPH/25/000001 (same sequence)
  • Behavior: Simplified format, numbers count institution-wide

Scenario 4: Both Department and Institution Strategies Enabled

  • Department Bills: POR/MPH/25/000001 (counts department bills only)
  • Institution Bills: POR/MPH/25/000015 (counts all bills institution-wide)
  • Behavior: Different counting methods for department vs institution

Best Practices

For Single Department Institutions

  • Recommendation: Use traditional format or institution-wide format
  • Avoid: Department + institution format (unnecessary complexity)

For Multi-Department Hospitals

  • Recommendation: Use department + institution format for detailed tracking
  • Benefit: Easy identification of bill origin department

For Consolidated Reporting

  • Recommendation: Use institution-wide format
  • Benefit: Sequential numbering across all departments

For Year-End Transitions

  • Automatic Reset: All formats automatically reset numbering each year
  • No Action Required: System handles year transitions automatically

Troubleshooting

Issue: Bill numbers not changing after configuration

Solution:

  1. Verify configuration is saved properly
  2. Restart the application if necessary
  3. Check that you're configuring the correct bill type

Issue: Numbers are not sequential

Causes:

  • Mixed configuration settings
  • Different counting methods for department vs institution Solution: Choose consistent configuration strategy

Issue: Wrong prefix appearing

Solution:

  1. Check "Bill Number Suffix" configuration for the specific bill type
  2. Ensure the suffix field is not empty
  3. Verify correct spelling of suffix

Issue: Numbers restarting unexpectedly

Cause: Year change or configuration change Solution: This is normal behavior for yearly numbering

Configuration Security

Who Can Configure

  • Only System Administrators can change bill number configurations
  • Regular users cannot modify these settings

When Changes Take Effect

  • Immediate: New bills use the new format immediately
  • Existing Bills: Previous bills retain their original numbers
  • No Retroactive Changes: Past bill numbers are never modified

FAQ

Q: Can I use different formats for different bill types?

A: Yes, each bill type can be configured independently with its own strategy and prefix.

Q: What happens to old bill numbers when I change the format?

A: Old bill numbers remain unchanged. Only new bills use the new format.

Q: Can I change the separator from "/" to something else?

A: No, the separator is fixed as "/" in the current system.

Q: Will changing the format affect reports?

A: No, reports will continue to work with all bill number formats.

Q: Can I disable the year reset?

A: No, yearly reset is automatic and cannot be disabled.

Q: What if I want longer or shorter sequential numbers?

A: The system automatically adjusts the number length (e.g., 000001, 000010, 000100).

Q: Can different departments use different prefixes for the same bill type?

A: No, prefixes are set per bill type institution-wide, not per department.

Advanced Configuration

Custom Institution Codes

Institution codes are derived from your institution setup in the system. To change them:

  1. Navigate to Admin โ†’ Institution Management
  2. Edit your institution
  3. Update the institution code field

Custom Department Codes

Department codes are derived from your department setup:

  1. Navigate to Admin โ†’ Department Management
  2. Edit the department
  3. Update the department code field

Monitoring Bill Number Usage

To monitor bill number patterns:

  1. Use Reports โ†’ Bill Analysis
  2. Filter by date range and bill type
  3. Review bill number sequences for gaps or issues

Support

For configuration assistance:

  • Contact your system administrator
  • Check the system logs for error messages
  • Review this guide for common solutions
  • Consult with HMIS support team for complex configurations
โš ๏ธ **GitHub.com Fallback** โš ๏ธ