I would like to save the values from the first detail record in a group so that I can compare the data in the next 2nd, 3rd, 4th, etc detail records to the saved data from the 1st record. When the group changes, I want to repeat the process. The group is patient name.
Patient Date Doctor
Rec 1 John Doe 02/02/2012 X <---this is the data I want to store.
Rec 2 John Doe 01/04/2012 X
Rec 3 John Doe 12/22/2012 Y
Rec 4 John Doe 11/12/2012 X
Data saved is: John Doe 02/02/2012 X
I can now compare the Doctor from the 1st record to the doctor from the 3rd record to see that they are different. When the group changes, the data in the first record of the next group will be stored.
Group change:
Rec 1 Mary Jane 2/6/2012 A <---this is the stored data
Rec 2 Mary Jane 12/13/2012 X
Rec 3 Mary Jane 12/01/2012 A
Thanks in advance.
Brian
Patient Date Doctor
Rec 1 John Doe 02/02/2012 X <---this is the data I want to store.
Rec 2 John Doe 01/04/2012 X
Rec 3 John Doe 12/22/2012 Y
Rec 4 John Doe 11/12/2012 X
Data saved is: John Doe 02/02/2012 X
I can now compare the Doctor from the 1st record to the doctor from the 3rd record to see that they are different. When the group changes, the data in the first record of the next group will be stored.
Group change:
Rec 1 Mary Jane 2/6/2012 A <---this is the stored data
Rec 2 Mary Jane 12/13/2012 X
Rec 3 Mary Jane 12/01/2012 A
Thanks in advance.
Brian