No announcement yet.

Study Locks

  • Filter
  • Time
  • Show
Clear All
new posts

  • Study Locks

    Study Locks Report

    A Global System report which produces a listing of changes to the Study Lock field and when it was changed.

    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 (Study Locks)
      • Select Type = Normal
      • Specify a Category
      • Import the program code (Attachment) or click edit and past 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 (Study Locks)
      • Select the level for the report as Global (available to all studies) in the
      • Studies level selection box
      • Specify a description for the report (Study Locks)
      • Specify a Category (System)
      • Set Report Type = Global System Data
      • 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 and patient selection
      • Source Selection
        • Data set = GVIEWS.STUDIES
        • Variable = SOURCEDESCRIPTION
        • Selection Label = Source
        • Dependant = N/A
        • Type = Multiple
      • Study Selection
        • Data set = GVIEWS.STUDIES
        • Variable = STUDYDESCRIPTION
        • Selection Label = Study
        • Dependant = Yes
        • Type = Multiple
      • On the Titles and Footnotes tab, clear title line 3.
      • 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

    	Program:    StudyLock
    	Descripton: Creates a report of the study lock changes by
    	            Source and Study.
    proc sql;
    	create table report as
    	select  b.sourcedescription, b.studydescription, a.datestamp, a.username, a.newCharacterValue label='Lock Set To'
    	from gviews.studies as b, gviews.systemlog as a
    	where (b.datestamp = a._recordKey) and a.variable='LOCKED';
    ** Put final report output into macro to check for observations **;
    %macro reportit;
       ** Call macro to check for observations **;
       ** Check returned macro variable to see if there are any observations**;
       %if &nobs > 0 %then %do;
          ** if any obs then produce report **;
          proc sort;
             by sourceDescription studyDescription datestamp;
          proc print l noobs;
             by sourceDescription studyDescription;
       %else %do;
          ** if no obs then call macro to write a note to the report **;
          %noreport(message=Note: For the selected criteria there is no data to display);
    %mend reportit;
    ** Call Report macro **;
    Attached Files
    Last edited by Ronni Rubenstein; 12-21-2009, 12:14 PM.