ClinPlus Data Management V3.0
Report Examples
Non-Verified Records
Description
The Non-Verified Records Report produces a listing of records that have a status less than verified. This report can be subset by Tracking Batch and can be used to aid in the clean up of data. This example is valid for use in ClinPlus Data Management Version 3.0(SR-1) and higher.
Sample Output
Instructions for adding the report programs
Code Example
Report Examples
Non-Verified Records
Description
The Non-Verified Records Report produces a listing of records that have a status less than verified. This report can be subset by Tracking Batch and can be used to aid in the clean up of data. This example is valid for use in ClinPlus Data Management Version 3.0(SR-1) and higher.
Sample Output
Instructions for adding the report programs
- Copy or Save the attached program code where it will be accessible to import
- Go to System Administration
- Go to Report Library
- Add a new report
- Enter a name for the report (Non-Verified Records)
- Select Type = Normal Specify a Category (Tracking)
- Click Import and browse to the program file
- Select program and click Open
- 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 (Non-Verified Records)
- Select the level for the report as Global (available to all studies) in the
- Studies level selection box
- Specify a description for the report
- Specify a Category (Tracking)
- Set Report Type = Current Study Only
- In the program field, browse to select the program defined above
- There is no pre processing or post processing program to specify
- In the Selection criteria past or set the following values to provide batch selection
- Batch Selection Data set = PVIEWS.BATCHES
- Variable = BATCH
- Selection Label = Tracking Batch
- Dependant = N/A
- Type = Multiple
- On the output tab, set the layout to Landscape
- To set a custom output such as HTML as opposed to the default SAS Output, on the output tab and 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 desired style. RTF or Printer works well
Code Example
Code:
/*********************************************************************\ Program: NonVerified Descripton: Creates a report of Non Verified Records. \*********************************************************************/ data work.batches; set psys._batches(&spw); run; %cpsubset(batches); proc sql; create table work._tracking as select b.* from work.batches as a join psys._tracking(&spw) as b on a.recordID=b._batchesKey; quit; proc sql; create table work.recordheaders as select a.*, b.datasetname from psys._recordHeaders(&spw) as a join psys._datasets(&spw) as b on a._datasetsKey=b.recordid where a.statuscode^='V'; quit; proc sort data=work.recordheaders; by datasetname _trackingkey sequence; run; proc sql; create table work.report as select a.*, b.* from work.recordheaders as a join (select c.recordid as trackingKey,c.patientNumber, c.barcode, d.pagenumber from (select e.recordid, e.barcode, e._pagesKey, f.patientNumber from work._tracking as e, psys._patients(&spw) as f where e._patientsKey=f.recordid ) as c, psys._pages(&spw) as d where c._pagesKey=d.recordId ) as b on a._trackingKey=b.trackingKey; quit; proc sort data=work.report; by datasetname barcode sequence; run; ** put final report code in a macro so we can check if there is any data to report **; %macro reportit; ** Check for observations **; %cpcheckobs(report); ** Check returned macro variable to see if there are any observations**; %if &nobs > 0 %then %do; ** if any obs then produce report **; proc print data=work.report; by datasetname barcode; var datasetname patientNumber barcode pagenumber sequence statuscode; run; %end; %else %do; ** if no obs then call macro to write a note to the report window **; %noreport(message=Note: For the selected criteria there is no data to display); %end; %mend reportit; ** Call reportit macro **; %reportit;