Creating custom reports

  • Published by Viedoc System 2024-10-10
  • Print

Introduction

The custom reports are written in the programming language R that generates report tables and plots based on CRF and operational data. The R program can be re-used from study to study and is uploaded in Viedoc Designer.

The visibility of the custom reports can be controlled by role, so that dedicated reports can be created for different roles, for example Monitor, Project Manager, or Sponsor. This means that the custom report can only consist of data existing within the scope of the current study and user role.

The data in the custom reports is updated with every data sync, just like any other report in Viedoc Reports.

R version

The current version of the R program is 4.0.4.

Downloading the package

A .zip package for creating custom reports is downloaded from the Settings menu, found in the upper right corner of Viedoc Reports. This package is only available for users with access to the Reports page.

By clicking Download data for custom reports, and following the instructions on the screen, the .zip package is downloaded to your computer.

The .zip package consists of the following files that are to be used as support when writing your custom reports:

edcData.rds

This file contains sample data from the study, including CRF data and operational data, such as queries, processedqueries, reviews, signature, database lock, timelapse, and so on.

params.rds

This file includes these items:

  • Date of download - the date and time at which the data was pulled from Viedoc to the Reports server
  • Study Name
  • Study Type
  • Study Level Data - expectedNumberOfScreenedSubjects, expectedNumberOfEnrolledSubjects, expectedDateOfCompleteEnrollment, totalNumberOfStudySites, totalNumberOfUniqueCountries
  • Site Level Data - siteNumber, siteCode, siteName, countryCode, country, timeZone, timezoneOffset, siteType, expectedNumberOfSubjectsScreened, expectedNumberOfSubjectsEnrolled, maximumNumberOfSubjectsScreened

The list of sites in the "Site Level Data" is based on the user’s access to the study.

SampleReportCode.R

This is a sample report with explanations of the report structure. The code is a sample to give an idea to the user on how to write a report code, its corresponding inputs, and the structure of the output. This file also contains a list of R packages available for the user.

utilityFunctions.R

This file contains various functions that can be used when writing the custom report.

When finished, the R file uploads in the Global design settings of Viedoc Designer. For more information, see Configuring Viedoc Reports. The custom report is then selectable for users with permissions to see it in Viedoc Reports.

ProcessedQueries dataset

As part of the edcData.rds, the dataset "ProcessedQueries" is included. See the table below for more information:

Columns Labels Logic
QueryStudySeqNo Query study sequence number
SiteSeq Site sequence number
SiteName Site name
SiteCode Site code
SubjectSeq Subject sequence number
SubjectId Subject Id
EventSeq Event sequence number
EventId Event Id
EventName Event name
EventDate Event date
ActivityId Activity Id
ActivityName Activity name
FormId Form Id
FormName Form name
FormSeq Form sequence number
SubjectFormSeq Subject form sequence number
OriginSubjectFormSeq Origin Subject form sequence number
SourceSubjectFormSeq Source Subject form sequence number
ItemId Item Id
ItemName Item
QueryItemSeqNo Query item sequence number
RaisedOn Raised on
QueryType Query type
RangeCheckOID Range check OID
QueryText Query Text
PrequeryText Prequery Text Query text for the prequery raised
UserName User Name Username for the person who raised the query/ who left the field blank
QueryResolution Query Resolution
ClosedByDataEdit Query closed due to data edit Value is 'Yes', if on filtering Queries EDC where a single query can have multiple records, the text 'Query closed due to data edit' is present for any Query State in Query Resolved, Query Rejected, Query Approved, Query Closed.
QueryResolutionHistory Response comments
QueryStatus Current Query Status
PrequeryPromoted Prequery Promoted On Date value
PrequeryPromotedBy Prequery Promoted By Username value
PrequeryRaised Prequery Raised On Date value
PrequeryRaisedBy Prequery Raised By Username value
PrequeryRejected Prequery Rejected On Date value
PrequeryRejectedBy Prequery Rejected By Username value
PrequeryRemoved Prequery Removed On Date value
PrequeryRemovedBy Prequery Removed By Username value
QueryApproved Query Approved On
QueryApprovedBy Query Approved By Username value
QueryClosed Query Closed On
QueryClosedBy Query Closed By Username value
QueryRaised Query Raised On
QueryRaisedBy Query Raised By Username value
QueryRejected Query Rejected On
QueryRejectedBy Query Rejected By Username value
QueryRemoved Query Removed On
QueryRemovedBy Query Removed By Username value
QueryResolved Query Resolved On
QueryResolvedBy Query Resolved By Username value
QueryClosed_C Query Closed_C
OpenQueryAge Age of Open Query (Days) Difference between the Query Raised date and current date for query in 'Query Raised' state;
ResolvedQueryAge Age of Resolved Query (Days) Difference between the Query Resolved date and current date for query in 'Query Resolved' state
PrequeryAge Age of Unreleased Prequery (Days) Difference between the Prequery Raised date and current date for prequery in 'Prequery Raised' or 'Prequery Promoted' states
TimeToResolution Days To Resolve/Close Difference between the Query Raised date and Query Resolved/ Query Closed date
TimeToApproval Days To Approve/Reject from Resolve Stage Difference between the Query Resolved date and Query Approved/ Query Rejected date;
TimeToRelease Days to Release/Reject/Remove Prequery Difference between the Prequery Raised date and Prequery Rejected/Removed/Released(Query Raised) date
TimeofQueryCycle Time of Query Cycle (Days) Difference between the Query Raised date and Query Approved/ Query Rejected/ Query Closed date
TimeToRemoval Days to Remove
RaisedMonth Raised Month
ResolvedMonth Resolved Month
RemovedMonth Removed Month
LatestActionBy Latest Action By Username value
LatestActionOn Latest Action On Date value

Changes available after data sync

The ProcessedQueries dataset will be updated to include the new columns only when there is a new sync with the EDC. For production studies this happens automatically every day, as long as there has been a data change. For training studies, and for production studies without data modification in the past 24 hours, there will be no automatic data sync. As soon as the data is synced after the release, the new columns in the ProcessedQueries dataset are populated correctly and the standard reports using data will also display correctly.

Until the data has synced, the new Queries reports, and other reports that use data from the ProcessedQueries dataset, such as Missing Data, Form Status, PMS, and KRI will result in error/incorrect data. This is because they use the old ProcessedQueries data from Viedoc 4.79 and earlier, which would not have the required columns/column values for populating all reports.