Your displayed data set doesn't have duplicates that I can see. This won't give you the formatting youw ant but it's close. The label of 'without adverse event likely belongs to the TRTAN column.
proc transpose data=have out=want; by trtan; id aesevn; idlabel aesev; var count; run;