Skip to content

Data Guidelines

Spencer Childress edited this page Apr 9, 2019 · 17 revisions

The Safety Histogram accepts JSON data of the format returned by d3.csv(). The renderer visualizes clinical medical signs data with one row per measurement plus the required variables specified below.

Data structure

one record per measurement

Data specification

required and optional variables:

Setting Default Data Type Description Required?
measure_col TEST character a variable that contains the names of each medical sign Yes
value_col STRESN numeric a variable that contains the results for each medical sign; non-numeric results are removed with a notification thrown to the log Yes
id_col USUBJID character a variable that contains IDs for each participant
unit_col STRESU character a variable that contains the units of each medical sign
normal_col_low STNRLO numeric a variable that contains the lower limit of normal of the medical sign
normal_col_high STNRHI numeric a variable that contains the upper limit of normal of the medical sign
filters[] either an array of variables and metadata that will appear in the controls as data filters
details[] either an array of variables and metadata that will appear in the data listing

Customized Chart with Queries

The following data specs and chart settings can be used to create a chart with several custom filters, including Sex, Race and Query Status. A sample chart using this configuration is found here.

Data Specification

Settings Variable Variable Default Required?
id_col Participant ID USUBJID Y
measure_col Measure TEST Y
value_col Value STRESN Y
unit_col Unit STRESU
normal_col_low Normal Range - Low STRNLO
normal_col_high Normal Range - High STRNHI
filter Visit VISIT Y
filter Site ID SITEID Y
filter Treatment Arm ARM Y
filter Sex SEX Y
filter Race RACE Y
filter Query Flag ("Y" for yes) QUERYFL Y
details Query Details QUERYDETAILS Y

Settings Object

  {filters:
                [   {value_col: 'VISIT',    label: 'Visit'},
                ,   {value_col: 'ARM', label: 'Arm'}
                ,   {value_col: 'SITEID', label: 'Site ID'}
                ,   {value_col: 'SEX', label: 'Sex'}
                ,   {value_col: 'RACE', label: 'Race'}
                ,   {value_col: 'QUERYFL', label: 'Open Query?'}]
            ,details: [
                {value_col: 'USUBJID'     , label: 'Subject ID'},
                {value_col: 'SITEID'      , label: 'Site ID' },
                {value_col: 'SEX'         , label: 'Sex'    },
                {value_col: 'RACE'        , label: 'Race'   },
                {value_col: 'VISIT'       , label: 'Visit'  },
                {value_col: 'DY'          , label: 'Study Day' },    
                {value_col: 'STNRLO'      , label: 'LLN' },
                {value_col: 'STRESN'      , label: 'Result'}, 
                {value_col: 'STNRHI'      , label: 'ULN' },
                {value_col: 'STRESU'      , label: 'Units' },
                {value_col: 'QUERYDETAILS', label: 'Query Details'}]
            }
Clone this wiki locally