Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I would like to have a table relative to an hospital priorization (triage) according to manchester priorization (like red bracelet - emergency, orange bracelet - very urgent, yellow -urgent , green - not urgent). This triage can occur several times, if the patient's health gets worse.
So , lets imagine that a patient gets a green bracelet at 15:00:00h. At 16:00:00h, he gets a new, orange bracelet. I would like to have a table where I display the last colour of the bracelet (orange) but calculate the time difference between now (18:00:00h) and the time of the first bracelet assignment (16:00:00h). Something like:
ID Name Colour Waiting Time
123 John Orange 2:00:00h (18:00:00h - 15:00:00)
Does anyone know if I can get this in a table?
Thanks in advance.
Inês Castelhano
You can use the FirstSortedValue function to retrieve the last colour: FirstSortedValue(Colour, -Time). The waiting time can be calculated with something like Interval(Now()- Max(Time),'hh:mm:ss')
based on your example, wouldnt the first bracelet time be 15:00 - that is when he got the green bracelet. Would you also want to keep track of the different bracelets the person receives?
You can use the FirstSortedValue function to retrieve the last colour: FirstSortedValue(Colour, -Time). The waiting time can be calculated with something like Interval(Now()- Max(Time),'hh:mm:ss')
Hi Inês,
Do you want a histoy of that? Or just the last?
Where QlikView enters here? This sheet will be updated manually?
QV has a function called Interval that you can use to show the "Waiting Time".
Something like this:
interval(vWaitingTime - now(), 'hh:mm:ss')
Giba
Correct, should be 15:00:00. I corrected it already. I don't want to keep track, I just want to show in the same row last colour and waiting time (using first hour/time).
Thanks, with your idea I got it working!
Cheers,
Inês