Paper AD11 Displaying Multiple Graphs to Quickly Assess Patient Data Trends Hui Ping Chen and Eugene Johnson, Eli Lilly and Company, Indianapolis, IN ABSTRACT Populating multiple graphs, up to 15, on a single page allows a Data Manager to easily track data trends by patient. The slope and planer qualities of the line allow for a significant increase in the efficiency of trend analysis. This can be accomplished by using GREPLAY, however, there is another option; by using Data Step Graphics Interface (DSGI) it is much easier to combine more than 10 graphs onto a single page. If there are 300 patients weight changes across 8 visits under screening, it will be very efficient for Data Managers to monitor the trends of 15 patients concurrently. INTRODUCTION Clinical trials present a Data manager with a daunting amount of tasks to coordinate and data permutations to keep track of. One very significant and time consuming task is the monitoring of data trends. This task can be accomplished in many ways, all of which can dominate a Data Managers valuable time, including the scanning of line listings, the derivation of value delta from collection point to collection point and the subsequent scanning of those derivations. Most trends will resolve as expected, with minor, and insignificant, changes from baseline. But it is those data whose trends present a significant change from baseline, either within patient or across an investigative site or country, that provide the impetus to carry out the periodic analysis of data trends. Any process that could significantly reduce the amount of time a Data Manager spends on these analyses without compromising the quality of the monitoring would be of tremendous value. TREND GRAPHS The purpose of a trend analysis is to determine if the data are heading in a certain direction, or if there are anomalies in the data progression. Trend data are, by nature, easier to analyze using graphical representations specifically a line graph. The slope of a line, when large enough, can be easily and immediately discerned. When an observation of a trend line reveals inconsistencies or high absolute value slopes [ m = (y 2 y 1 )/(x 2 x 1 )] we can make an inference that will lead to further and more detailed observation of that specific patients data. The advantage gained is that a Data Manager does not need to examine each point in detail for each patient in order to achieve the aim of identifying anomalous trends. Trends that are expected or unremarkable can be easily and instantly weeded out. The compilation of multiple graphs per sheet can further enhance time conservation. In a dataset that contains a majority of expected trends unexpected trends will leap out when viewed beside the expected. Graphs already provide a compact way of viewing a large amount of data, by viewing multiple graphs simultaneously one can scan, potentially, hundreds of lines of data in a few seconds, and come away with an understanding of what is going on in the data. DSGI enables us to easily place multiple graphs on one page. COMBINE MUTIPLE GRAPHS IN ONE SINGLE PAGE PROC GREPLAY might be the first option when contemplating the display of multiple graphs in one single page. You need to define 4 sets of coordinate (corresponding to 4 corners) for one single graph, use PROC GSLIDE to create TITLE or FOOTNOTE, and use Annotate facility to annotate
identification information for each patient, such as Patient ID and Investigator ID. Therefore, in order to combine 15 graphs created by a previous procedure, such as GPLOT, onto one single page, you would need to define 60 sets of coordinate (15 graphs * 4 corners.) If those graphs are external image files, you would use Annotate facility instead of GREPLAY in order to import them into SAS for display, since Annotate facility allows you to import external image files but not display existing graphs created by previous procedures. Here is an example of using Annotate facility to import an external image file into SAS. DATA ANNO; LENGTH FUNCTION $5.; RETAIN XSYS '3' YSYS '3'; X = 0; Y = 0; FUNCTION = 'MOVE'; X = 100; Y = 100; IMGPATH = 'external-image-file'; STYLE = 'FIT'; FUNCTION = 'IMAGE'; PROC GSLIDE ANNOTATE = ANNO; QUIT; As with Annotate facility, you need to define coordinates for the location of your graph, with DSGI you only need 2 sets of coordinates, left lower corner and right upper corner, to import an external image file into SAS. Further, DSGI will also allow you to insert an existing graph at the same time. The insert function is the same as TREPLAY in GREPLAY. It is easy for you to use TITLE or FOOTNOTE statements to create common Titles or Footnotes, or export graphs with FILENAME = statement and GOPTION function, GSFNAME =. As for importing external image files into SAS, there is almost no difference between using either Annotate facility or DSGI. However, if the external files are not in BMP or JPEG formats, but in CGM (Computer Graphic Metafile) formats, you,unfortunately, cannot simply import those files by using Annotate facility, since CGM format does not support image files. Therefore, if you want to combine an external file in CGM format with an external image file in BMP or JPEG format, DSGI is the best choice. Here is an example of combining graphs of different formats onto one single page. FILENAME GRAPH 'external-cgm-file'; PROC GIMPORT FILEREF = GRAPH FILETYPE = CGM FORMAT = BINARY; DATA _NULL_; RC = GINIT(); RC = GRAPH('CLEAR');
RC = GDRAW('IMAGE', "external-bmp-file1", 50, 0, 100, 50, 'FIT'); RC = GDRAW('IMAGE', "external-bmp-file2", 0, 50, 50, 100, 'FIT'); RC = GSET('VIEWPORT', 1, 0, 0,.5,.5); RC = GSET('WINDOW', 1, 0, 0, 100, 100); RC = GSET('TRANSNO', 1); RC = GRAPH('INSERT', 'CGM'); RC = GSET('VIEWPORT', 2,.5,.5, 1, 1); RC = GSET('WINDOW', 2, 0, 0, 100, 100); RC = GSET('TRANSNO', 2); RC = GRAPH('INSERT', 'CGM1'); RC = GRAPH('UPDATE'); RC = GTERM(); QUIT; GIMPORT allows you to import an external file in CGM format into SAS and by default saves it in GSEG folder in WORK library with sequential file names, CGM, CGM1, CGM2 etc. Before you insert this CGM file by using DSGI, you need to define the range to display it. That is, to define where you want to insert this CGM file. You can also combine this file with other external image files or existing graphs onto one single page within DSGI. If there are 300 patients in one study and you want to monitor the trends of weight for each single patient across several visits, the most efficient way is to monitor 15 or 20 patient graphs one time. You can roughly select patients with abnormal weight trends from one single graph first, and only focus on those patients weights across visits in the next step. To plot the trends of weight you can simply use PROC GPLOT, and either output those graphs in graphic format (BMP or JPEG) or use NAME = option in PLOT statement for the purpose of combination later. Suppose 15 patients weight trends will be shown on one page for 300 patients, you need to generate 20 pages of graphs for monitoring. Therefore, it is clear that defining 2 sets of coordinates per patient ( 300 patients = 600 sets of coordinates) is absolutely more efficient than defining 4 sets of coordinates (300 patients = 1200 sets). Here is an example of using DSGI to automatically generate 2 sets of coordinate based on the number of patients data in one row and one column. %MACRO COORDINATES (ROW =, COL = ); DATA _NULL_; RC = GINIT(); RC = GRAPH('CLEAR'); %DO I=1 %TO &COL; %DO J=1 %TO &ROW; RC = GDRAW('IMAGE', "external-bmp-file", %EVAL((&I-1)*100/&COL), %EVAL((&J-1)*100/&ROW), %EVAL(&I*100/&COL), %EVAL(&J*100/&ROW), 'FIT'); %END;
%END; RC = GRAPH('UPDATE'); RC = GTERM(); %MEND OORDINATES; %COORDINATES (ROW = 3, COL = 4); Here is an alternative option by using Annotate facility. %MACRO COORDINATES (ROW =, COL = ); DATA ANNO; LENGTH FUNCTION $5.; RETAIN XSYS '3' YSYS '3'; %DO I = 1 %TO &COL; %DO J = 1 %TO &ROW; X = %EVAL((&I-1)*100/&COL+2); Y = %EVAL((&J-1)*100/&ROW+2); FUNCTION = 'MOVE'; X = %EVAL(&I*100/&COL-6); Y = %EVAL(&J*100/&ROW-6); IMGPATH = "external-bmp-file"; STYLE = 'FIT'; FUNCTION = 'IMAGE'; %END; %END; PROC GSLIDE ANNOTATE = ANNO; %MEND COORDINATES; %COORDINATES (ROW = 3, COL = 4); QUIT;
The data below are simulated only for the purposes of generating graphs with title, Weight (Kg) Trend
Across Visits Per Patient, shown above. Patient INV Visit2 Visit3 Visit4 Visit5 Visit6 Visit7 Visit8 Visit9 Visit10 1001 100 79 81 81 82 83 84 83 83 84 1002 100 67 65 62 60 59 57 57 58 57 1003 100 51 53 58 65 68 70 71 74 77 1004 100 69 70 70 70 71 71 70 71 71 1005 100 84 82 82 86 87 86 85 84 84 1006 100 53 53 52 53 53 1008 100 76 77 77 77 79 80 81 81 79 1015 100 88 90 92 94 94 93 93 92 92 1025 101 1026 101 58 57 58 59 60 58 57 58 58 1028 101 72 1030 101 63 64 65 64 64 62 61 63 64 1051 102 85 85 85 85 85 85 85 85 85 1052 102 102 100 100 98 68 98 104 104 104 1053 102 76 76 76 76 77.5 76 76 76 76 1054 102 73 72 1055 102 89 89 87 87 86 87 88 86 87 1056 102 63 60 CONCLUSION Using DSGI to compile multiple graphs of trend data, allows a Data Manager to increase the efficiency of comprehensive data review and trend analysis in particular, while allowing the programmer to develop the code with optimum efficiency. This method is easy to implement and can be expanded to encompass multiple data measures, such as height cross-referenced with weight. The ability to utilize existing graphs can further cut the development to implementation time of for this process. Further development can include the drill-down capabilities of DSGI in order to investigate anomalous readings instantly. REFERENCES SAS Institute (1999), SAS/GRAPH Software: Reference, Version 8, Copyright 1999 by SAS Institute Inc., Cary, NC, USA Paper: AD02 (Creating Flexible Graphics with Data step Graphics Interface (DSGI), 2005. CONTACT INFORMATION Your comments and questions are valuable and appreciated. Authors can be reached at Hui-Ping Chen Eli Lilly and Company Lilly Corporate Center Indianapolis, IN 46285 U.S.A. Email: huiping@lilly.com Eugene (Bill) Johnson Eli Lilly and Company Lilly Corporate Center Indianapolis, IN 46285 U.S.A. Email: Johnson_Eugene_Edward@lilly.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.