app-configuration
Application configuration options reference for the HMIS project. Use when working with feature toggles, configuration keys, configOptionApplicationController, bill number configuration, printer confi
SKILL.md.claude/skills/app-configuration/SKILL.md
GitHubApplication Configuration Guide
Configuration System
HMIS uses configOptionApplicationController for feature toggles and runtime configuration.
Usage Pattern
<!-- Boolean toggle with default false -->
rendered="#{configOptionApplicationController.getBooleanValueByKey('Feature Key')}"
<!-- Boolean toggle with explicit default true -->
rendered="#{configOptionApplicationController.getBooleanValueByKey('Feature Key', true)}"
Key Naming Convention
- Use descriptive, hierarchical names
- Module prefix:
Pharmacy Transfer Issue - Show Rate and Value - Report columns:
Pharmacy Disbursement Reports - Display Serial Number - 🚨 Never change the meaning of an existing key: no added/removed
!, no new default, no conflicting defaults. Create a new key named after whattruedoes. CIconfig-semantics-guardenforces this; see Changing existing options.
Configuration Categories
Pharmacy Transfer
- Rate display toggles (Purchase/Cost/Retail Rate)
- Bill format options (POS, Template)
- Footer customization (CSS and text)
Report Display
- Column visibility toggles per report type
- Font size settings
- Serial number display
Bill Number
- Prefix and year counting strategies
- Department-specific number generation
- 🚨 Inward deposit/payment series: with
Unique Serial Per Admission Type for Inward Paymentsoff (andOmit Yearoff or not deployed), their serial follows the generalBill Number Generation Strategy - ...counter. That counter is institution-wide, shared by all bills, when none of those options is on. See option 4 in the Bill Number Config doc.
🚨 Applying config to a live hospital
- Apply the agreed values exactly. Use the recorded plan (memory, tracker, issue). If you think a value should differ, ask before setting it. Never "simplify" a value on your own reading of the requirement.
- Check the deployed branch has the code.
git grep "<key>" origin/<deployed-branch>. A key that exists in the DB but not in that branch's code does nothing. - Verify the output, not the config row. After the change, read a record created after it, e.g. the newest bill's
deptId/insId. Check that it matches the requirement: format and serial order. Report those real values.
Printer
- Printing profiles and templates
- Per-department printer assignment
- 🚨
configOptionControllerkeys are department-scoped when a department is selected. With a department selected in the session, it reads<Department name> - <key>first and falls back to the global<key>, and itssetBooleanValueByKeywrites only the department copy. With no department selected, it reads and writes the global<key>. The receipt pages' Settings dialogs (e.g.Inward Payment Bill ... Paper) use it, so check the row for the session's department (optionKey like '<Dept> - %'), not just the global one.
Laboratory Sample Lock
Block cancellation and refund of OPD, package and collecting centre bills once the laboratory has accepted a sample(application scope, default true): once the laboratory has accepted a sample, OPD/package/CC bills cannot be cancelled, refunded or returned by anyone (collected-only samples do not lock). ReplacesEnable the Special Privilege of Canceling OPD Billsand...CC Bills, which are no longer read in those paths.
Pharmacy Procurement
- Cross-department PO receiving (institution-wide, opt-in)
For complete reference, read: