Quick Search

The structure of the quick search component is as follows:

"quickSearch":{
  "criteriaMandatory":true|false
  "properties":[
    { "name":"name of the property"
      "sequence":1
    },
    { "name":"name of the property"
      "sequence":2
      "properties":[
       ..
       ]
    }

}

This component supports search on string and integer type properties. At minimum one valid property (when a specified property does not exist, system ignores that property) should be specified, if no property is specified, the component is rendered disabled. The properties on the resource forms a search criteria. For the array or object and reference type of properties, it is necessary to specify the exact attribute (nested property) on which the search should be performed, more than one nested property can be specified, in this case each nested property forms a separate search criterion. For details on property representation refer to the property guide.

To use the quick search, a user only needs to enter characters in the input field after which results are automatically fetched; clicking the search button is optional. An automatic search is performed when the field is in focus. For every character entered, a new search query is performed. Wait time (configurable via property) is executed to ensure that user has stopped typing before the search is executed. In case, no input characters are entered, all results are obtained either by clicking the search button or by clicking enter when the focus is in the input field. The search is not case-sensitive.

A search request is executed with OR statements and the input value is inserted in the query with a LIKE for string and integer type of attributes.

If an empty search is performed on a non-mandatory field (identified as not required in the metatdata), then an additional or condition to fetch all the 'null' values is also added.

Specifying criteriaMandatory as true restricts a user from performing a blank search. When not specified system considers it to be false.

UI Essentials

The quick search queries all properties specified in the component. These properties are defined within the element quickSearch. For each of the search properties the quick search input field, a placeholder text is displayed. The displayed text is a combination of boilerplate text Search on and labels of the properties used in the quick search. Labels are separated with a comma followed by a space. For example, when the quick search is using properties code and message, the placeholder text in the input field displays:

  • Search on code, message

image

Example:Quick search on object claims:

"quickSearch":{
  "properties":[
    { "name":"code",
      "sequence":1
    },
    { "name":"serviceMember",// referenced property on claims resourced is specified upto single value property name
      "sequence":2,
      "properties":[
       {"name":"name",
        "sequence":1
       }
    ]
  ]
}

This enables quick search on claim code and service member last name.