Hello,
I have a dataset with patient_ID and patients' diagnosis codes. If a patient had more than one diagnosis, they are in multiple rows. In another words, the dataset is not unique by patient_ID.
I would like to create a counter, which is the maximum number of diagnosis a patient can have.
Can somebody tell me, whether the codes below are creating this counter?
proc sql noprint; select left(trim(put(MAX(count),5.))) into: Idy from (select count(*) as count from data group by patient_id); QUIT; %PUT &Idy;
Thank you very much.
Best.
Yanyan
... View more