No announcement yet.

Query Batch Listing Report

  • Filter
  • Time
  • Show
Clear All
new posts

  • Query Batch Listing Report

    Query Batch Listing Report

    This is a simple listing of queries by batch with a subset selection by site, patient, and status.

    Instructions for adding the report program
    • Adding the program code
      • Go to System Administration
      • Go to Report Library
      • Add a new report
      • Enter a name for the report (Query Batch Listing)
      • Select Type = Normal
      • Specify a Category
      • Import the program code (Attachment) or click edit and paste the program code (see below) into the editor window
      • The Code Changes Exist field should now say ‘Yes’
      • Click Save on the Report Library Window
      • Click Go Back to return to the Reports menu
    • Define the Report Template(s)
      • Go to Report Templates
      • Add a new Template
      • Enter a name in the name input field (Query Batch Listing)
      • Select the level for the report as Global (available to all studies) in the studies level selection box
      • Specify a description for the report (Query Batch Listing)
      • Specify a Category
      • Set Report Type = Current Study Only
      • In the program field, browse to select the program defined above
      • There are no pre processing or post processing programs to specify
      • In the Selection criteria past or set the following values to provide investigator, patient, and pagenumber selection
      • Investigator Selection
        • Data set = PVIEWS.INVESTIGATORS
        • Variable = INVESTIGATORNUMBER
        • Selection Label = Site
        • Dependant = N/A
        • Type = Multiple
      • Patient Selection
        • Data set = PVIEWS.ENROLLMENT
        • Variable = PATIENTNUMBER
        • Selection Label = Patient
        • Dependant = Yes
        • Type = Multiple
      • Batch Selection
        • Data set = PVIEWS.QUERYBATCHES
        • Variable = BATCH
        • Selection Label = Batch Number
        • Dependant = No
        • Type = Multiple
      • Status Selection
        • Variable = STATUSDESCRIPTION
        • Selection Label = Status
        • Dependant = No
        • Type = Multiple
      • On the output tab, set the layout to Landscape
      • To set a custom output such as HTML or PDF as opposed to the default SAS Text Output, on the output tab set the following:
        • Layout = Landscape
        • Check ‘Use ODS’
        • Type = HTML or RTF or PDF (for rtf or pdf you need to have word or acrobat installed on the server)
        • Set the style = RTF or Printer – You can play with this but I like these the best for reports.
      • Click Save to save the template
    Sample Output

    Program Code
    data report;
    	set pviews.queries(keep=InvestigatorNumber patientNumber pagenumber1 questioncode batch question issueddate statusdescription);
    proc sort data=report;
    	by batch investigatorNumber patientNumber  pageNumber1 issueddate;
    Proc report data=report nowindows;
    	by batch;
    	columns investigatorNumber patientNumber questioncode pagenumber1 question;
    	define investigatorNumber /width=10 order;
    	define patientNumber /width=10  order;
    	define questionCode /width=10 ;
    	define pagenumber1 /width=10 ;
    	define question /width=30 flow;	
    Attached Files
    Last edited by Ronni Rubenstein; 12-21-2009, 12:08 PM.