library(knitr) opts_chunk$set(echo = F, message = F, warning = F, fig.width = 12, fig.align="center")
library(haven) library(data.table) library(dplyr) library(htmltools) library(ggplot2)
AEf <- system.file("data/ADAE.sas7bdat", package = "pprofile") CMf <- system.file("data/ADCM.sas7bdat", package = "pprofile") SLf <- system.file("data/ADSL.sas7bdat", package = "pprofile") LBf <- system.file("data/ADLB.sas7bdat", package = "pprofile") EGf <- system.file("data/ADEG.sas7bdat", package = "pprofile") EXf <- system.file("data/ADEX.sas7bdat", package = "pprofile") PKf <- system.file("data/ADPC.sas7bdat", package = "pprofile") AE <- read_sas(AEf) CM <- read_sas(CMf) SL <- read_sas(SLf) LB <- read_sas(LBf) EG <- read_sas(EGf) EX <- read_sas(EXf) PK <- read_sas(PKf)
The patient profile only requires subject level data (ADSL). But new visualization (submodules) become accessible when additional datasets are loaded.
Here is a description of the UI and the currently available submodules, along with their data requirements.
The landing page of the patient profile contains the patient selector, a quick summary of the demographics & treatment information for the subject and a tabular overview of the available data.
If adverse events (ADAE) and concomitatn medications (ADCM) are available, the AE + CM visualization is enabled. The plot displays the time ordered concomitant medications, administration dates and duration, along with Adverse Event information and duration also ordered by time.
uid = "CXXX999Y9999_1000003" aecm_list <- pprofile:::get_aecm_data(uid = uid, ADSL = SL, ADAE = AE, ADCM = CM) pprofile:::plot_aecm(aecm_list = aecm_list, aecolour = "action")
Concomitant medications are drawn in purple. AEs can be colored by severity, grade, or action taken using the dropdown menu:
The treatment period is highlighted with a green background.
This plot is particularly useful to investigate whether an observed AE is due to the drug under study or due to other medication.
When Lab values (ADLB), Exposure (ADEX) and PK data (ADPC) are available, the “Exposure + Labs” tab is enabled. It provide the key liver toxicity markers and dose administration record and calculated exposure information. The lab values are normalized to the upper limits of normality such that they may all be displayed on the same graph. The lower graph shows each dosing of the active compound and key PK exposure information.
paramcd <- c('ALP', 'ALT', 'AST', 'BILI') pprofile:::plot_EXLB(uid = uid, ADLB = LB, ADSL = SL, ADEX = EX, ADPC = PK, paramcd = paramcd)
If Lab values are given (ADLB), the module displays an overview of the parameters that were collected for the participant and will highlight values that are above or below the normal range.
labvis <- pprofile:::get_lab_values(uid = uid, ADLB = LB) pprofile:::plot_lab_visits(labvis)
The lab overview can be used to quickly scan all available lab data for anomalies. Once a parameter or timepoint of interest has been identified, it can be further investigated using the Lab Parameters tab.
Always loaded along the Lab Visits, the Lab Parameters plot shows lab values over time for the selected parameters. Upper Normal Limit (UNL) and Lower Normal Limit (LNL) are displayed in red dashed lines.
ply <- pprofile:::plotly_lab_param(uid, c("ALT", "AST", "ALP", "BILI"), ADLB = LB) tagList(list(ply))
Parameters can be added or removed using a dropdown.
If Electrocardiogram data (ADEG), Exposure (ADEX) and PK (ADPC) are passed, the Exposure & ECG tab will display the relationship among expose, ECG and dosing information.
pprofile:::plot_EXEG(uid, param = "HRMEAN", ADSL = SL, ADEX = EX, ADEG = EG, ADPC = PK)
The ECG parameters to display are selected from a subject specific dropdown of all available parameters.
With Electrocardiogram data (ADEG) alone, the ECG submodule becomes available, without exposure information.
pprofile:::plot_ECG(uid, param = "HRMEAN", ADEG = EG)[["plot"]]
If PK data (ADPC) is available, the PK module is enabled, providing the dosing concentration over time, colored by analysis visit.
pprofile:::plot_PK(uid, param = "Marker1 plasma concentrations (ng/ml)", ADPC = PK)[["plot"]]
PK parameter to display can be selected from a dropdown.
If you like what you see and would like to build an app for your data that includes the patient profile or add the module to an existing app, follow the documentation in patprofile for developers tab.
You can also contact the SCC for information about the module or collaboration for app development.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.