We have created a text value based on a running sum which assigns a 1 each time the selected service is populated and a 0 for any other services on the same patient. This report assigns “Exclude” for all rows with runningsum = 0 and assigns “Include” for rows with runningsum greater than or equal to 1. After the include/exclude field is populated via a variable, we need to resort based on the service field so we can create breaks. This changes our original include/exclude assignments because the sort changes. Is there a way to fix this.
Selected service = primary
service flag runningsum (flag) incl/excl date
Pre-svc 0 0 EXCLUDE 12/31/2020
Primary 1 1 INCLUDE 1/1/2021
Secondary 0 1 INCLUDE 1/2/2021
Primary 1 2 INCLUDE 1/5/2021
Secondary 0 2 INCLUDE 1/6/2021
We need to ensure that the assigned include/exclude remains fixed so we can resort the data without losing these assigned values.
We want to provide break s at the service level with all other information remaining in tact.
Flag = 0 or 1
Running sum is next to that field, etc.