Skip to main content
Version: 3.1

Build include and exclude rules

Overview​

This flow describes how to build the include and exclude rules of a facility valueset in Care. The rules decide which codes the valueset contains.

Pre-requisites​

  • You are on the Create ValueSet page or the Edit ValueSet page of a facility valueset. See Create a valueset or Update or retire a valueset.
  • If you change an existing valueset, it is shared with your department or a sub-department of it.
  • You have the permissions listed below.

Permissions​

PermissionAccess
Can Create/Update ValueSetsLets you change the rules and save the valueset. You must hold it in the facility's root organization (Administration). Without it there, the rules are read only. By default, the Facility Admin role holds it.
Can Read ValueSetsIf you change an existing valueset, lets you open it. You must hold it in a department that the valueset is shared with, or in a parent department of one. Holding it in the root organization alone is not enough, unless the valueset is shared with the root organization (Administration). By default, the Facility Admin, Administrator, Doctor, Nurse, Staff, Pharmacist and Volunteer roles hold it.

Steps​

1. Find the rules​

On the page, find the Definition section.

The section has Include rules and Exclude rules, each with the number of rules in it.

A rule in Include rules adds codes to the valueset. A rule in Exclude rules removes matching codes from the included codes. If a code matches both, Care leaves it out.

Step 1, Find the rules: the screen at this step, with the control for the step outlined

2. Choose whether to use the parent rules​

Do this step only if the valueset has a parent valueset.

Set the Use parent rules switch.

If the switch is on, Care combines the rules of the parent valueset with the rules on this page.

If the switch is off, Care uses only the rules on this page and ignores the parent rules.

Note: The Edit ValueSet page shows Use parent rules also for a valueset with no parent. For such a valueset, the switch has no effect.

Step 2, Choose whether to use the parent rules: the screen at this step, with the control for the step outlined

3. Add a rule​

Select Add Rule next to Include rules or Exclude rules.

Care adds a rule card, for example "Include rule 1", and opens it.

The card shows a summary line with the terminology system, the number of concepts, and the number of filters.

Step 3, Add a rule: the screen at this step, with the control for the step outlined

4. Select the terminology system​

In System, select LOINC, SNOMED, or UCUM. A new rule starts with LOINC.

If you need a specific version of the terminology system, enter it in Version. This field is optional.

An include rule with no concepts and no filters takes every code in its terminology system. An exclude rule like this removes every code in its terminology system. Care shows a warning on such a rule.

If you change System later, Care clears the verified names of the concepts in the rule. Verify the codes again.

Step 4, Select the terminology system: the screen at this step, with the control for the step outlined

5. Add exact codes​

Use concepts or filters in a rule, not both. To use both, add a separate rule.

  1. Under Concepts, select Add Concept. Care adds a row with a Code box and a name box that shows Unverified.
  2. Enter the code in the Code box.
  3. Select Verify.

Care fills in the name of the concept and shows Code verified successfully. The button changes to Code Verified.

If Care cannot find the code, it shows We couldn't verify this code. Check the code and terminology system, then try again.

If you change a code after you verify it, Care clears its name. Verify the code again.

Verify every concept before you save. If a concept is not verified, Care shows Verify this code before saving.

Step 5, Add exact codes: the screen at this step, with the control for the step outlined

6. Add filters​

A filter matches a group of codes by a property of the terminology system.

  1. In the rule card, open Advanced: filter by properties.
  2. Select Add Filter. Care adds a row with Property, Operator, and Value boxes.
  3. Enter the property.
  4. Enter the operator.
  5. Enter the value.

All three boxes are required.

Care accepts only these operators: =, is-a, descendent-of, is-not-a, regex, in, not-in, generalizes, child-of, descendent-leaf, and exists. If you enter another operator, Care does not save the valueset.

Step 6, Add filters: the screen at this step, with the control for the step outlined

7. Remove a rule, a concept, or a filter​

To remove a rule, select the trash button on its card. Care shows Rule removed and an Undo button.

To bring back the rule, select Undo.

To remove one concept or one filter, select the trash button on its row.

Step 7, Remove a rule, a concept, or a filter: the screen at this step, with the control for the step outlined

8. Save the valueset​

Select Save.

If a rule has an error, its card shows Needs attention. Care lists the errors under Review these fields before saving.

Step 8, Save the valueset: the screen at this step, with the control for the step outlined

Expected Outcome​

  • The valueset contains the include rules and the exclude rules that you built.
  • The valueset gives the codes that match an include rule, minus the codes that match an exclude rule.
  • If the valueset has a parent and Use parent rules is on, Care also uses the parent rules.

Concepts:

Flows: