When referencing only a subset of the codes from an existing value set, this can be done two ways
- define another value set with only that code in it
- reference a specific code
In general, if the use case clearly identifies a specific code to reference, you can use it as a direct reference code. However, if there are multiple codes necessary, a new value set is needed.
Note that although Clinical Quality Language (CQL) does provide set operations that could be used to compute the subset of a value set using some expressive criteria, performing calculations involving value sets is not recommended for several reasons:
Terminology operations, such as membership, are communicated in the machine-readable file in specific ways that enable implementations to make use of terminology servers. Performing calculations on value sets requires the use of expansion, which is not required for membership testing when that testing is done by the terminology server. As a result, using value sets in calculation would impose an additional implementation burden on vendors consuming the measure.
The definition of terminology is by design a separate aspect of quality measure development. This separation of concerns has multiple benefits, including that the maintenance and governance of value sets can be performed independent of the maintenance and governance of the measures.
Value set definition often involves operations that are specific to the terminologies involved, so there is a great deal of variability in the way that these expressions are represented.
Example can be found here.