Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to be able to filter patients based on if they ever had a certain type of value in their past, not whether they currently do. Here is some sample data. I would like to have this done in the GUI and not within the script since I need the rest of the data for other analyses.
The result should return all rows for the first two patients and nothing for the last one if they ever had an Evaluation.
MRN_ID | Visit Type |
---|---|
33423 | Eval |
33423 | Therapy |
33423 | Therapy |
23453 | Therapy |
23453 | Eval |
23453 | Therapy |
23453 | Therapy |
23453 | Therapy |
423 | Therapy |
423 | Therapy |
423 | Therapy |
See attached example
Thanks, can you please explain what this is doing?
sum({<MRN_ID=P({<[Visit Type]={'Eval'}>}MRN_ID)>}1)
It returns the sum of 1 for every record that involves a patient that ever had a visit of the type Eval.
Great! How can I put this into a Listbox to select these?
Use two listboxes. One for Visit Type and one for MRN_ID. Then select Eval in the Visit Type listbox. Next right click the MRN_ID listbox and choose the Select Possible option from the context menu. Finally right click the Visit Type listbox and choose the Clear option from the context menu.