NESUG 2012 Coders' Corner Kick It Old School - Creating Reports with the DATA _NULL_ Step Sai Ma, PharmaNet/i3, Toronto, Ontario Canada Suwen Li, Everest Clinical Research Services Inc., Markham, Ontario Canada Minlan Li, Everest Clinical Research Services Inc., Markham, Ontario Canada ABSTRACT The powerful PROC REPORT can handle most of the clinical trial data reporting tasks. But when the report needs to be customized to meet special requirements, PROC REPORT can sometimes be awkward. This is where the DATA _NULL_ step comes to the rescue. It is old school. However, it allows you to have complete control in customizing your reports. This paper illustrates when and how to generate study reports using DATA _NULL_ step by two examples. KEY WORDS DATA _NULL_, AE, Study Comments, PROC REPORT INTRODUCTION PROC REPORT is a dominating reporting tool to tabulate, display, and in some cases, analyze clinical data. It is powerful, flexible and easy to use. But sometimes, we just wish it could do a little bit more. This extra bit can often make us scratch our heads for days. DATA _NULL_ step can be a practical alternative in a situation like this. Using DATA _NULL_ step to generate a report is like painting on a blank canvas. You can almost display anything anywhere on the report. It also covers some blind spots of PROC REPORT so that the report-generating task is simplified and handled more efficiently. Two examples follow. The first example outlines how to make one SOC (system organ class) group of AE (adverse event) terms continuously flow to the next page when multiple columns need to spread over more than one page, and the second one elaborates on how to display long study comments in subject listings. Both examples show why DATA _NULL_ step is preferred over PROC REPORT under certain circumstances. The main focus of this paper is not to give a detailed tutorial on the usage of DATA _NULL_ step; rather, it is to show when and how DATA _NULL_ step can be used as a supplement to PROC REPORT. EXAMPLE 1: AE TABLE WITH THE SAME SOC TERMS CARRIED TO THE NEXT PAGE FOR ALL TREATMENT GROUPS SPLIT OVER TWO PAGES The table display requirements are as such: 1) The wrapped SOC term should be properly indented to enhance readability. For example, Neoplasms benign, malignant and unspecified (incl cysts and polyps) 4 ( 4.6) 4 ( 2.5) ...... 4 ( 4.6) 4 ( 2.5) ...... should appear: Neoplasms benign, malignant and unspecified (incl cysts and ���polyps) 2) If all the AE preferred terms under a SOC term cannot be printed on the same page, the SOC term should be displayed at the top of the following page with text "(CONT.)" attached to indicate continuation. For example, Infections and infestations Upper respiratory tract infection Urinary tract infection 4 ( 5.6) 2 ( 2.8) 1 ( 1.4) 2 ( 2.3) 1 ( 1.1) 1 ( 1.1) ...... ...... ...... 1 ( 1.4) 0 ...... with top of the next page: Infections and infestations (CONT.) Influenza 3) To present the data in the most sensible form for comparison given the page size limitation, we need to split the desired treatment groups over 2 pages: Treatment group A, B, and C on the first page and D and E on the second. Applying the indentation requirement is not substantially different between PROC REPORT and DATA _NULL_ step. With proper data manipulation, both approaches can achieve this. It is the second and third requirements that deserve 1 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued some thinking. By PROC REPORT, it does not seem feasible to get around the programming complexity of manually calculating the total number of terms a page can contain. The calculation difficulty can easily be escalated when considering indentation and counts for the insertion of blank lines after each group. If the total SOC groups, or the total AE terms, per page are simply set to a fixed number to ensure same group of preferred terms do not cross pages, the whole report loses its flexibility in displaying data and the output could become aesthetically unappealing. DATA _NULL_ step can circumvent this issue well. As a first step, we wrap the AE term (both SOC and preferred terms). This is accomplished by using an extra DATA step. Assuming the default delimiter that separates each individual word in an AE term is a space ("�"), then we must consider the following three cases: 1) The term breaks in the middle of a word. e.g., xxxx�xxxxx|xxxxx or xxxxxxx�xx|xxxx 2) The term breaks in the middle of a word, but the first half of the term is in one piece (no word delimiters; namely, a very long word). e.g., xxxxxxxxxx|xxxx 3) The term breaks between two words. e.g., xxxxxxxxxx|�xxxx or xxxxxxxxx�|xxxx In all three scenarios, the piece that is cut from the original AE term will be saved separately and the remaining piece will continue to loop this process until the whole term is exhausted. Further, in the second scenario, a bar ("-") will be inserted at the end of the cut part to indicate word truncation. A counter variable (WRAPLINE) can tell how many pieces the original AE term is cut into. Sample data on wrapped AE terms can be found in Output 1. After this is done, DATA _NULL_ step can take care of the rest. Line size, page size, variable of number of lines processed and the variable of number of remaining lines are all defined in FILE statement. The PRINT option makes sure the output file contains carriage control characters. data _null_; set nesug12 end=lastrec; file print ls=132 notitles line=lineno ll=lineleft ps=52; Then we need a variable to flag new page (NEWPAGE) and a variable to keep track of the page number (PAGENO). They are both updated under the HEADER statement label which is linked at the top of each page. The _PAGE_ modifier creates a page break at the beginning of each page. When the DATA step hits the dataset boundary or the beginning of the spaces saved for footnotes, statements under label FOOTER will be linked. The contents of the predefined footnote macro variables (&&FFOOT&J) will be loaded in the report. As a syntax note, we need two RETURN statements for each statement label to prevent the statements being executed with each iteration of the DATA step. if lineno eq 1 then link header; ...... if lastrec or lineleft le &footnum+1 then link footer; return; header: put _page_; pageno+1; newpage=1; ...... return; footer: put @1 132*'_' ; %do j=1 %to &footnum; put @1 &&ffoot&j; %end; ...... return; To address the second table display requirement, we should carefully consider the circumstances that table headers and footnotes need to be inserted. Apart from the beginning and the bottom part of the page, when a wrapped AE term (SOC term or preferred term) requires more lines than what remains on the page (tested by comparing the values of variable 2 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued LINELEFT and macro variable FOOTNUM), then both HEADER and FOOTER labels should be linked. Also, if a page break is inserted in the middle of the same group of preferred terms, the corresponding SOC term will be carried forward to the following page and the new page flag is reset to zero. Variable CONT is used to flag the AE term after which we need to break the SOC group to flow to the next page and insert the text "(CONT.)". This is also necessary in order to meet the third requirement. All the AE terms will populate the report through the adjustment of the column pointer control (@). The exact number of spaces to be indented depends on the output column width and the study report requirements. if not first.soc_term and newpage eq 1 then do; put @1 soc_term "(CONT.)"; cont=1; end; newpage=0; The variable PAGENO generated by DATA _NULL_ step counts the page numbers for us. This is a very useful feature not only to allow treatment groups to flow over pages (i.e., the third requirement), but to support applications like generating dynamic report footnotes (e.g., only on first/alternate/selected pages). To get this key information, all we need is to run data through the DATA _NULL_ step one extra time before we use the DATA _NULL_ step to generate the final output. The output dataset from the first pass of DATA _NULL_ step (FINAL) will be needed, hence saved, to determine the desired page number, and the actual output can then be suppressed by ODS statements. With the page number in place, we are now ready to split the data from each page into two parts: the first part is for the first three treatment groups (Treatments A, B, and C), and the second part is for the remaining two groups (Treatments D and E). data final; set nesug12 end=lastrec; file print ls=132 notitles line=lineno ll=lineleft ps=52; ...... run; data final; set final (rename=(pageno=pagegrp) in=aaa drop=treat_d: treat_e:) final (rename=(pageno=pagegrp) in=bbb drop=treat_a: treat_b: treat_c:) ; if aaa then pagesub=1; else if bbb then pagesub=2; run; proc sort data=final; by pagesub soc_term pt_term wrapline; run; The new variables CONTSEQ1, CONTSEQ2, PAGESUB and PRESUB are used together to flag the page breaks and to insert the headers and footnotes. Treatments will be displayed within each PAGESUB group (A, B, and C if PAGESUB is 1; D and E if PAGESUB is 2). All other steps follow what the first DATA _NULL_ step defines. data final; set final; by pagegrp pagesub soc_term pt_term wrapline; if first.soc_term and missing(cont) then contseq1+1; if first.soc_term then contseq2+1; presub=lag(pagesub); run; data _null_; set final end=lastrec; file print ls=132 notitles line=lineno ll=lineleft ps=52; by contseq1 contseq2 soc_term pt_term wrapline; if lineno eq 1 then link header; if not missing(presub) and (pagesub ne presub) then do; link footer; link header; end; if not first.contseq1 and newpage eq 1 then put @1 soc_term "(CONT.)"; newpage=0; if pagesub eq 1 then do; ...... end; else if pagesub eq 2 then do; 3 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued ...... end; if lastrec then link footer; return; header: ...... return; footer: ...... return; run; Although PROC REPORT can handle a situation where multiple treatment groups must flow over many pages (by suppressing the WRAP option in the PROC REPORT statement and specifying ID option in the DEFINE statement for the repeating variables), the insertion of page continuation text "XXXX XXX (CONT.)" still requires some additional calculation on the report page capacity. As discussed above, for tables with standard outputs (i.e., all treatment groups can be displayed within the same page), DATA _NULL_ step bypasses this need completely, whereas for tables with special output requirements as in the example above, DATA _NULL_ step can automatically generate the page numbers that takes all other requirements into consideration (wrapping long AE terms and breaking pages under the same SOC term). This makes DATA _NULL_ step a very appealing and effective approach for this type of application. Sample data is listed below in Output 1. Selected outputs are attached in the appendix (Output 5). CONTSEQ1 CONTSEQ2 PAGEGRP PAGESUB 19 19 19 22 22 22 22 22 25 25 25 25 25 25 25 25 28 28 28 28 28 28 21 21 21 24 24 24 25 25 28 28 28 28 28 28 29 29 32 32 32 32 32 32 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 1 1 2 2 2 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 PRESUB SOC_NEW Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Respiratory, thoracic mediastinal disorders Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Psychiatric disorders Psychiatric disorders Respiratory, thoracic mediastinal disorders Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 CONT SOC_TERM Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Psychiatric disorders Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Psychiatric disorders Psychiatric disorders Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic Respiratory, thoracic 1 1 and and and and and and mediastinal mediastinal mediastinal mediastinal mediastinal mediastinal disorders disorders disorders disorders disorders disorders and and and and and and mediastinal mediastinal mediastinal mediastinal mediastinal mediastinal disorders disorders disorders disorders disorders disorders PT_TERM PT_NEW Abnormal dreams Anxiety Abnormal dreams Anxiety Abnormal dreams Anxiety Bruxism Restlessness Abnormal dreams Anxiety Bruxism Restlessness and and and and and mediastinal mediastinal mediastinal mediastinal disorders disorders disorders disorders Paranasal sinus hypersecretion Paranasal sinus hypersecretion Rhinorrhoea Sinus congestion Bruxism Restlessness Paranasal sinus hypersecretion Rhinorrhoea Sinus congestion Bruxism Restlessness mediastinal mediastinal mediastinal mediastinal disorders disorders disorders disorders Paranasal sinus hypersecretion Paranasal sinus hypersecretion Rhinorrhoea Sinus congestion Paranasal sinus hypersecretion Rhinorrhoea Sinus congestion and and and and and Output 1. Sample Data - Page Break Flags and Wrapped AE Terms 4 WRAPLINE 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 2 1 2 1 1 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued EXAMPLE 2: LISTING WITH EXCESSIVELY LONG COMMENTS Comment variables are typically lengthy (up to 200 characters) in the context of clinical trial studies. For certain data panels, for example, ECG, Questionnaire, or Overall Study Comments, there can be more than one comment variable collected. A typical method to display all the comments in the relevant subject data listing is to stack them vertically, and to squeeze other fields into the report as much as possible to make room for this column. However, such a listing is prone to have a disproportionally slim comment field. Our goal when incorporating study comments within subject data listings is to ensure that the reviewer sees complete subject information without having to flip pages, as presented in Display 1. AABBCC PHARMACEUTICALS Protocol XXXXXX123 COMPOUND ## Page xxx of yyy Listing - Subject Disposition and Evaluability _______________________________________________________________________________________________________________________________________ Site # (Inv. Name) / Subject Treatment # Group Date Consented (yyyy-mm-dd) Disposition Date (yyyy-mm-dd) Last Duration (days) Reason for Treatment ITT EPP -----------------Dose --------------Discontinued Study Last (tabs) Study Treatment Completed/ Dose Discontinued _______________________________________________________________________________________________________________________________________ XXX (XXXXXXXXXXXX) 001 Placebo XXXX-XX-XX Completed/ XXXX-XX-XX XXXX-XX-XX X XXX XXX Discontinued study/ ...... Comment: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Completed/ Yes/ Yes/ Withdrawal of consent/ No No Adverse Events/...... ...... _______________________________________________________________________________________________________________________________________ Display 1. Listing Shell To this end, we first concatenate all the original comment variables into a new variable (CMNT). Similar to what is done in Example 1, we then decompose this new comment variable into pieces and assign them to individual variables (CMNT1 - CMNT4). The variable length for each piece can be as long as the full line size of the report. However, a reasonably large number is usually sufficient (e.g., 100) for a better layout. Once the length is decided, the actual "cutting" part is fairly straightforward. j=0; i=100; do while (compress(cmnt) ne ''); temp=substr(cmnt,1,i); cutoff=substr(temp,i,1); i=i-1; do while (cutoff ne ' '); cutoff=substr(temp,i,1); i=i-1; end; j=j+1; if j=1 then cmnt1=substr(temp,1,i); else if j=2 then cmnt2=substr(temp,1,i); else if j=3 then cmnt3=substr(temp,1,i); else if j=4 then cmnt4=substr(temp,1,i); cmnt=substr(cmnt,i+2); end; Output 2 has the sample data. cmnt1 Comment: SUBJECT INDEPENDENTLY D/C'ED STUDY MED (PRECIPITATED BY AES) 99XXX2099 AND MADE SITE AWARE cmnt2 OF THIS ON 99XXX99. SHE WAS SCHEDULED FOR HER TERM VISIT ON 99XXX99 BUT DID NOT KEEP THAT APPT. cmnt3 AFTER NUMEROUS ATTEMPTS TO CONTACT HER (PHONE CALLS AND CERT. MAIL) SHE WAS, ON 99XXX2099 cmnt4 5 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued CONSIDERED LOST TO FOLLOW-UP SECONDARY TO "NO SHOWS" AT NUMEROUS TERM. APPTS. Output 2. Sample Data - Comment Variable Decomposition BY PROC REPORT The first attempt to generate the listing is handled by PROC REPORT. Four comment variables are stacked together (CMNTV) for the use of COMPUTE block within PROC REPORT, as shown in Output 3. compute after cmntv; line @13 cmntv $100.; endcomp; subnum cmntv ...... 777 777 777 777 Comment: SUBJECT INDEPENDENTLY D/C'ED STUDY MED (PRECIPITATED BY AES) 99XXX2099 AND MADE SITE AWARE OF THIS ON 99XXX99. SHE WAS SCHEDULED FOR HER TERM VISIT ON 99XXX99 BUT DID NOT KEEP THAT APPT. AFTER NUMEROUS ATTEMPTS TO CONTACT HER (PHONE CALLS AND CERT. MAIL) SHE WAS, ON 99XXX99 CONSIDERED LOST TO FOLLOW-UP SECONDARY TO "NO SHOWS" AT NUMEROUS TERM. APPTS. ...... Output 3. Sample Data - Prepared for PROC REPORT The output created by PROC REPORT looks fine for short records (i.e., only CMNT1 is non-missing), but is problematic for longer records. The data are not grouped properly by the COMPUTE block. Blank lines are automatically inserted after the comment text. Furthermore, when the page break happens to lie among multiple comment lines for the same subject, subject data are not the first row at the top of next page as expected. Instead, they are embedded between comments (Output 4). All of these issues call for an alternative - DATA _NULL_ step. AABBCC PHARMACEUTICALS Protocol XXXXXX123 COMPOUND ## Page xx1 of yyy Listing - Subject Disposition and Evaluability _______________________________________________________________________________________________________________________________________ Site # (Inv. Name) / Subject Treatment # Group Date Consented (yyyy-mm-dd) Disposition Date (yyyy-mm-dd) Last Duration (days) Reason for Treatment ITT EPP -----------------Dose --------------Discontinued Study Last (tabs) Study Treatment Completed/ Dose Discontinued _______________________________________________________________________________________________________________________________________ 999 (Cccccc C. Ccccccc, M.D.) ...... 555 Placebo 2099-99-99 Discontinued study 2099-99-99 2099 9 999 999 Other: lost to follow-up Comment: SUBJECT NEVER CAME IN FOR WK 34 CLINIC VISIT, SEVERAL ATTEMPTS WERE MADE TO CONTACT Yes No SUBJECT, LAST CONFIRMED DOSE SUBJECT TOOK WAS 9/99/2099 AND WAS TABS. ...... 777 Placebo 2099-99-99 Discontinued study 2099-99-99 2099-99-99 9 999 999 Investigator's decision Comment: SUBJECT INDEPENDENTLY D/C'ED STUDY MED (PRECIPITATED BY AES) 99XXX2099 AND MADE SITE AWARE Yes No _______________________________________________________________________________________________________________________________________ 6 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued AABBCC PHARMACEUTICALS Protocol XXXXXX123 COMPOUND ## Page xx2 of yyy Listing - Subject Disposition and Evaluability _______________________________________________________________________________________________________________________________________ Site # (Inv. Name) / Subject Treatment # Group Date (yyyy-mm-dd) Last Duration (days) Reason for Treatment ITT EPP -----------------Dose --------------Discontinued Study Last (tabs) Study Treatment Completed/ Dose Discontinued _______________________________________________________________________________________________________________________________________ 777 888 ...... Placebo Treatment Date Consented (yyyy-mm-dd) Disposition OF THIS ON 99XXX99. SHE WAS SCHEDULED FOR HER TERM VISIT ON 99XXX99 BUT DID NOT KEEP THAT APPT. 2099-99-99 Discontinued study 2099-99-99 2099-99-99 9 999 999 Investigator's decision AFTER NUMEROUS ATTEMPTS TO CONTACT HER (PHONE CALLS AND CERT. MAIL) SHE WAS, ON 99XXX99 CONSIDERED LOST TO FOLLOW-UP SECONDARY TO "NO SHOWS" AT NUMEROUS TERM. APPTS. 2099-99-99 Completed 2099-99-99 2099-99-99 9 999 999 Completed Yes No Yes Yes _______________________________________________________________________________________________________________________________________ Output 4. Sample Output - Generated by PROC REPORT BY DATA _NULL_ STEP Because the comment variables have already been reconciled into the ready-to-output form, DATA _NULL_ step can just write the data out to the report. Everything is controlled by querying the variable containing the number of remaining lines (REMAIN). Actions are taken when the number of remaining lines drops below the threshold in different testing situations. Again, as the following program shows, no complex calculation is needed and everything flows logically to create the final output (Output 6, Appendix). data _null_; set pharma12; by inv subnum; file print footnote header=newpage linesleft=remain; if first.inv then do; if remain eq 2 and missing(cmnt1) or remain lt 5 and not missing(cmnt1) or remain lt 6 and not missing(cmnt2) or remain lt 7 and not missing(cmnt3) or remain lt 8 and not missing(cmnt4) then put _page_ / inv; else put / inv; end; if not missing(cmnt4) then do; if remain lt 6 then put _page_ / &listvar / @14 cmnt1 / @23 cmnt2 / @23 cmnt3 / @23 cmnt4; else put / &listvar / @14 cmnt1 / @23 cmnt2 / @23 cmnt3 / @23 cmnt4; end; else if not missing(cmnt3) then do; if remain lt 5 then put _page_ / &listvar / @14 cmnt1 / @23 cmnt2 / @23 cmnt3; else put / &listvar / @14 cmnt1 / @23 cmnt2 / @23 cmnt3; end; else if not missing(cmnt2) then do; if remain lt 4 then put _page_ / &listvar / @14 cmnt1 / @23 cmnt2; else put / &listvar / @14 cmnt1 / @23 cmnt2; end; else if not missing(cmnt1) then do; if remain lt 3 then put _page_ / &listvar / @10 cmnt1; else put / &listvar / @14 cmnt1; end; else if missing(cmnt1) then put / &listvar; return; newpage: put "%sysfunc(repeat(%str(_),132))" / "Site # (Inv. Name) /" // " Subject Treatment Date Disposition Date (yyyy-mm-dd)" " Last Duration (days) Reason for Treatment ITT EPP"/ 7 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued " # Group Consented " Dose --------------Discontinued"/ " (yyyy-mm-dd) " (tabs) Study Treatment"/ " " "/ " "%sysfunc(repeat(%str(_),132))"; if not first.inv then do; if first.subnum then put / inv '(CONT.)'; end; return; run; ------------------" Study Last" Completed/ Dose" Discontinued"/ CONCLUSION DATA _NULL_ step is not out of the picture as a reporting tool, although people do tend to choose the more wellrounded PROC REPORT. It is still an ideal technique to consider for reports that have special requirements, or, are too complicated to be created by PROC REPORT. There are a number of other nice features that DATA _NULL_ step can offer when used to create study reports, for example, routing report output, executing special functions or call routines [1] available within the DATA step, interacting with ODS, and creating flat files for other programs and databases . Become familiar with the basic syntax and study some interesting examples, so that you can give DATA _NULL_ step a shot next time you struggle with a fancy-looking report. REFERENCES [1]. Bahler, Caroline; Brinsfield, Eric (2002), "Report Creation Using Data _NULL_", SUGI 27 Proceedings, April 1417, 2002, Orlando, Florida. [2]. Carpenter, Arthur L., "Creating Customized Reports Using the DATA _NULL_ Step". ACKNOWLEDGMENTS The author wants to thank Beizhen Lei and Kathy Colucci for their invaluable comments on this paper. CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Name: Enterprise: City, State: Work Phone: Fax: E-mail: Web: Sai Ma PharmaNet/i3 Toronto, Ontario Canada (905) 707-0469 (905) 707-7632 sma@pharmanet-i3.com www.pharmanet-i3.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies. 8 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued APPENDIX Page 1 Table: Incidence of Adverse Events by Treatment Group, System Organ Class, Preferred Term, and Severity ____________________________________________________________________________________________________________________________________ System Organ Class/ Treatment A Treatment B Treatment C Preferred Term (N=XX) (N=XX) (N=XX) ____________________________________________________________________________________________________________________________________ Mild Moderate Severe Mild Moderate Severe Mild Moderate Severe n (%) n (%) n (%) n (%) n (%) n (%) n (%) n (%) n (%) ___________________________________ ___________________________________ ___________________________________ ...... Psychiatric disorders 5 (16.7) 0 0 2 (7.4) 0 0 5 (20.8) 0 0 Abnormal dreams 4 (13.3) 0 0 0 0 0 3 (12.5) 0 0 Anxiety 3 (10.0) 0 0 0 0 0 0 0 0 ____________________________________________________________________________________________________________________________________ Page 2 Table: Incidence of Adverse Events by Treatment Group, System Organ Class, Preferred Term, and Severity ____________________________________________________________________________________________________________________________________ System Organ Class/ Treatment D Treatment E Preferred Term (N=XX) (N=XX) ____________________________________________________________________________________________________________________________________ Mild Moderate Severe Mild Moderate Severe n (%) n (%) n (%) n (%) n (%) n (%) ___________________________________ ___________________________________ ...... Psychiatric disorders 0 0 0 12 (40.0) 0 0 Abnormal dreams 0 0 0 7 (23.3) 0 0 Anxiety 0 0 0 3 (10.0) 0 0 ____________________________________________________________________________________________________________________________________ Page 3 Table: Incidence of Adverse Events by Treatment Group, System Organ Class, Preferred Term, and Severity ____________________________________________________________________________________________________________________________________ System Organ Class/ Treatment A Treatment B Treatment C Preferred Term (N=XX) (N=XX) (N=XX) ____________________________________________________________________________________________________________________________________ Mild Moderate Severe Mild Moderate Severe Mild Moderate Severe n (%) n (%) n (%) n (%) n (%) n (%) n (%) n (%) n (%) ___________________________________ ___________________________________ ___________________________________ Psychiatric disorders (CONT.) Bruxism 0 0 0 0 0 0 1 (4.2) 0 0 Restlessness 0 0 0 0 0 0 2 (8.3) 0 0 ...... Respiratory, thoracic and 1 (3.3) 0 0 2 (7.4) 0 0 2 (8.3) 0 0 �mediastinal disorders Paranasal sinus 0 0 0 1 (3.7) 0 0 1 (4.2) 0 0 �hypersecretion ...... ____________________________________________________________________________________________________________________________________ Page 4 Table: Incidence of Adverse Events by Treatment Group, System Organ Class, Preferred Term, and Severity ____________________________________________________________________________________________________________________________________ System Organ Class/ Treatment D Treatment E Preferred Term (N=XX) (N=XX) ____________________________________________________________________________________________________________________________________ Mild Moderate Severe Mild Moderate Severe n (%) n (%) n (%) n (%) n (%) n (%) ___________________________________ ___________________________________ Psychiatric disorders (CONT.) Bruxism 0 0 0 1 (3.3) 0 0 Restlessness 0 0 0 2 (6.7) 0 0 ...... Respiratory, thoracic and 0 0 0 4 (13.3) 0 0 �mediastinal disorders Paranasal sinus 0 0 0 2 (6.7) 0 0 �hypersecretion ...... ____________________________________________________________________________________________________________________________________ Output 5. Final Output - Example 1 9 NESUG 2012 Coders' Corner <Kick It Old School - Creating Reports with the DATA _NULL_ Step>, continued AABBCC PHARMACEUTICALS Protocol XXXXXX123 COMPOUND ## Page xx1 of yyy Listing - Subject Disposition and Evaluability _______________________________________________________________________________________________________________________________________ Site # (Inv. Name) / Subject Treatment # Group Date Consented (yyyy-mm-dd) Disposition Date (yyyy-mm-dd) Last Duration (days) Reason for Treatment ITT EPP -----------------Dose --------------Discontinued Study Last (tabs) Study Treatment Completed/ Dose Discontinued _______________________________________________________________________________________________________________________________________ 999 (Cccccc C. Ccccccc, M.D.) 111 Placebo 2099-99-99 Discontinued study 2099-99-99 2099-99-99 9 999 999 Adverse event Yes Yes 222 Treatment 2099-99-99 Completed 2099-99-99 2099-99-99 9 999 999 Completed Yes Yes 333 Placebo 2099-99-99 Discontinued trt. 2099-99-99 2099-99-99 9 999 999 Other Comment: PATIENT WANTED TO DISCONTINUE TREATMENT BECAUSE SHE BELIEVED IT WASN'T BENEFICIAL TO HER. Yes No 444 Treatment Yes No 555 Placebo 2099-99-99 Discontinued study 2099-99-99 2099 9 999 999 Other: lost to follow-up Comment: SUBJECT NEVER CAME IN FOR WK 34 CLINIC VISIT, SEVERAL ATTEMPTS WERE MADE TO CONTACT SUBJECT, LAST CONFIRMED DOSE SUBJECT TOOK WAS 9/99/2099 AND WAS TABS. Yes No 666 Treatment Yes Yes 777 Placebo 2099-99-99 Discontinued study 2099-99-99 2099-99-99 9 999 999 Investigator's decision Comment: SUBJECT INDEPENDENTLY D/C'ED STUDY MED (PRECIPITATED BY AES) 99XXX2099 AND MADE SITE AWARE OF THIS ON 99XXX99. SHE WAS SCHEDULED FOR HER TERM VISIT ON 99XXX99 BUT DID NOT KEEP THAT APPT. AFTER NUMEROUS ATTEMPTS TO CONTACT HER (PHONE CALLS AND CERT. MAIL) SHE WAS, ON 99XXX2099 CONSIDERED LOST TO FOLLOW-UP SECONDARY TO "NO SHOWS" AT NUMEROUS TERM. APPTS. 2099-99-99 2099-99-99 Discontinued study Completed 2099-99-99 2099-99-99 2099-99-99 2099-99-99 9 9 999 999 999 999 Withdrawal of consent Completed Yes No ...... _______________________________________________________________________________________________________________________________________ Output 6. Final Output - Example 2 10