-
Type:
New Feature
-
Resolution: Answered
-
Priority:
Minor
-
None
-
Component/s: Operator Logic
The existing “count” operator in the QDM determines if the number of events meets a given threshold. In the below example, count is used to assess whether there were more than two encounters of types A-D.
COUNT > 2:
OR: Encounter performed: A
OR: Encounter performed: B
OR: Encounter performed: C
OR: Encounter performed: D
However, in some cases the “COUNT” operator is used to determine how many of the underlying logic statements are true. In these cases, the logic must be constructed with a subset operator in each statement. This can be seen in the example below:
COUNT > 2:
OR: FIRST: Encounter performed: A
OR: FIRST: Encounter performed: B
OR: FIRST: Encounter performed: C
OR: FIRST: Encounter performed: D
This approach is not clear and the introduction of the “count true” operator helps to clarify the logic producing the following logic:
COUNT TRUE > 2:
OR: Encounter performed: A
OR: Encounter performed: B
OR: Encounter performed: C
OR: Encounter performed: D