Searching

Complete

OpenVPMS supports wildcard searches as outlined in Wildcards

In many cases, wildcards are automatically added to Search criteria, so that any record with a name that contains the criteria is returned.  E.g. searching for a diagnosis with oedema might return:

Blepharoedema
Hypersensitivity (allergic) skin disorder - angioedema
Myxoedema
Pulmonary oedema
Pulmonary oedema - cardiogenic
Peripheral oedema
Pulmonary oedema - non-cardiogenic
Lymphoedema

This is not true of customer, patient or product searches; here the default behaviour is to return records with names that start with the criteria. E.g. searching for a customer named Smith won't return records with the name Goldsmith. This can be changed by prefixing the criteria with a *. E.g. *smith

To make constains searches the default for products, select Contains for Product Name Search on the Query System Settings.
 

To make contains searches the default for customer or patients, the QueryFactory.properties file in <TOMCAT_HOME>/webapps/openvpms/WEB-INF/classes can be changed.

#
# Uncomment the following two lines to make substring searches for customers the default.
# Note that for large no.s of customers, this could affect performance
#
#party.customer*               org.openvpms.web.component.im.customer.CustomerQuery,contains=true
#party.organisationOTC         org.openvpms.web.component.im.customer.CustomerQuery,contains=true

#
# Uncomment the following lines to make substring searches for patients the default.
# Note that for large no.s of patients, this could affect performance
#
#party.patient*                org.openvpms.web.component.im.patient.PatientQuery,contains=true
#query.1                       org.openvpms.web.component.im.patient.PatientByCustomerQuery,contains=true

E.g., the following enables contains searches for all of them:

#
# Uncomment the following two lines to make substring searches for customers the default.
# Note that for large no.s of customers, this could affect performance
#
party.customer*               org.openvpms.web.component.im.customer.CustomerQuery,contains=true
party.organisationOTC         org.openvpms.web.component.im.customer.CustomerQuery,contains=true

#
# Uncomment the following lines to make substring searches for patients the default.
# Note that for large no.s of patients, this could affect performance
#
party.patient*                org.openvpms.web.component.im.patient.PatientQuery,contains=true
query.1                       org.openvpms.web.component.im.patient.PatientByCustomerQuery,contains=true

#
# Comment the following line to make starts-with searches for products the default.
#
product.*                     org.openvpms.web.component.im.product.ProductQuery,contains=true

Note that:

  • Enabling customers or patient searches could adversely affect performance. In the worst case scenario, every customer or patient will be scanned for matches.
  • Any change won't be picked up until either the web application or Tomcat is restarted.
  • The change will be need to be re-applied each time the web application is deployed.