Smile CDR v2024.08.PRE
On this page:

42.1.1Localization Customization Examples


42.1.2Example: Unknown Search Parameter Message


When a client performs a search using an invalid search parameter, by default they will see an error message similar to the following:

Unknown search parameter "eye-color" for resource type "Patient". Valid search parameters for this search are: [_id, _language, _lastUpdated, active, address, address-city, address-country, address-postalcode, address-state, address-use, birthdate, death-date, deceased, email, family, gender, general-practitioner, given, identifier, language, link, name, organization, phone, phonetic, telecom]

By default, this error message is produced using the following localization entry that is built into Smile CDR:

ca.uhn.fhir.jpa.dao.BaseStorageDao.invalidSearchParameter=Unknown search parameter "{0}" for resource type "{1}". Valid search parameters for this search are: {2}

You can customize this by placing an entry like the following in your customization file:

ca.uhn.fhir.jpa.dao.BaseStorageDao.invalidSearchParameter=Unknown search parameter "{0}". Please check your search expression.

42.1.3Example: Custom SMART Scope Names


When using the SMART Outbound Security module, users will often be asked to approve specific scopes. For example, the SMART scope patient/ means that the user is approving access for the application to request Observation resources.

This can also be useful if you wish to allow SMART Client Applications to request custom scopes (i.e. scopes that are not known to Smile CDR and do not appear in the list of supported scopes)

Depending on your use cases, it may make more sense to provide a better explanation for these scopes that will be intuitive to your users. To provide text for a specific scope, you can add an entry with a key of webadmin.view.security_out_smart.scope.[SCOPE-NAME] to your localization file. For example:

webadmin.view.security_out_smart.scope.patient/* Patient Information
webadmin.view.security_out_smart.scope.patient/* Patient Information