Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this compound statement I want to add another criteria last date visit (encounterDate).
if there are two dates 2019-06-05 and 2018-07-02 the last date is 2019-06-05.
=Count({<patient_id={"=Age >=18"}>}DISTINCT patient_id)
thanks greatly appreciated.
=Count({<
patient_id={"=Age >=18"}
,encounterDate={"$(=Date(max(encounterDate)))"}
>}DISTINCT patient_id)
Thanks for your response, unfortunately I am getting 0 records when I am sure
that I should get some.
Can you post a screenshot of the expression editor
And post some sample data as well, so I have clarity on what your data looks like
The patients makes a number of visit to different facilities I want the last facility that the patient visisted.
Its hard to explain if you require more information please let me know.
Thanks your help and your professionalism
So currently Encounterdate is a timestamp field and not a date field
You need to remove the timepart from the timestamp , create a new field as below
For example
Load facultyname,gender,patient_id
, Encounterdate as encountertimestamp
,Date(Floor(Encounterdate)) as encounterdate
From yourdataSource;
Then try the same expression again
=Count({<
patient_id={"=Age >=18"}
,encounterDate={"$(=Date(max(encounterDate)))"}
>}DISTINCT patient_id)
I am trying to get something like this put I get zero
Data
Any help please?
I was missing a file