90 likes | 367 Views
Drill-down Graphs. By Heather Hoffman. Family Practice Department Project. Create drill-down graphs that depict % of patients for each CCS* over a given year CCS defines diagnostic groups based on ICD-9-CM diagnostic codes Create a level 1 graph with links to 19 level 2 graphs
E N D
Drill-down Graphs By Heather Hoffman
Family Practice Department Project • Create drill-down graphs that depict % of patients for each CCS* over a given year • CCS defines diagnostic groups based on ICD-9-CM diagnostic codes • Create a level 1 graph with links to 19 level 2 graphs • A patient may appear in more than one category *Clinical Classification System
What is a drill-down graph? • Has “hot zones” linked to target output • Create hot zones in graphic areas using HTML option • Provide link info by storing paths to target output in HTML variable • Idea is to provide link info needed to connect graph to related output
Using ODS to Generate Graphs • To create a drill-down graph, write a SAS program to: • Create initial chart using SAS/GRAPH software which will be primary chart in linked series of graphs • Create variable to hold HREF addresses for linked HTML files • Define values for new variable • Set ODS (Output Delivery System) output to HTML • Attach links to the primary chart • Create secondary, linked charts
Syntax • DATA SAS-data-set; SET SAS-data-set; IF expression THEN statement;<ELSE statement;> RUN; ODS LISTING CLOSE; ODS HTML <PATH='html-file-path'><BODY='html-file-name'>; GOPTIONS <DEVICE=GIF>; TITLE<n> <'text' | "text">; PROC GCHART <DATA=SAS-data-set>; HBAR chart-variable(s) </ option(s)>HTML=chart-drill-down-variable; WHERE where-expression; RUN; QUIT;ODS HTML CLOSE;
PROC GCHART • General form, basic GCHART step: PROC GCHART <DATA=SAS-data-set>;chart-formchart-variable </ options>;RUN; where: SAS-data-set=name of SAS data set to be used,chart-form=HBAR, VBAR, VBAR3D, PIE, PIE3D,chart-variable=variable determines # bars/pie slices, /(slash) indicates that options follow, andoptionsare valid options for the chart form specified.
Options • DESCENDING • NOSTATS • SUMVAR=summary-variable • values of summary-variable are summarized for each unique value of chart-variable • default statistic is SUM (chart displays total of values of summary variable for each unique value of the chart variable)
More Options • HTML=variable • Identifiesvariable in input data set whose values create links in HTML file created by ODS HTML statement • Links are associated with an area of chart and point to graph to be displayed