Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I used this expression to get number of patients whose test value is more than 190. Can I use pure set analysis and count to get this number? If it can be done, I will be able to use union for more calculation.
=sum(
if (AGGR(
FirstSortedValue(
{<
YearMonth,
FLAG_DM={1},
CONTACT_DATE2 = {"$(='>=' & Date(V_selectedDate_1YearAgo) & '<=' & Date(V_selectedDate))"},
PAT_ID = {"=Age(Num(V_selectedDate), Only({<YearMonth>}BIRTH_DATE)) >= 21"},
COMPONENT_ID= {5577,1557762,1578329},
LABORDERDATE2 = {"$(='>=' & Date(V_selectedDate_1YearAgo) & '<=' & Date(V_selectedDate))"},
LABRESULT={'*'}
>}
LABRESULT, -CONTACT_DATE), PAT_ID
)>=190, 1,0)
)
Thanks
I don't think so..., because you calculate every firstsortedvalue() per PAT_ID
Perhaps you could do the calculation in script but then the calculation will be fixed....