How to make searches "Start With"

One of the biggest staff complaints I'm getting since upgrade to 1.9.3 is the default change from start with to contains, especially in vet names and appointment reasons.

I went to a lot of trouble to design reasons (and vet names) that started with a unique one or two letters. So "co" <enter> was Consultation, "re" <enter> was Review Consultation, "di"  <enter> was Discharge Consultation and so on (we actually had those as macros in the previous v1.7 to speed data entry and reduce typing and clicks).

Now a "co" <enter> brings up every conceivable variation of consultation reason, so you need to scroll down list to select the one you want, increasing clicks and time spent.

I actually did read the documentation <g!>.

All I've found is "This project will make contains matching the default for queries that won't adversely affect performance."

"The contains search will be enabled by configuring a flag within the QueryFactory.properties file for each of the relevant archetypes.  This will default to false if not specified."

I've had a look in QueryFactory.properties but there's no flag there that I can see to de-specify to make start with the default. 

Tim also said "You will be able to turn the contains searches on and off, but not in a convenient manner as they are configured via a properties file. The server needs to be restarted for the changes to take effect."

Am I looking in the wrong place (webapps\openvpmsWEB-INF\classes)?

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: How to make searches "Start With"

Add the following to QueryFactory.properties to make searches for Appointment Reasons and Clinicians use starts-with rather than contains:

lookup.visitReason*            org.openvpms.web.component.im.query.AutoQuery,contains=false
 
query.1                        org.openvpms.web.component.im.clinician.ClinicianQuery,auto=true,contains=false

You will need to restart Tomcat for the changes to take effect.

Re: How to make searches "Start With"

Thanks.

I haven't had time to install these changes till just now.  Visit Reason now works perfectly as desired (ie "start with") but Clinician still "contains".

Yuri.

 

Re: How to make searches "Start With"

Appologies - ClinicianQuery is only available from 2.0.

In 1.9, use:

security.user                  org.openvpms.web.component.im.query.AutoQuery,contains=false

Re: How to make searches "Start With"

Thanks, that's worked perfectly: now all sorted.

Syndicate content