Viedoc Custom Reports Webinar Q&A

  • Published by Viedoc System 2024-12-06
  • Print

This video is a recording of the Viedoc Custom Reports webinar, part of the "Working Smarter series":

Cannot see the video? Click here.


Available packages

Q: Is it possible to have the list of R packages that can be used?

A: When you download the "dataset for custom reports" from the settings menu in Viedoc Reports, this includes a file called SampleReportCode.R. This R script contains a list of all packages that are loaded in the environment in which your R script will run. These are: vctrs, R6, generics, glue, lifecycle, magrittr, tibble, ellipsis, pillar, crayon, pkgconfig, tidyselect, purr, Rcpp, tidyr, dplyr, rlang, lubridate, stringr, stringi, plotly, survival. We will also add this information to the eLearning documentation.

Q: What to do if we wish to use a R-package that is not in the Viedoc servers. What is the process to get it approved/installed?

A: Please submit such requests to our Support and we will forward it to the Product Management team for evaluation. It would be good if you can provide some rationale why the package is needed.

Q: Is replace_na part of some R package?

A: This function is part of the package "tidyr".

Code list items

Q: Since the R reports work with an extract from the data, then does that mean that fields associated with codelist will have the decoded or the coded value?

A: Both. For example, if you have a field called AESER ("is the AE serious?") with options "Y - Yes" and "N - No", then the edcData will include a column "AESER" with values "Yes" and "No", as well as a column called "AESERCD" with values "Y" and "N". The suffix "CD" is used for the column that contains the code values.

Reference ranges

Q: There are local lab module in our studies. I want to have a report to show the local lab normal range of each sites. What data I should use - or where can I find the normal range data?

A: Currently, the reference data ranges cannot be exported via the Data Export module and Reports uses the same export process. So, you cannot access the reference ranges. That said, if the ranges are populated on a CRF, then the data can be taken from the respective CRF fields.

Medical coding

Q: Where is the dataset for medical coding to be used by R?

A: The dataset for medical coding is part of the edcData. In the example shown during the demonstration, a study was used that does not use medical coding. Therefore, these data frames were not shown during the demo. Each dictionary will be included in the edcData, for example edcData$MedDRA. This data will look the same as when exported via the Data Export module.

Troubleshooting

Q: It happens that a script runs correctly in R Studio but not in Viedoc, and error messages are usually not very explicit, which makes it difficult to debug. Any enhancement possible here?

A: Sometimes it can happen that a script runs fine in R Studio but not in Viedoc. One reason for this is that the version of R and/or any of the used packages might be different between Viedoc Reports and your R installation. Another reason could be that you only get a sample of the data when you download the "data for custom reports", which includes data for only the first few subjects. It might be that a subject not included in this dataset has a datapoint that is not handled well by your script, for example missing data or a partial date. Please reach out to Support if you get an error message that you think is not helpful.

Role-based access

Q: In the reports configuration, there were different categories. Is it documented somewhere which standard report goes in which category?

A: In the "visibility settings" a user role can be given access to each tab in Viedoc Reports (Dashboard, Demographics, Adverse events, Data browser, Reports). If a role has access to the latter one (Reports), then this role can see all standard reports. It is not possible to give a user role access to only a few selected standard reports.

Q: So what a user can see on the report will be based on their role? And What about the users that have multiple roles? (since you don't have to select a role to view the metrics)

A: Yes, what a user will see will depend on their role. So Viedoc Reports is working similar to how the EDC is working. For users with access with multiple roles, you can select which one you want to use once you have launched Viedoc Reports.

Q: How do we enable the view for the standard reports only?

A: If you have a role that should see only the standard reports, you can configure that in the global design settings in Designer. Every tab/section in Viedoc Reports comes with visibility settings so you can decide which roles that should have access to each section. In addition, for every custom report you can configure the role visibility to decide who can see each custom report.

Custom report templates

Q: For all these template reports, I believe we need to use the same variable names for the reports to work? Is there anyway to map data from different variable name to these standard reports?

A: The custom report examples on the eLearning are written such that they should work in any study that follows the CDASH naming standard. If your study uses different variable names, you will need to modify that directly in the R script that you can download from the eLearning.

Standard reports R scripts

Q: Is it possible to use all standard Viedoc reports as templates for custom reports? Would it be possible to access the code for these Viedoc reports?

A: Templates for the standard reports are currently not available. It's a good idea though and we can look at the possibility of publishing these as templates.

Q: Could you provide the code used for the standard reports (e.g. for the key risk indicators)?

A: The standard reports are currently not available as templates for the custom reports. We will follow up to see if these can be provided or published. The KRI report and audit trail review report include some specific elements that can't be used in a custom report, i.e. those would currently not be possible to mimic in a custom report.

Colour coding and graphical representations
Q: How can we create a table with color-coding (e.g. assigning a background color to a cell when the content meets a certain condition)? Can sample code be provided for this, and also for graphical representations such as the one in the standard report KRI?

A: Advanced formatting options are not supported, because the R scripts only provide the data to be displayed in the custom report, not the formatting. That said, you could use HTML within the actual values in your data, for example '<p style="color: red;">100</p>' to display the value 100 in red colour in Viedoc Reports. Note that this HTML code will become part of the item's value when you export your custom report, so whether this is a suitable workaround depends on how you intend to use your report.

Regarding the graph used within one of the KRI tables, this is also not currently supported in a custom report. Standard reports run in a different environment and have different packages available. This graph within the table is created with a package that is not available in custom reports.

Data synchronization

Q: Any way to force a refresh of the data to ensure the report is based on fresh (i.e. not up to 24 hour old) data?

A: Yes, the data can be manually refreshed by clicking the text “Data snapshot from <date>” in the footer of the Reports application.

Python for custom reports

Q: Is there currently any way to use Python instead of R to prepare reports for Viedoc Reports?

A: Currently, there are no plans to support Python.

Missing data

Q: Maybe warn against using datasets that may be non-existing (NULL) early in a study.

A: That is a good point. If, for example, zero AE forms have been saved so far in the entire study, then edcData$Forms$AE will return NULL. This might cause errors at subsequent steps in the script. Once an AE form is saved for any subject in the study, this error should disappear. There are multiple ways to prevent such errors, which we unfortunately could not demonstrate live due to limited time, but please have a look at the report examples on the eLearning.