diff --git a/404.html b/404.html new file mode 100644 index 0000000..c33d4b1 --- /dev/null +++ b/404.html @@ -0,0 +1,95 @@ + + +
+ + + + +Copyright 2024 Boehringer-Ingelheim Pharma GmbH & Co.KG + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. ++ +
a00-papo.Rmd
This guide will help you configure the Patient Profile module for inclusion in DaVinci apps.
+The DaVinci Patient Profile module displays patient information on a subject-level basis. It is divided into three sections: summary, listings, and plots.
+The following screenshot shows the module configured to display the popular sample safetyData
dataset. Notice the three sections under the titles “Patient Information”, “Data Listings” and “Graphical Display”:
The next section breaks down the necessary configuration steps to set up this display.
+The final section shows the resulting configuration.
+The mod_patient_profile
function takes several arguments, some of which are optional:
module_id
: This is a unique identifier for the Shiny module in your DaVinci app.
subject_level_dataset_name
, subjid_var
: These are the subject-level dataset name and unique subject identifier column respectively.
sender_ids
: This optional parameter identifies modules that can request the display of target patient IDs. You can read more about it in the dedicated “Module Communication” article.
summary
, listings
, plots
: These optional parameters allow you to customize what information is displayed in each of the three section. Let’s take a look at each of them separately.
As will become apparent, some of these parameters have fields, and some of those fields have subfields. The complexity of this interface reflects its flexibility, but it can prove overwhelming. To alleviate this situation, we’ve made sure that this module is functional when partially configured and provides clear and helpful error messages when accidentally misconfigured.
+When a DaVinci application containing a misconfigured mod_patient_profile
starts it presents descriptive instructions on how to address the problem. Here’s a screenshot showing three such help messages: If no error is displayed on application start, the blame for any unexpected problems the users encounter should fall on the authors of this module or the infrastructure providers.
This forgiving behavior makes it possible to start with a minimal empty call to dv.papo::mod_patient_profile()
and parameterize it incrementally until a satisfactory configuration is reached.
summary
parameter
+The summary
parameter is a list that allows to customize the subject-level summary section. It is composed of:
vars
: These are the values you want to display in the this section. They index into the dataset specified by subject_level_dataset_name
.column_count
: This is the number of columns for the summary section.Recall the summary section of the sample image at the beginning of this article:
+The parameterization that generates that section is:
+summary = list(
+ vars = c("SUBJID", "SITEID", "ARM",
+ "TRTSDT", "TRTEDT", "AGE",
+ "RACE", "SEX", "BMIBL"),
+ column_count = 3
+)
+We’ve broken the vars
field into three lines to highlight the one-to-one mapping between each var and the their counterpart on the image.
The bold-faced descriptions of the variables are extracted from the label
column attribute already present in the dataset.
listings
parameter
+The listings
parameter is a named list of elements to include as listings in the “Data Listing” section.
Recall the listings section in the sample image at the beginning of this article:
+The parameterization that generates that section is:
+listings = list(
+ "Concomitant Medication" = list(
+ dataset = "cm"
+ ),
+ "Adverse Events" = list(
+ dataset = "adae",
+ default_vars = c("ASTDT", "ASTDY", "AENDT", "AENDY", "AEDECOD", "AESEV")
+ )
+)
+Notice how the names on the list ("Concomitant Medication"
and "Adverse Events"
) are used as the labels in the blue “Domain” selector. The mandatory dataset
field indicates which domain to display under which heading. The optional default_vars
is the initial selection of “Columns” to display on the listing. The user can modify that selection.
The bold-faced listing headings are extracted from the label
column attribute already present in the dataset.
plots
parameter
+The plots parameter is a named list of elements to include as plots in the “Graphical Display” section.
+Recall the plots section in the sample image at the beginning of this article: The parameterization that generates that section is:
+plots = list(
+ timeline_info = c(trt_start_date = "TRTSDT", trt_end_date = "TRTEDT"),
+ range_plots = list(
+ "Concomitant Medication" = list(
+ dataset = "cm",
+ vars = c(start_date = "CMSTDT", end_date = "CMENDT", decode = "CMDECOD",
+ grading = "CMDECOD"),
+ tooltip = c()
+ ),
+ "Adverse Events" = list(
+ dataset = "adae",
+ vars = c(start_date = "ASTDT", end_date = "AENDT", decode = "AEDECOD",
+ grading = "AESEV", serious_ae = "AESER"),
+ tooltip = c("AE Start Day: " = "ASTDY", "AE End Day: " = "AENDY")
+ )
+ ),
+ value_plots = list(
+ "Lab Values" = list(
+ dataset = "lb",
+ vars = c(analysis_param = "PARAM", analysis_val = "AVAL", analysis_date = "ADT",
+ analysis_indicator = "LBNRIND", range_low_limit = "A1LO", range_high_limit = "A1HI"),
+ tooltip = c()
+ )
+ ),
+ vline_vars = c("Informed Consent Date" = "RFICDT")
+ )
+As with the two previous sections, there is a clear mapping between the plot
fields and their effect on the displayed charts. Here’s a brief summary of those fields:
timeline_info
configures the extent of the horizontal time axis.range_plots
and value_plots
describe which plots to include.vline_vars
and vline_day_numbers
(optional and not used in the example) add extra vertical markers that run through all plots.palette
(optional and not used in the example) is used to fine-tune the color of points, ranges and vertical markers on plots.And here’s a more detailed account of their properties:
+plots/timeline_info
field
+The timeline_info
field is a list of date variables in the dataset specified by the subject_level_dataset_name
parameter. The two mandatory subfields are:
trt_start_date
: Treatment Start Date, used also as Day 1 Reference Date to derive Study Day numbers.trt_end_date
: Treatment End Date.There are two additional optional subfields:
+icf_date
: Informed Consent Form signing Date.part_end_date
: Participation End Date.They usually envelop and extend the treatment start-end time range. Including them expands the horizontal time range of the plots.
+plots/range_plots
field
+The range_plots
field is a named list of elements to include as plots for range-like events (adverse events, concomitant medications, etc.). Each of them has three members:
dataset
: Dataset name from which to pull the information.
vars
: Variables of interest for the event. They index into dataset
:
start_date
and end_date
: Beginning and end of the range.decode
: Description of the event.grading
: Intensity of the event. Used for color-coding ranges.serious_ae
: Marker of serious adverse event. Overlays a SAE
legend on top of events that require special attention.tooltip
: Defines a block of text to display as hover information over the left edge of each range. It is specified as a named list of dataset
variable names. The names of this list are included as literal text and honor three basic HTML formatting elements: <b>
, <i>
, <br>
. The columns the values refer to are populated with the value on the dataset relevant to any given row.
plots/value_plots
field
+The value_plots
field is a named list of elements to include as plots for value-like traces (lab measurements, vital signs, etc.). Each of them has three members:
dataset
: Dataset name from which to pull the information.
vars
: Variables of interest for the event. Only the first three are mandatory. They index into dataset
:
analysis_param
: Variable describing the parameter to plot.analysis_val
: Value associated to each time point.analysis_date
: Date of sample collection.analysis_indicator
: Used for color-coding the marker on the plot. Usually indicates whether a value is inside or outside of range.range_low_limit
: Lower limit of the range considered normal for this particular parameter.range_high_limit
: Higher limit of the range considered normal for this particular parameter.summary_stats
: This variable supplements analysis_val
and is useful for datasets that have more than one measurement per analysis_date
. It should point to a variable that summarizes all measurements on a single visit through a centrality calculation (mean, median, etc.).tooltip
: Defines a block of text to display as hover information over the left edge of each range. It is specified as a named list of dataset
variable names. The names of this list are included as literal text and honor three basic HTML formatting elements: <b>
, <i>
, <br>
. The columns the values refer to are populated with the value on the dataset relevant to any given row.
plots/vline_vars
field
+The vline_vars
field places vertical dashed lines on days indicated by this dataset columns. It indexes into the dataset subject_level_dataset_name
and expects values of type integer
, Date
or POSIXt
.
plots/vline_day_numbers
field
+The vline_day_numbers
field requires a vector of integers, representing CDISC (non-zero) Study Days. It places vertical dashed lines on the positions corresponding to those days.
plots/palette
field
+The palette
field requires a named list of colors. If a name on this list matches the text on a plot element, the associated color will be applied to that element. This mapping takes precedence over the built-in palette. It contains either an HTML (#xxxxxx) or an R color. As an example, if the desired color for an element tagged “Relevant” is yellow and for another tagged “Irrelevant” is gray, this would be the appropriate palette definition:
palette = c("Relevant" = "yellow", "Irrelevant" = "gray")
+As promised, here’s the configuration resulting from aggregating all the previous steps:
+dv.papo::mod_patient_profile(
+ module_id = "papo",
+ subject_level_dataset_name = "adsl",
+ subjid_var = "USUBJID",
+ summary = list(
+ vars = c("SUBJID", "SITEID", "ARM", "TRTSDT", "TRTEDT", "AGE", "RACE", "SEX", "BMIBL"),
+ column_count = 3L
+ ),
+ listings = list(
+ "Concomitant Medication" = list(
+ dataset = "cm"
+ ),
+ "Adverse Events" = list(
+ dataset = "adae",
+ default_vars = c("ASTDT", "ASTDY", "AENDT", "AENDY", "AEDECOD", "AESEV")
+ )
+ ),
+ plots = list(
+ timeline_info = c(
+ trt_start_date = "TRTSDT",
+ trt_end_date = "TRTEDT"
+ ),
+ range_plots = list(
+ "Concomitant Medication" = list(
+ dataset = "cm",
+ vars = c(
+ start_date = "CMSTDT",
+ end_date = "CMENDT",
+ decode = "CMDECOD",
+ grading = "CMDECOD"
+ ),
+ tooltip = c()
+ ),
+ "Adverse Events" = list(
+ dataset = "adae",
+ vars = c(
+ start_date = "ASTDT",
+ end_date = "AENDT",
+ decode = "AEDECOD",
+ grading = "AESEV",
+ serious_ae = "AESER"
+ ),
+ tooltip = c(
+ "AE Start Day: " = "ASTDY",
+ "AE End Day: " = "AENDY"
+ )
+ )
+ ),
+ value_plots = list(
+ "Lab Values" = list(
+ dataset = "lb",
+ vars = c(
+ analysis_param = "PARAM",
+ analysis_val = "AVAL",
+ analysis_date = "ADT",
+ analysis_indicator = "LBNRIND",
+ range_low_limit = "A1LO",
+ range_high_limit = "A1HI"
+ ),
+ tooltip = c()
+ )
+ ),
+ vline_vars = c(
+ "Informed Consent Date" = "RFICDT"
+ )
+ )
+)
+a01-data_requirements.Rmd
Data sets and their variables to be used to display the patient profile must fulfill the conditions listed below:
+The accepted types for date variables are (Date
) or date-time (POSIXt
) but not plain character strings.
All datasets must provide a unique shared subject identifier variable.
The mandatory subject-level dataset should also provide variables for:
+All visit-dependent datasets used referred to by the range_plots
parameter should additionally provide variables for :
All visit-dependent datasets used referred to by the value_plots
parameter should additionally provide variables for :
a02-communication.Rmd
DaVinci modules can direct mod_patient_profile
to select and display information associated to any particular subject ID. When the Patient Profile is so instructed, it switches to the target subject ID and takes focus from the application, effectively jumping to a patient profile display as a result of a simple user interaction, such as a mouse click.
Examples of modules implementing that functionality are dv.clinlines
and several of the dv.biomarker.general
displays.
Configuring mod_patient_profile
to communicate with some other module usually involves setting up two parameters, one in each of the two modules participating in the exchange. On the receiver end, the sender_ids
parameter lists the identifiers of modules Patient Profile will listen to. On the sender side, the specifics may vary, so we will provide an example using the dv.clinlines
module.
This is a sketch of the portions of code relevant to establish communication between the Patient Profile and Clinical Timelines modules:
+
+module_list <- list(
+ "Patient Profiles" = dv.papo::mod_patient_profile(
+ module_id = "mod1",
+ ..., # ommitted for brevity
+ sender_ids = c("mod2")
+ ),
+ "Clinical Timelines" = dv.clinlines::mod_clinical_timelines(
+ module_id = "mod2",
+ ..., # ommitted for brevity
+ receiver_id = "mod1"
+ )
+)
Notice how Patient Profile can specify more than one module as the source of “jumping” messages.
+qc.Rmd
Date: 2024-Jul-21 09:22:39
+The following document generates a report for R packages, to satisfy the criteria of a “Released” status under the Non-GxP project. The QC report contains the following information:
+Please be advised that the QC report generated for this module does not imply validation according to any other GxP criteria. The QC report only satisfies our internally developed quality checks for non-GxP criteria. For clinical reporting purposes, it is essential to note that any outputs generated using this module must be checked and verified within a validated system that adheres to the appropriate GxP guidelines.
+In this traceability matrix only those tests that point to an specification are included.
+Test cases can contain several expectations a test is considered:
+passed if all expectations in the test pass.
failed if at least one expectation in the test fails.
skipped if at least one expectation in the test is skipped.
A test can be both failed and skipped.
+ + + + + + +#> ─ Session info ───────────────────────────────────────────────────────────────
+#> setting value
+#> version R version 4.3.2 (2023-10-31)
+#> os Ubuntu 22.04.4 LTS
+#> system x86_64, linux-gnu
+#> ui X11
+#> language en
+#> collate en_US.UTF-8
+#> ctype en_US.UTF-8
+#> tz Etc/UTC
+#> date 2024-07-21
+#> pandoc 2.9.2.1 @ /usr/bin/ (via rmarkdown)
+#>
+#> ─ Packages ───────────────────────────────────────────────────────────────────
+#> package * version date (UTC) lib source
+#> bslib 0.6.1 2023-11-28 [2] RSPM
+#> cachem 1.0.8 2023-05-01 [2] RSPM
+#> cli 3.6.2 2023-12-11 [2] RSPM
+#> crosstalk 1.2.1 2023-11-23 [2] RSPM
+#> desc 1.4.3 2023-12-10 [2] RSPM
+#> devtools 2.4.5 2022-10-11 [2] RSPM
+#> digest 0.6.34 2024-01-11 [2] RSPM
+#> DT 0.31 2023-12-09 [2] RSPM
+#> ellipsis 0.3.2 2021-04-29 [2] RSPM
+#> evaluate 0.23 2023-11-01 [2] RSPM
+#> fastmap 1.1.1 2023-02-24 [2] RSPM
+#> fs 1.6.3 2023-07-20 [2] RSPM
+#> glue 1.7.0 2024-01-09 [2] RSPM
+#> htmltools 0.5.7 2023-11-03 [2] RSPM
+#> htmlwidgets 1.6.4 2023-12-06 [2] RSPM
+#> httpuv 1.6.13 2023-12-06 [2] RSPM
+#> jquerylib 0.1.4 2021-04-26 [2] RSPM
+#> jsonlite 1.8.8 2023-12-04 [2] RSPM
+#> knitr 1.45 2023-10-30 [2] RSPM
+#> later 1.3.2 2023-12-06 [2] RSPM
+#> lifecycle 1.0.4 2023-11-07 [2] RSPM
+#> magrittr 2.0.3 2022-03-30 [2] RSPM
+#> memoise 2.0.1 2021-11-26 [2] RSPM
+#> mime 0.12 2021-09-28 [2] RSPM
+#> miniUI 0.1.1.1 2018-05-18 [2] RSPM
+#> pkgbuild 1.4.3 2023-12-10 [2] RSPM
+#> pkgdown 2.0.7 2022-12-14 [2] RSPM
+#> pkgload 1.3.3 2023-09-22 [2] RSPM
+#> profvis 0.3.8 2023-05-02 [2] RSPM
+#> promises 1.2.1 2023-08-10 [2] RSPM
+#> purrr 1.0.2 2023-08-10 [2] RSPM
+#> R6 2.5.1 2021-08-19 [2] RSPM
+#> ragg 1.2.7 2023-12-11 [2] RSPM
+#> Rcpp 1.0.12 2024-01-09 [2] RSPM
+#> remotes 2.4.2.1 2023-07-18 [2] RSPM
+#> rlang 1.1.3 2024-01-10 [2] RSPM
+#> rmarkdown 2.25 2023-09-18 [2] RSPM
+#> sass 0.4.8 2023-12-06 [2] RSPM
+#> sessioninfo 1.2.2 2021-12-06 [2] RSPM
+#> shiny 1.8.0 2023-11-17 [2] RSPM
+#> stringi 1.8.3 2023-12-11 [2] RSPM
+#> stringr 1.5.1 2023-11-14 [2] RSPM
+#> systemfonts 1.0.5 2023-10-09 [2] RSPM
+#> textshaping 0.3.7 2023-10-09 [2] RSPM
+#> urlchecker 1.0.1 2021-11-30 [2] RSPM
+#> usethis 2.2.2 2023-07-06 [2] RSPM
+#> vctrs 0.6.5 2023-12-01 [2] RSPM
+#> xfun 0.41 2023-11-01 [2] RSPM
+#> xtable 1.8-4 2019-04-21 [2] RSPM
+#> yaml 2.3.8 2023-12-11 [2] RSPM
+#>
+#> [1] /tmp/RtmpTo9cvV/temp_libpath37839ddfe56
+#> [2] /usr/local/lib/R/site-library
+#> [3] /usr/local/lib/R/library
+#>
+#> ──────────────────────────────────────────────────────────────────────────────
+