How to Find Promed MRS Module Configuration Options
When customizing Promed MRS 3.x, documentation often lags behind new frontend modules. Developers frequently guess configuration keys or dig through minified JavaScript files.
This guide provides a systematic and reliable method to discover configuration options for any Promed MRS 3.x module — using simple commands and practical search patterns.
1. Search Inside the Built Container Files (Most Reliable)
When you need to find configuration options for any Promed MRS module, exec into the frontend container and inspect the built JavaScript files.
# 1. Find the module's directory
docker exec promedhis-frontend-1 /bin/sh -c "find /usr/share/nginx/html -name '*module-name*' -type d"
# 2. Search for configuration usage
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'useConfig|config\.' /usr/share/nginx/html/openmrs-esm-module-name-*/"
# 3. Look for specific configuration keys
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'printPatientSticker|header.*logo' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
This approach directly reveals configuration access in compiled code — the single most dependable way to confirm available options.
2. Search for Configuration Schema Files
Some modules define configuration schemas in their TypeScript source. If you have the source locally:
find /path/to/promed-mrs-esm-core -name "*config-schema*" -path "*patient-banner*"
These schema files often list all configuration keys, types, and default values.
3. Search for Configuration Usage Patterns
When working directly in the built container:
# Pattern 1: useConfig() calls
grep -r "useConfig" /usr/share/nginx/html/openmrs-esm-module-name-*/
# Pattern 2: Configuration object access
grep -r "config." /usr/share/nginx/html/openmrs-esm-module-name-*/
# Pattern 3: Specific configuration keys
grep -r "printPatientSticker|showLogo|showBarcode" /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/
4. Search for CSS Classes and Component Names
When you encounter a CSS class such asesm-patient-banner__print-identifier-sticker__implementationLogo___+ZMh6:
# 1. Identify the module: "esm-patient-banner"
# 2. Identify the component: "print-identifier-sticker"
# 3. Search for its logic:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'print-identifier-sticker|implementationLogo' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
CSS class prefixes usually map directly to component names.
5. Search for Default Configuration Objects
Default configs often reveal available options:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'default.*config|config.*default' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
6. Search for Conditional Logic
Configuration-driven conditions are excellent hints:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'if.*config|config.*if|showLogo|showBarcode' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
7. Search for Translation Keys
Translation keys often mirror configuration field names:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'implementationLogo|printIdentifierSticker' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
8. Search for Component Props
Many configuration values are passed into React components as props:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'props|PropTypes' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
9. Search for Environment Variables
Certain frontend configurations depend on runtime environment variables:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'process.env|OMRS_' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"10. Search for Feature Flags
Feature toggles are sometimes hidden in config:
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'featureFlag|feature.*flag' /usr/share/nginx/html/openmrs-esm-patient-banner-app-*/"
Step-by-Step Example: Discovering Patient Banner Sticker Configuration
- Identify the module
CSS class →esm-patient-banner__print-identifier-sticker__implementationLogo___+ZMh6
⇒ Module:@openmrs/esm-patient-banner-app - Find the module folder
docker exec promedhis-frontend-1 /bin/sh -c "ls /usr/share/nginx/html/ | grep patient-banner" # Example output: openmrs-esm-patient-banner-app-11.3.0 - Search for configuration usage
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'useConfig|printPatientSticker' /usr/share/nginx/html/openmrs-esm-patient-banner-app-11.3.0/" - Look for specific configuration keys
docker exec promedhis-frontend-1 /bin/sh -c "grep -r 'header.*logo|showLogo|showBarcode' /usr/share/nginx/html/openmrs-esm-patient-banner-app-11.3.0/" - Inspect component logic
docker exec promedhis-frontend-1 /bin/sh -c "grep -A 10 -B 5 'implementationLogo' /usr/share/nginx/html/openmrs-esm-patient-banner-app-11.3.0/44.js" - Extract configuration structure
docker exec promedhis-frontend-1 /bin/sh -c "grep -o 'printPatientSticker.*header.*logo' /usr/share/nginx/html/openmrs-esm-patient-banner-app-11.3.0/44.js"
Key Patterns to Look For
Configuration Access
useConfig().moduleNameconfig.moduleName(0,c.useConfig)().printPatientSticker
Conditional Logic
if (config.showLogo)config.header?.logonull==a||null===(e=a.header)||void 0===e?void 0:e.logo
Default Values
config.key || defaultValueconfig.key ?? defaultValuenull!=config?config:{}
Pro Tips
- Start from CSS classes — they reveal the module and component name.
- Always search for
useConfig()— it’s the main entry point for module configuration. - Check for conditional logic — options often appear in
ifstatements. - Look for default values — they define what’s configurable.
- Translation keys often match configuration labels.
- Props definitions reveal tunable React component options.
Conclusion
By following this systematic approach, you can discover any configuration option in Promed MRS 3.x modules — no guesswork, no trial and error.
This method is universal, works directly in Dockerized deployments, and helps ensure consistent branding, behavior, and feature control across all Promed MRS modules.







