Hello Folks,
I am creating a listing merging all Med History, Con Meds, and AEs for manual review to catch items that may be recorded in one place but missing in others, e.g. an Indication for Con Meds that is missing from either MH or AE or a worsening AE missing an MH entry with original diagnosis. It came out nicely but because the only item in common I have with all 3 tables is the subject number, it will duplicate some items. In a small example of the output, you can see that MEDICATION #2 is duplicated in the output since there are 4 AEs but only 2 Con Meds. Is there a way to modify my code to remove the additional entries of MEDICATION #2 on the output, so that it would only appear the first time and then be blank? Code posted below.
options mergenoby=error;
data study1.mhcmae;
merge study1.mh study1.cm study1.ae;
by subj;
run;
Medication | Indication | Adverse Event |
MEDICATION #1 | INDICATION #1 | AE #1 |
MEDICATION #2 | INDICATION #2 | AE #2 |
MEDICATION #2 | INDICATION #2 | AE #3 |
MEDICATION #2 | INDICATION #2 | AE #4 |