Set Definitions
  • 23 Aug 2024
  • 5 Minutes to read
  • Dark
    Light

Set Definitions

  • Dark
    Light

Article summary

Set Definitions are collections of data that can be saved for later use in other queries. Individual users may create sets through Clinical Reports for their own use, but only an administrator with the correct permissions can create and manage a system set through Set Definitions. System level sets can be shared across users and groups.

Sets are useful building blocks for common operations and can be used for security and record-level access constraints. Create a query, verify the results, then save the query into a set. Once the set has been created, it can be used as a collection restraint to restrict a user's or group's access to the set.

The Set Definitions home screen allows the administrator to view all sets and to whom those sets are assigned. From this screen it is possible to run, edit, delete, and create sets.


sets-createClick on image to zoom

Creating a Set Definition

It is important to note the difference between creating a set definition and creating a set. Creating a set definition defines the parameters and descriptions of the set, such as the name, description, query, and store. Use the guidelines below to create a set definition. All fields are required; if a required field is not completed or left empty, the Save buttons are disabled until the field is completed.

  1. Select add_circle in the top right corner of the Set Definitions home screen.
  2. Under Set name type the name of the set. It is important to note that protected set names must be surrounded by double underscores, such as __mysystemset__. If the double underscores are omitted then users, groups or those who have access to session_id are able to modify the set. With the underscores, only those that are in the searchappliance_system group can edit the set. No spaces may be used in the set name; use the underscore or camel case instead.
  3. Select either a single user or a group for the Owner.
  4. Enter the owner's user name or group name in the Owner name box provided. At this time anything can be entered in the box, but if the user or group is not spelled correctly or does not exist, no one will have access to the set.
  5. Enter a Description of the set.
  6. Select the Query type: query or report. See below for more query information.
  7. Select all applicable Stores from the drop-down list when creating a query set. All Non-excluded Stores includes all stores except those that are on a list found in the SearchServer.conf file; this list is configurable.
  8. Select the correct Field name:
    • PATIENTIDN: a number assigned to each unique patient in the system. This number is used to enable patient-centric querying, filtering and reporting. You must use FILTER.
    • NREF: a record number assigned to an instance of a record stored in the search server cache. Each store has its own number system, so to uniquely reference an instance of a record requires both a store and an NREF.
    • other: a field of the user's choice. A text box appears directly below for typing in the field name.
      WARNING:
      The other option should only be used if training has occurred. If used incorrectly, the results could be skewed, thus providing inaccurate results on subsequent searches.
  9. Paste the report in the Query box.
  10. Click Save or Save and Create. Saving a set without creating it saves the definition but does not create the set so others can use it.

Clicking arrow_back found in the top gray bar returns you to the set list without saving changes.



Query

It is possible to choose either a query (Single tab in Clinical Reports) or report (Compound tab in Clinical Reports). IMAT encourages the use of queries whenever possible. Multiple sets created with compound queries can negatively impact performance.

Query sets should be written in Clinical Reports to verify proper syntax and desired results. Copy and paste the query into the Set Definitions query box.

Report sets should be written in Clinical Reports to verify the query is correct and then copied and pasted to this area. Remember that when creating sets for reports, the parameter outputset=True must be used.


sets-dateClick on image to zoom

Date Created and Status

Set Created

The date displayed is the most recent date that the Run Set Definition button is pushed or Save And Create is selected while entering a new set definition or editing an existing set.

Set Status

This column indicates the status of each set: not created, created, outdated, requested, or failed. A set shows as outdated if the set has been edited but not yet run. Requested appears if Run Set Definition has been pushed, but the set has not yet finished running.

A priority_high appears if it has been more than 24 hours since the set was last updated either by manually clicking the run set button or through a cron job.

Failed error appears if the Type is Report and there is an error on the Python code.

Requested appears in the status column as the system is running the set. You may need to click on the set for the status to read Created.


sets-runClick on image to zoom

Running a Set Definition

Creating a set runs the query and makes the results available to users. This is true for both new sets and sets that have been edited.

If the status column reads Not Created or Outdated, create the set by clicking Run Set Definition This updates the set with any new information that has been fed into the server since the set was created or last updated. It also applies any updates to the set that may have been made through editing.



Set Updates

Because the information in sets is static and does not change, sets have to be updated periodically to include any new documents fed into the server. They may be updated manually by pressing Run Set Definition or you may contact professional services for them to configure automatic updates.


sets-delete-builtClick on image to zoom

Deleting a Built Set

It is possible to delete a currently defined and running set. Any user that tries to use that set receives an error and receives no results to the query. If a user is assigned to a collection that is using the set as criteria, the user cannot perform any searches.

To delete a built set, click Delete  Built Set. A confirmation appears verifying that the request has been received and the status changes to Not Created.

Enable a previously disabled set by simply clicking Run Set Definition.


Click on image to zoom

Editing a Set

  1. Locate the report to edit.
  2. Click Edit found in the right panel. It opens to a new screen allowing editing.
  3. Edit the following items as needed:
    • Set name
    • Owner type
    • Owner
    • Query type
    • Field name
    • Stores
    • Description
    • Query
  4. Click Save or Save and Create. Saving a set without creating it saves the definition but does not create the set so others can use it.
Note:
Changing the name of a set creates a new set instead of renaming the current set being edited.

Clicking arrow_back found in the top gray bar returns you to the set list without saving changes.


sets-deleteClick on image to zoom

Deleting a Set Definition

Deleting a set definition also removes the set and it will no longer be available to users. To delete a set definition:

  1. Locate the set you want to delete.
  2. Click Delete.
  3. Confirm you want to delete the set.

Was this article helpful?

What's Next