Configuration - SafetyGraphics/hep-explorer GitHub Wiki
The most straightforward way to customize the Safety Outlier Explorer is by using a configuration object whose properties describe the behavior and appearance of the chart. Since the safety eDish is a Webcharts chart
object, many default Webcharts settings are set in the defaultSettings.js file as described below. Refer to the Webcharts documentation for more details on these settings.
In addition to the standard Webcharts settings several custom settings not available in the base Webcharts library have been added to facilitate data mapping and other custom functionality. These custom settings are described in detail below. All defaults can be overwritten by users.
string
Unique subject identifier variable name
default: "USUBJID"
string
result variable name
default: "STRESN"
string
measure variable name
default: "TEST"
string
measure unit variable name
default: "STRESU"
string
LLN variable name
default: "STNRLO"
string
ULN variable name
default: "STNRHI"
string
Study day variable name
default: "DY"
string
Visit variable name
default: null
string
Visit number variable name
default: null
string
Exposure start day variable name. Note: setting is ignored if exposure data domain is not provided.
default: 'EXSTDY'
string
Exposure end day variable name. Note: setting is ignored if exposure data domain is not provided.
default: 'EXENDY'
string
Exposure treatment name variable name. Note: setting is ignored if exposure data domain is not provided.
default: 'EXTRT'
string
Exposure dose variable name. Note: setting is ignored if exposure data domain is not provided.
default: 'EXDOSE'
string
Exposure dose variable name. Note: setting is ignored if exposure data domain is not provided.
default: 'EXDOSU'
object
Object defining the baseline visit of the study.
string
Column containing the baseline visit data
default: "DY"
array
One or more values found in settings.baseline.value_col
indicating that the record represents the baseline visit.
default: [0]
array
an array of filter variables and associated metadata
default: none
string
Variable name
default: none
string
Variable label
default: none
boolean
If true
filters are set up to allow multiple selections.
default: true
array
an array of ID-level variables and associated metadata
default: Automatically uses values specified in settings.id_col
, settings.group_cols
and
settings.filters
string
Variable name
default: Automatically uses values specified in settings.id_col
, settings.group_cols
and
settings.filters
string
Variable label
default: Automatically uses values specified in settings.id_col
, settings.group_cols
and
settings.filters
array
an array of grouping variables and associated metadata
default: none
string
Variable name
default: none
string
Variable label
default: none
object
Flags records for use in the eDish and mDish calculations.
default: none
string
Indicates which column should be used to flag rows for inclusion eDish and mDish analysis
default: none
array
or string
Indicates which values should be used to flag rows for inclusion eDish and mDish analysis
default: none
object
Indicates whether PALT should be calculated.
default: none
object
** Removed in v1.4.2 **
Flags records for use in the PALT calculations. Only used if settings.calculate_palt
is true
.
default: none
string
** Removed in v1.4.2 **
Indicates which column should be used to flag rows for PALT analysis.
default: none
array
or string
** Removed in v1.4.2 **
Indicates which values should be used to flag rows for for PALT analysis.
default: none
object
An object defining the data values from measure_col
for the lab measures used in eDish evaluations.
default:
{
ALT: 'Aminotransferase, alanine (ALT)',
AST: 'Aminotransferase, aspartate (AST)',
TB: 'Total Bilirubin',
ALP: 'Alkaline phosphatase (ALP)'
},
boolean
If true
, all unique values from settings.measure_col
are automatically added to the settings.measure_values
object. Can be paired with the "all"
option for settings.x_options
, settings.y_options
and settings.point_size_options
to allow for flexible interactive axis controls using all available data. Added in v1.2.
default: false
array
or string
Specifies variable options for the x-axis using the key values from settings.measure_values
(e.g. "ALT"). When multiple options are specified, a control allowing the user to interactively change the x variable is shown. Specifying 'all'
(added in v1.2) uses all options from measure_values
.
default: 'all'
string
String indicating the starting value for the x-axis when the chart is loaded. Must be an option from the settings.x_options
array. First item in the settings.x_options
array is used if an invalid option is specified.
default: 'ALT'
array
or string
See settings.x_options
.
default: ['TB']
string
See settings.x_default
.
default: 'TB'
array
or string
See settings.x_options
. For point size, options for 'Uniform' (the default) and 'rRatio' are automatically added to the control in addition to the users selections.
default: 'all'
string
See settings.x_default
.
default: "Uniform"
array
of string
Specifies how data should be imputed for each measure specified in config.measure_values
. Valid options are:
-
"data-driven"
is the default and it takes 0 values and sets them to 0.5 times the minimum value for the measure across all participants/time points -
"user-defined"
takes all values less thanconfig[key].imputation_value
and sets then to 0.5 timesconfig[key].imputation_value
. (Theconfig.imputation_value
option is ignored otherwise) -
"drop"
means all 0 values are dropped.
default:
{
ALT: 'data-driven',
AST: 'data-driven',
TB: 'data-driven',
ALP: 'data-driven'
}
number
used as described above when config.imputation_method
is set to "user-defined"
default: none
object
Object defining default cut-points for each measure defined in config.measure_values
for each of the different types of supported eDish displays defined in config.display
. If config.measure_values
is customized to add additional key measures, then values from cuts.defaults
are used unless the user provides values using the format shown below.
default:
{
TB: {
relative_baseline: 4.8,
relative_uln: 2
},
ALP: {
relative_baseline: 3.8,
relative_uln: 1
}
}
object
Default cut values to be used when no user settings are provided. Added in v1.2.
default:
{
relative_baseline: 3.8,
relative_uln: 3
}
"string"
Defines the display type used on the eDish scatter plot on initial view. Can be changed by the user once the chart is rendered. Valid options are:
-
"relative_uln"
which shows the standard eDish view where values are scaled relative to the Upper Limit or Normal -
"relative_baseline"
which shows the mDish view where values are scaled relative to the participants baseline value
Note: Support for an "absolute"
option used to show the raw values for the measure was removed prior to the v1 release.
array
Defines nice labels for the different display options.
default:
display_options: [
{ label: 'Upper limit of normal adjusted (eDish)', value: 'relative_uln' },
{ label: 'Baseline adjusted (mDish)', value: 'relative_baseline' }
]
array
of number
Sets upper and lower percentiles used for defining outlier in the "Lab Summary Table" in the participant details section.
default: [0.01,0.99]
string
URL linking to additional charts related to population level analysis
default: none
string
URL linking to additional charts related to population level analysis. Will need an update in a future release to allow dynamic links for different participants.
default: none
number
Default visit window used to highlight eDish points where x and y measures occurred within the specified number of days. Editable by user after render.
default: 30
boolean
Specifies whether the R Ratio filter should be shown. R ratio is defined as: (ALT value/ULN for ALT) / (ALP value/ULN for ALP).
default: true
numeric
Default cut point for R Ratio filter. Ignored when r_ratio_filter
is false
. User can update this setting via the UI when r_ratio_filter
is true
.
default: 0
character
Title to be drawn above the controls. Use an empty string or NULL
if no title is desired.
default: "Hepatic Safety Explorer"
string
Informational text to be displayed near the top of the controls (beneath the title, if any). No warning is displayed if warningText
is false-y.
default: 'Caution: This interactive graphic is not validated. Any clinical recommendations based on this tool should be confirmed using your organizations standard operating procedures.'
The object below contains the default Webcharts settings for the display.
x: {
column: null, //set in onPreprocess/updateAxisSettings
label: null, // set in onPreprocess/updateAxisSettings,
type: 'linear',
behavior: 'raw',
format: '.2f'
//domain: [0, null]
},
y: {
column: null, // set in onPreprocess/updateAxisSettings,
label: null, // set in onPreprocess/updateAxisSettings,
type: 'linear',
behavior: 'raw',
format: '.2f'
//domain: [0, null]
},
marks: [
{
per: [], // set in syncSettings()
type: 'circle',
summarizeY: 'mean',
summarizeX: 'mean',
attributes: { 'fill-opacity': 0 }
}
],
gridlines: 'xy',
color_by: null, //set in syncSettings
max_width: 900,
aspect: 1,
legend: { location: 'top' },
margin: { right: 25, top: 25, bottom: 75 }