-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
382 lines (374 loc) · 23.7 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(markdown)
library(shinydashboard)
library(plotly)
library(gt)
source('../site/run.R')
shinyUI(fluidPage(tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "style.css")
),
title = "PEDSnet DQA Dashboard",
# Application Title
navbarPage(dashboardHeader(title=span(img(src="logo.svg", height=32,width=34,
style = "padding-top:0px; padding-bottom:4px;"),
"PEDSnet DQA Dashboard",
style = "font-family: Trebuchet MS; color: white; font-size: 200%")),
tabPanel(title="Home", icon=icon("home"),
sidebarLayout(
sidebarPanel(
tags$h4("Welcome to the PEDSnet Data Quality Dashboard!"),
tags$h6("Report Refresh Date:", Sys.Date()),
tags$h6("Current Database Version:", config('db_current')),
radioButtons(inputId="largen_toggle",
label="Display Type",
choices=list('Individual Sites'=1,
'Summary Metrics'=2),
selected=1),
tags$p("Selecting Individual Sites will display the default dashboard, where each site is displayed individually and against each other site. Selecting Summary Metrics will modify the visualizations to compare each site against overall metrics across the other sites. This option is helpful to de-clutter if there are a large number of sites."),
tags$p("Contact pedsnetdcc@chop.edu for more information")
),
mainPanel(
tags$p("The PEDSnet Data Quality Dashboard (PQD) provides output from the data quality program developed and maintained
by the PEDSnet Data Quality team."),
tags$p("The PQD is displayed by check type. A check type is a category of checks that can be
executed across a wide variety of fields, domains, tables, or other applications.
Below are descriptions of each check type."),
DT::dataTableOutput("dt_descriptions")
))),
navbarMenu(title="Check Type", icon=icon("chart-area"),
tabPanel("Data Cycle Changes (DC)",
sidebarLayout(
sidebarPanel(
selectInput(inputId="sitename_dc",
label="Institution",
choices = NULL),
# only show comparison option for overall metrics
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_dc_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
),
selectInput(inputId = "dc_domain",
label="Domain",
choices = c('adt')), # set a default to avoid empty string detection
checkboxGroupInput(inputId="dc_subdomain",
label="Specific Check",
choices=NULL)),
# Begin main
mainPanel(
fluidRow(
# DC changes - site comparison
box(title="Overall Data Cycle Changes",
plotlyOutput("dc_overall", height=500, width=1000)),
box(title="Domain-Specific Data Cycle Changes (Records)",width=12,
plotOutput("dc_domain_split")),
box(title="Domain-Specific Data Cycle Changes (Persons)",width=12,
plotOutput("dc_domain_split_persons")),
box(title="Mapping Abbreviations and Descriptions", width=12,
DT::dataTableOutput("dc_mappings"))
)#fluidRow
)#mainPanel
)#sidebarlayout
),#tabpanel for changes between data cycles
tabPanel("Valueset Conformance",
sidebarLayout(
sidebarPanel(
selectInput(inputId = "sitename_vs_conf",
label = "Institution",
choices = NULL),
# only show comparison option for overall metrics
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_vs_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
)),
# Begin main
mainPanel(
fluidRow(
p("Note that sites only show up if there is at least one violation"),
box(title="Valueset Violations Plot", width=12, plotlyOutput("vs_plot")),
box(title="Violations Listings", width=12, DT::dataTableOutput("vs_table"))
)
)
)),
tabPanel("Vocabulary Conformance",
sidebarLayout(
sidebarPanel(
selectInput(inputId="sitename_vc_conf",
label="Institution",
choices=NULL),
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_vc_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
)),
mainPanel(
fluidRow(p("Note: Proportions are of the total rows in the table. Proportions that do not add up to 1 for the given column indicate missing values."),
box(title="Overall Vocabularies",
plotlyOutput("vc_overall_plot", height=500, width=1000))),
fluidRow(
column(
width=12,
align='left',
tabBox(width='100%',
tabPanel("Vocabulary Conformance Violations Plot", plotlyOutput("vc_plot")),
tabPanel("Violations Listings", DT::dataTableOutput("vc_table")),
tabPanel("Acceptable Vocabularies",
DT::dataTableOutput("vc_vocabs")))
)#column
)#fluidrow
)#mainpanel
)#sidebarlayout
),#tabpanel
tabPanel("Unmapped Concepts",
sidebarLayout(
sidebarPanel(
selectInput(inputId = "sitename_uc",
label = "Institution",
choices = NULL),
# only show comparison option for overall metrics
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_uc_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
),
sliderInput("date_uc_range",
label="Date Range",
min=1990L,
max=as.integer(format(Sys.Date(), "%Y")),
value=c(2010L,2022L),
step=1L,
sep="")
),
# Begin main
mainPanel(
fluidRow(
h2("Unmapped Concepts Overall"),
# Unmapped Concepts Proportions
tabBox(
tabPanel("Unmapped Concepts Plot",
plotOutput("uc_overall_plot",height=600,width=1000)),
tabPanel("Top Unmapped Source Values",
h6("Top 10 unmapped source values per column per site"),
p("proportion_of_unmapped is the count of the given source value divided by the number of unmapped rows for that column. Not displayed for Summary Metrics total"),
DT::dataTableOutput("uc_top_tbl", width=1000)))),
fluidRow(box(title="Unmapped Concepts by Year", width=12,
plotOutput("uc_yr_plot", height=600)))
)#mainpanel
)#sidebarlayout
),
tabPanel("Person Facts/Records",
sidebarLayout(
sidebarPanel(
selectInput(inputId = "sitename_pf",
label = "Institution",
choices = NULL),
# only show comparison option for overall metrics
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_pf_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
)),
# Begin main
mainPanel(
fluidRow(
# Person facts/records overall
box(title="Person Facts/Records Overall", width=12,
plotlyOutput("pf_overall_heat_plot", height=750)),
box(title="Mapping Abbreviations and Descriptions", width=12,
DT::dataTableOutput("pf_mappings")),
# Person facts/records by site
box(title="Person Facts/Records By Site", width=12,
plotOutput("pf_overall_bysite_plot", height=1000))
)#fluidrow
)#mainpanel
)#sidebarlayout
),#tabpanel
tabPanel("Best Mapped Concepts",
sidebarLayout(
sidebarPanel(
selectInput(inputId = "sitename_bmc",
label = "Institution",
choices = NULL),
checkboxGroupInput(inputId="bmc_check",
label="Specific Check",
choices=NULL),
# only show comparison option for overall metrics
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_bmc_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
)),
mainPanel(
fluidRow(
# RxNorm
box(title="Best Mapped Concept Proportions",
#plotlyOutput("bmc_rxnorm_overall_plot"))
plotlyOutput("bmc_overall_plot", height=500, width=1000)),
tabBox(width=12,
tabPanel("Concepts Considered Best",
"For each of the checks in the table below, the concepts listed are considered the best level to map to",
DT::dataTableOutput("bmc_conceptset_best")),
tabPanel("Concepts Considered Not-Best",
"For each of the checks in the table below, the concepts listed are considered less than ideal levels to map to",
DT::dataTableOutput("bmc_conceptset_notbest")),
tabPanel("Top 5 Not-Best-Mapped",
"For each site, the top 5 not-best-mapped concepts per check is displayed below",
DT::dataTableOutput("bmc_pp_top_nonbest")))
)#fluidrow
)#mainpanel
)#sidebarlayout
),
tabPanel("Facts Over Time",
sidebarLayout(
sidebarPanel(
dateInput("date_fot_min", label="Minimum Date", value="2010-01-01"),
dateInput("date_fot_max", label="Maximum Date"),
selectInput(inputId = "fot_domain",
label="Choose Domain for Summary and Site-Specific Plots",
choices = NULL),
wellPanel(
strong(helpText("Summary Plot")),
selectInput(inputId='fot_subdomain_overall',
label='Summary Plots: Specific Check',
choices=NULL)),
wellPanel(
strong(helpText("Site Specific")),
selectInput(inputId = "sitename_fot",
label = "Select Site",
choices =NULL),
checkboxGroupInput(inputId="fot_subdomain_site",
label="Site Specific Plots: Specific Check",
choices=NULL),
selectInput(inputId="fot_bounds",
label="SD Bounds Option",
choices=c('No Bounds',
1,
2,
3)))),
# Begin main
mainPanel(
fluidRow(
#summary
box(title="Summary Plot",width=12,
plotlyOutput("fot_summary_plot")),
box(title="Site Specific Facts Over Time",width=12,
#plotlyOutput("fot_plot"))
uiOutput("fot_plot"))
)#fluidRow
)#mainPanel
)#sidebarlayout
),#tab panel fot
tabPanel("Domain Concordance",
sidebarLayout(
sidebarPanel(
selectInput(inputId = "sitename_dcon",
label = "Select Site",
choices = NULL),
# only show comparison option for overall metrics
conditionalPanel(
condition="input.largen_toggle == 2",
radioButtons(inputId="comp_dcon_ln",
label="Comparison Type",
choices=list("Across Sites"=1,
"None"=0))
),
conditionalPanel(
condition="input.largen_toggle == 1 || input.comp_dcon_ln ==0",
selectInput(inputId = "denom_dcon",
label = "Select Denominator",
choices = c("Overall",
"Cohort 1",
"Cohort 2"))),
checkboxGroupInput(inputId="dcon_check",
label="Specific Check",
choices=NULL)),
# Begin main
mainPanel(
fluidRow(
# description of cohorts
box(title="Cohort Descriptions", width=12,
DT::dataTableOutput("dcon_cohort_descr")),
#plots
box(title="Domain Concordance Overall",width=12,
plotlyOutput("dcon_overall_plot"))
)#fluidRow
)#mainPanel
)#sidebarlayout
),#tab panel fot
tabPanel("Facts with Associated Visit ID",
sidebarLayout(
sidebarPanel(
selectInput(inputId="sitename_mf_visitid",
label="PEDSnet Institution",
choices = NULL),
checkboxGroupInput(inputId = "mf_visitid_domain",
label="Choose Domain/s",
choices = NULL)),
# Begin main
mainPanel(
fluidRow(
box(title="Facts with Missing visit_occurrence_id", width=12,
plotOutput("mf_visitid_overall")),
box(title="Facts with Missing visit_occurrence_id", width=12,
plotOutput("mf_visitid_bysite"))
)#fluidRow
)#mainPanel
)#sidebarlayout
),
tabPanel("Expected Concepts Present",
sidebarLayout(
sidebarPanel(
selectInput(inputId="sitename_ecp",
label="PEDSnet Institution",
choices = NULL),
checkboxGroupInput(inputId="ecp_check",
label="Concept Group",
choices=NULL)),
# Begin main
mainPanel(
fluidRow(
box(title="Overall Expected Concepts Present",
width=12,
plotlyOutput("ecp_plot", height=600)),
box(title="Site-Specific Expected Concepts Present",
width=12,
plotOutput("ecp_plot_site"))
)#fluidRow
)#mainPanel
)#sidebarpanel
)#tabpanel for ecp
)#,#navbarmenu
# tabPanel(title="SSDQA Issues", icon=icon("square-check"),
# sidebarLayout(
# sidebarPanel(
# selectInput(inputId = "ssdqa_domain",
# label = "Select Domain",
# choices = NULL)
# ),
# mainPanel(
# DT::DTOutput("ssdqa_issues_table")
# )))
)#navbarpage
)#fluidpage
)#shinyUI