Pharmacy Sale Mandatory Fields Configuration - hmislk/hmis GitHub Wiki
This feature allows hospital administrators to configure which patient and prescription details are mandatory when processing pharmacy sales. Different institutions have different requirements - some need complete patient records for all sales, while others may allow sales without patient information for walk-in customers.
Use these configuration options to:
- Enforce patient registration for all pharmacy sales (e.g., for insurance tracking)
- Require specific patient details like phone numbers for follow-up calls
- Mandate referring doctor information for prescription tracking
- Adapt to different departments with varying documentation requirements
- Comply with institutional policies for patient data collection
- Patient registration is mandatory
- Name, phone, gender, and address are required
- Referring doctor must be recorded
- Used for: Insurance claims, patient follow-up, prescription tracking
- Patient registration is optional
- Only phone number required (if patient registers)
- No referring doctor needed
- Used for: Over-the-counter sales, minimal documentation
- Patient registration is mandatory
- Name and area are required (for demographic reporting)
- Referring doctor required
- Used for: Public health reporting, service area analysis
- Navigate to Menu โ Administration โ Manage Institutions โ Preferences โ Configuration Options
- Use the search box to find configuration options by their key name
- Each validation option can be enabled or disabled independently
- Click the Save button after making changes
When searching for configuration options, use these exact key names:
Configuration Option Key | Purpose |
---|---|
Patient is required in Pharmacy Retail Sale |
Makes patient registration mandatory |
Patient Name is required in Pharmacy Retail Sale |
Requires patient name |
Patient Phone is required in Pharmacy Retail Sale |
Requires phone or mobile number |
Patient Gender is required in Pharmacy Retail Sale |
Requires gender selection |
Patient Address is required in Pharmacy Retail Sale |
Requires address entry |
Patient Area is required in Pharmacy Retail Sale |
Requires area selection |
Referring Doctor is required in Pharmacy Retail Sale |
Requires referring doctor selection |
Quick Search Tips:
- Search for "Patient is required" to find all patient-related validations
- Search for "Pharmacy Retail Sale" to see all pharmacy sale validations
- Configuration options are case-sensitive when searching
What it does: Makes patient registration mandatory before completing any pharmacy sale.
When enabled:
- Users cannot complete a sale without selecting or creating a patient
- All sales will be linked to a patient record
When disabled:
- Sales can be completed without patient information
- Useful for walk-in customers or over-the-counter sales
Error message if violated: "Patient is required."
What it does: Requires patient name to be entered if a patient is registered.
When enabled:
- If user creates/selects a patient, the name field must be filled
- Works only if patient exists or is required
When disabled:
- Patient name is optional even if patient is registered
Error message if violated: "Patient name is required."
Important: If "Patient is Required" is disabled and no patient is provided, this validation is skipped.
What it does: Requires at least one phone number (mobile or landline) for the patient.
When enabled:
- Either phone or mobile number must be provided
- If only one number is given, it satisfies the requirement
When disabled:
- Phone numbers are optional
Error message if violated: "Patient phone number is required."
Tip: The system accepts either the phone field OR the mobile field, so users can fill in whichever is available.
What it does: Requires patient gender/sex to be selected.
When enabled:
- Gender must be selected (Male/Female/Other) for patient registration
- Useful for demographic reporting and prescription safety
When disabled:
- Gender is optional
Error message if violated: "Patient gender is required."
What it does: Requires patient address to be entered.
When enabled:
- Address field must be filled if patient is registered
- Useful for delivery services or patient follow-up
When disabled:
- Address is optional
Error message if violated: "Patient address is required."
What it does: Requires patient area/location to be selected from predefined areas.
When enabled:
- User must select patient's geographical area
- Useful for service area analysis and planning
When disabled:
- Area selection is optional
Error message if violated: "Patient area is required."
Note: Areas must be pre-configured in the system under Setup โ Areas.
What it does: Requires a referring doctor to be selected for the sale.
When enabled:
- User must select the doctor who prescribed the medication
- Works independently of patient requirements
- Useful for prescription tracking and commission calculations
When disabled:
- Referring doctor is optional
Error message if violated: "Referring doctor is required."
Important: This validation is independent of patient requirements. You can require referring doctor even if patient is not required.
The system uses smart logic to apply validations:
-
If "Patient is Required" = Enabled:
- Patient must be provided
- All enabled patient detail validations are enforced
-
If "Patient is Required" = Disabled:
- Patient is optional
- If user provides a patient, patient detail validations are checked
- If user does NOT provide a patient, patient detail validations are skipped
Example 1: Optional Patient, Mandatory Phone
- Configuration:
- Patient is Required = Disabled
- Patient Phone is Required = Enabled
- Result:
- User can complete sale without a patient โ
- If user creates a patient, phone must be provided โ
Example 2: Mandatory Patient, Optional Details
- Configuration:
- Patient is Required = Enabled
- Patient Name is Required = Disabled
- Patient Phone is Required = Disabled
- Result:
- User must create/select a patient โ
- Name and phone are optional โ
Example 3: No Patient, Doctor Required
- Configuration:
- Patient is Required = Disabled
- Referring Doctor is Required = Enabled
- Result:
- User can skip patient registration โ
- User must select a referring doctor โ
These validation rules are enforced at two points in the pharmacy sale process:
- Page: Pharmacy โ Retail Sale
- Button: "Settle" button
- User completes the sale directly at the pharmacy counter
- Page: Pharmacy โ Sale for Cashier
- Button: "Settle Bill at Cashier" button
- Sale is created at pharmacy and settled at cashier counter
Both pages use the same validation rules, ensuring consistency across the system.
-
Start with minimal requirements and add more as needed
-
Consider your workflow:
- Insurance-based: Enable patient and all details
- Walk-in pharmacy: Disable patient requirement, enable phone only
- Mixed: Enable patient requirement but make details optional
-
Train staff on why certain fields are mandatory
-
Review periodically - adjust settings based on reporting needs
- Understand the requirements of your institution
- Fill required fields completely to avoid errors
- Use existing patients when possible (search before creating new)
- Provide accurate phone numbers for patient follow-up
-
If validation error occurs:
- Read the error message carefully
- Fill in the missing required information
- Contact administrator if a field should not be mandatory
Cause: Patient requirement is enabled but no patient was selected. Solution: Search for and select an existing patient, or create a new patient.
Cause: Patient name validation is enabled and name field is empty. Solution: Enter the patient's full name before settling the bill.
Cause: Phone validation is enabled and neither phone nor mobile is provided. Solution: Enter at least one phone number (either phone or mobile field).
Cause: Gender validation is enabled and gender is not selected. Solution: Select the patient's gender from the dropdown.
Cause: Address validation is enabled and address field is empty. Solution: Enter the patient's address.
Cause: Area validation is enabled and no area is selected. Solution: Select the patient's area from the dropdown. If area is not available, contact administrator to add it.
Cause: Referring doctor validation is enabled and no doctor is selected. Solution: Select the doctor who prescribed the medication.
Cause: Configuration setting is enabled when it shouldn't be. Solution: Contact system administrator to review and adjust the configuration.
When setting up a new department or pharmacy:
- Review institutional policies for patient data collection
- Determine which fields are legally required
- Consider reporting and insurance requirements
- Enable appropriate validation options
- Test the configuration with pharmacy staff
- Document the requirements for staff training
- Review configuration after 30 days of use
- Adjust based on staff feedback and operational needs
A: Currently, these settings apply system-wide to all pharmacy sales. Department-specific settings are not available in this version.
A: Patient details will still be validated if a user chooses to register a patient. The validations only skip if both the patient requirement is disabled AND no patient is provided.
A: If "Patient is Required" is disabled, you can enable "Patient Phone is Required". In this case, if the user registers a patient (optional), the phone becomes mandatory. If the user doesn't register a patient, the validation is skipped.
A: The system has two separate fields for phone numbers. The validation is satisfied if either one is filled. Users can provide a landline number OR a mobile number.
A: Yes, administrators can change these settings at any time. Changes take effect immediately for new sales.
A: No, these validations only apply when settling new bills. Existing bills are not affected.
A: Yes, the referring doctor validation is independent of patient validations. This is useful for tracking prescriptions even for walk-in customers.
Last Updated: 2025-10-05 Version: 3.0.0 For Technical Details: See developer documentation in the repository