Hi,
I need to list out the medical stages of the patients. In the output the values of each stage should be unique in order. I shared the example set below.
data have;
input ID Date1 mmddyy10. stages$10.;
format Date1 mmddyy10.;
cards;
123 02/05/2000 7,2,2
456 08/08/1999 5,5,1
789 07/02/2012 1,1
187 06/06/2003 7,9
753 12/12/1993 2,9,2,2,2
654 01/11/2001 2,9,2
321 04/05/2000 12,5,9,5
987 03/02/1999 14
178 05/06/1998 5
845 03/03/2020 9,9,9
159 09/08/2020 1,3,18
run;
Expected output :
stages
Stg
7,2,2
7,2
5,5,1
5,1
1,1
1
7,9
7,9
2,9,2,2,2
9,2
2,9,2
9,2
12,5,9,5
12,9,5
14
14
5
5
9,9,9
9
1,3,18
1,3,18
The values should matches the corresponding ID and date.
Kindly suggest a code.
Thanks in advance!
... View more