Hello Everyone, I am new to this forum and currently learning SAS. I want to do QC for data obtained from different round like 1,2,3,4 etc. by comparison each value for each round (round 2 vs round 1, round 3 vs round 2 vs round 1) and placed all mismatch value into a new column at the end as 'QC comment' based on the condition of PID and visit. 1)First the program should check whether any new PID is added or removed when compared review from round2~round1. If found, keep entire row as a single colour with comment as 'PID missing or added' 2)For other column value mismatch, program should display comment available in 'QC comment' column. 3)'QC comment' column should be added as last column as more than 200 columns are available for comparison and dynamic row to be added. Attaching excel file for your reference. data patients;
input PID AGE Visit Round_review AE $ DRUG$ FRUG21 S3 S4 $ S5 S6 S7 T1 T2 $ T3 $20.;
cards;
101 33 1 1 asthma X 1 2 present 2 1 2 1 available not showing positivity >2.4
101 45 2 1 pain X 1 2 present 3 1 2 2 notavailable not showing positivity >2.5
101 57 1 1 asthma X 1 2 present 4 1 2 3 available showing positivity >2.6
101 69 3 1 Vomit X 1 2 present 5 1 2 1 notavailable not showing positivity >2.7
102 81 1 1 asthma X 1 2 present 3 1 2 2 available not showing positivity >2.8
102 93 1 1 pain X 1 2 present 7 1 2 3 notavailable not showing positivity >2.9
103 21 2 1 pain X 1 2 present 8 1 2 2 available not showing positivity >2.10
104 24 3 1 pain X 1 2 present 9 1 2 3 notavailable not showing positivity >2.11
101 33 1 2 asthma X 1 2 present 2 1 2 1 available not showing positivity >2.4
101 45 2 2 pain X 1 2 present 12 13 3 notavailable not showing positivity >2.5
101 57 1 2 asthma X 1 2 present 4 1 2 3 available showing positivity >2.6
101 69 3 2 Vomit X 1 2 present 5 1 2 1 notavailable not showing positivity >2.7
102 81 1 2 asthma X 1 2 present 6 1 2 2 available not showing positivity >2.8
102 93 1 2 pain X 1 2 present 7 1 2 3 notavailable not showing positivity >2.9
103 21 2 2 pain X 1 2 present 8 1 2 2 available not showing positivity >2.10
105 24 3 2 Vomit X 1 2 present 9 1 2 3 notavailable not showing positivity >2.17
108 21 2 2 pain X 1 2 present 8 1 2 2 available not showing positivity >2.10
102 81 7 2 asthma X 1 2 present 6 1 2 2 available
101 57 3 asthma X 1 2 present 4 1 2 3 available showing positivity >2.6
101 69 3 3 Vomit X 1 2 present 5 1 2 1 notavailable not showing positivity >2.7
102 81 1 3 asthma SALBUTAMOL 1 2 NOTFOUND 7 1 34 2 available not showing positivity >2.8
;
run; I tried using Proc sql and do loop but it is not working for every value data.
... View more