Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklizzy
Creator II
Creator II

text object show the max date for current wait

hi

I have a cohort of people showing the time they came in and their associated EDwait

I have a text box that shows the number of these patient's waiting

=count({<MetricDesc=,MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''}>}  EventUniqueID)

the other box I need to show what the last persons wait was.. so I need a max of date but show the EDwait if you like ?

I tried this:

=Interval(max({<MetricDesc=,MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''}>} EDReadyWait)/24/60, 'hh:mm')

but this just gives me the max EDwait for all of those peopleI cant figure out how to add in the max date

thanks

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Give this one a shot:

FirstSortedValue({<

  EventUniqueID = P({<

  MetricDesc=,

  MetricID={'LI01'},

  Status-={'DISCHARGED','COMPLETED','LETTER'},

  Location-={'EAU'},

  ReadyStatus -={''}>

  }  EventUniqueID)

>} EDReadyWait, -assessmentdatetime)


Wrap this expression in an interval function if required

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

15 Replies
Anil_Babu_Samineni

What this returns when you use below one?

max({<MetricDesc=,MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''}>} EDReadyWait)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qliklizzy
Creator II
Creator II
Author

Hi

this just shows the max value of EDready wait.

So if there was 10 people who are ED ready it shows the longest wait,

however I need to refine it to the last person who came in , so max date and bring back their EDready wait

thanks

tresesco
MVP
MVP

Try using FirstSortedValue(), like:

=FisrtSortedValue({Set analysis} PatientField , -EDreadyWait)

jonathandienst
Partner - Champion III
Partner - Champion III

How do you identify the last person who came in (ie which field and what does the field contain)?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qliklizzy
Creator II
Creator II
Author

assessmentdatetime  is the time they came in,

I need a max of this, on the set analysis, bringing back the edready wait

thanks

qliklizzy
Creator II
Creator II
Author

thanks

this doesn't work.. I get a big number..

do you mean paitentfield is the date I need the max applying to?

=FirstSortedValue({<MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''} >} AssessmentDateTime , -EDReadyWait)

tresesco
MVP
MVP

May be this?

=FisrtSortedValue({<MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''} >} PersonField , -assessmentdatetime)

qliklizzy
Creator II
Creator II
Author

sorry was is person field?

thanks

qliklizzy
Creator II
Creator II
Author

sorry I edited my first reply to you, as I had first spelt incorrectly.

it returns a big value, where I need it to display time.

so I applied interval to it but it still doesn't retrieve the right answer.

the last person in should be 00:18 but I get 718:49

=interval(FirstSortedValue({<MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''} >} AssessmentDateTime , -EDReadyWait)/24/60, 'hh:mm')