AnsweredAssumed Answered

Sort script

Question asked by mark_d2x on Jul 21, 2009
Latest reply on Jul 21, 2009 by etripoli

Title

Sort script

Post

Hi,

 

I need to auto create a list of patients that are sorted - sounds easy but am struggling here is why:

 

Variable 1 - ON LIST - parameter needed = Yes

Variable 2 - SECTION - Parameter - 1 2 3 4

Variable 3 - Hospital - parameter 1 2

 

so here is what I need:

 

Section 1

Hospital 1

Hospital 2

 

Section 2

Hospital 2

Hospital 1

 

Section 3

Hospital 1

Hospital 2

 

Section 4

Hospital 2

Hospital 1

 

So far, I have created a calculation field in the table to give me the values 11, 12, 21, 22, 31, 32, 41, 42.

 

So for week 1, I need to put the patients into this order 11, 12, 22, 21, 31, 32, 42, 41

 

For week 2, I need to put the patients into the order 12, 11, 21, 22, 32, 31, 41, 42

 

What I was going to do was from one of the layouts have 2 buttons - week 1 and week 2, this then runs a script that

 

Find ONLIST = yes

 

Sort  either 11, 12, 22, 21, 31, 32, 42, 41 or 12, 11, 21, 22, 32, 31, 41, 42.

 

How do this?

 

Mark

Outcomes