Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Salam,
I wanna find last occurence of patient file number. I wanna know how many patients
by thier number were last seen 6 month ago or more.
my fields:
URN: is patient file number
Appointnment datetime: date and time.
Regards,
In a table?
You should only have to create a table, where one column is =[URN] and the second column is =Max([Appointment Datetime])
It will then give you one entry for each unique URN and the maximum associated timestamp.
In the script you could use:
Table:
LOAD
URN,
Appointnment
FROM Source;
LEFT JOIN (Table) LOAD
URN,
IF(DATE(MAX(Appointnment))<DATE(ADDMONTHS(TODAY(),-6),1) AS [Last seen in six months]
RESIDENT Table
GROUP BY URN;
Then you can use this set analysis in your expression for counting the number of URN
SUM(Last seen in six months])