Thursday, December 24, 2015

Counting the number of AEs and the numbers of subjects with AEs using proc SQL

/*******************************************************************/
/*   Compare the programs below and see what the differences are   */
/*******************************************************************/

select bsystxt, count(ptno)  
          from bios.ae 
          group by bsystxt;

WHO Body System Text                                        
 ------------------------------------------------------------
 BODY AS A WHOLE - GENERAL DISORDERS                        3
 CENTR & PERIPH NERVOUS SYSTEM DISORDERS                   17
 GASTRO-INTESTINAL SYSTEM DISORDERS                        31
 HEARING AND VESTIBULAR DISORDERS                           1
 PSYCHIATRIC DISORDERS                                      7
 SKIN AND APPENDAGES DISORDERS                              7
 URINARY SYSTEM DISORDERS                                   1
 VASCULAR (EXTRACARDIAC) DISORDERS                          4
 VISION DISORDERS                                           1



select bsystxt,count(distinct ptno)
   from bios.ae
   group by bsystxt;


 WHO Body System Text                                        
 ------------------------------------------------------------
 BODY AS A WHOLE - GENERAL DISORDERS                        2
 CENTR & PERIPH NERVOUS SYSTEM DISORDERS                    5
 GASTRO-INTESTINAL SYSTEM DISORDERS                         6
 HEARING AND VESTIBULAR DISORDERS                           1
 PSYCHIATRIC DISORDERS                                      3
 SKIN AND APPENDAGES DISORDERS                              7
 URINARY SYSTEM DISORDERS                                   1
 VASCULAR (EXTRACARDIAC) DISORDERS                          4
 VISION DISORDERS                                           1

No comments:

Post a Comment