Hello,
I have a dataset that looks something like this;
Patient Visit# Sex Blood Urine
1000 01 M
1000 02 4.5 5.2
1000 03 4.2 5.1
1001 01 F
1001 02 3.5 6.2
1001 03 3.2 5.3
...
I would like to have it look like this:
Patient Sex Blood01 Urine01 Blood02 Urine02
1000 M 4.5 5.2 4.2 5.1
1001 F 3.5 6.2 3.2 5.3
This difference here is that I want to see one row per patient (with their blood/ urine results by visit code across the columns).
I'm only somewhat familiar with SAS macros-- and I think that's what I need to solve this problem, but I'm not sure where to start. Any help would be greatly appreciated-- or event just some pointers to get me going in the write direction.
Thank you!
I have a dataset that looks something like this;
Patient Visit# Sex Blood Urine
1000 01 M
1000 02 4.5 5.2
1000 03 4.2 5.1
1001 01 F
1001 02 3.5 6.2
1001 03 3.2 5.3
...
I would like to have it look like this:
Patient Sex Blood01 Urine01 Blood02 Urine02
1000 M 4.5 5.2 4.2 5.1
1001 F 3.5 6.2 3.2 5.3
This difference here is that I want to see one row per patient (with their blood/ urine results by visit code across the columns).
I'm only somewhat familiar with SAS macros-- and I think that's what I need to solve this problem, but I'm not sure where to start. Any help would be greatly appreciated-- or event just some pointers to get me going in the write direction.
Thank you!