forked from bitowaqr/dcea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_elements.R
231 lines (213 loc) · 8 KB
/
ui_elements.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
# UI utility function to create and update tooltips -----
tip = function(str = "Atkinson inequality aversion", tip = "", tipId = "x" ,sup = "<i class=\"fa fa-question-circle\"></i>", class = "tip-div" ){
HTML(paste0("<span class=\"",class,"\" id='",tipId,"' data-bs-toggle=\"tooltip\" data-bs-placement=\"top\" title='",tip,"'>",str,"<sup class='sup-tip'>",sup,"</sup></span>"))
}
updateTip = function(id, tip){
runjs(paste0("document.querySelector('#",id,"').setAttribute('data-bs-original-title', '",tip,"');"))
}
# about UI modal dialog window -----
aboutUi <- function() {
showModal(modalDialog(
size = "l",
fade = T,
title = "About",
div(
div(
h4("About this application"),
HTML(
"<p>
This application was developed by James Love-Koh and Richard Cookson, Centre for
Health Economics, University of York, and Paul Schneider, University of Sheffield, with advisory input from Susan Griffin, Rita Faria
and Fan Yang. The NICE Project Leads were Lesley Owen and Monica Desai.
</p>
"
),
br(),
),
div(
h4("Acknowledgements"),
HTML(
"<p>For their helpful and detailed feedback on the draft calculator we would like to
thank Deborah O’Callaghan, James Lomas, Mike Paulden and the many NICE officials, advisers
and committee members that we consulted during development.</p>"
),
br(),
),
div(
h4("Funding statement"),
HTML(
"<p>Financial support for this project was provided by the National Institute for Health and Care Excellence (NICE) and the Wellcome Trust.
All errors and opinions represented in the application are entirely those of development team and
do not reflect those of NICE, the Wellcome Trust or the University of York.</p>"
),
br(),
),
div(
h4("Legal disclaimer"),
HTML(
"<p>
The authors make no representations or warranties of any kind with respect to the
information, graphics and outputs available on this site.
</p>
<p>
© University of York. We are happy for you to use this tool for educational or research purposes so long as you acknowledge the authors.
A suggested citation is:
</p>
<p>
Love-Koh, J, Schneider, P, and Cookson, R. (2022). York health equity impact calculator. University of York (https://shiny.york.ac.uk/dceasimple).
</p>
"
),
br()
)
),
easyClose = TRUE,
footer = div(modalButton("Close"), class = "border rounded-3")
))
}
referencesUi <- function() {
showModal(
modalDialog(
size = "l",
fade = T,
title = "Key references",
div(
tags$div(
HTML(
"<p>Below is a list of publications that detail some of the concepts
and methods that have been used to build this calculator.</p>"
)
),
br(),
h4("Overview of economic evaluation and equity concepts"),
HTML(
"<p>Cookson, R., Griffin, S., Norheim, O.F., Culyer, A.J.,
Chalkidou, K., 2020. Distributional Cost-Effectiveness Analysis
Comes of Age. Value in Health, 24(1), 118-120.
"
),
tags$a(href = "https://doi.org/10.1016/j.jval.2020.10.001", "[Link]", target =
"_blank"),
HTML("</p>"),
HTML(
"<p>Cookson, R., Griffin, S., Norheim O.F., Culyer, A.J. (Eds), 2021.
Distributional cost-effectiveness analysis: quantifying health equity
impacts and trade-offs. Oxford University Press.
"
),
tags$a(href = "https://www.york.ac.uk/che/publications/books/handbook-dcea/", "[Link]", target =
"_blank"),
HTML("</p>"),
h4("Distributional cost-effectiveness using aggregate data"),
HTML(
"<p>Griffin, S., Love-Koh, J., Pennington, B., Owen, L., 2019.
Evaluation of Intervention Impact on Health Inequality for
Resource Allocation. Medical Decision Making, 39(3), 172–181.
"
),
tags$a(href = "https://doi.org/10.1177/0272989X19829726", "[Link]", target =
"_blank"),
HTML("</p>"),
HTML(
"<p>Love-Koh, J., Cookson, R., Gutacker, N., Patton, T., Griffin, S.,
2019. Aggregate Distributional Cost-Effectiveness Analysis of Health
Technologies. Value in Health, 22(5), 518–526.
"
),
tags$a(href = "https://doi.org/10.1016/j.jval.2019.03.006", "[Link]", target =
"_blank"),
HTML("</p>"),
h4("Distribution of health opportunity costs of NHS expenditure"),
HTML(
"<p>Love-Koh, J., Cookson, R., Claxton, K., Griffin, S., 2020.
Estimating Social Variation in the Health Effects of Changes in Health
Care Expenditure. Medical Decision Making, 40(2), 170–182.
"
),
tags$a(href = "https://doi.org/10.1177/0272989X20904360", "[Link]", target =
"_blank"),
HTML("</p>"),
h4("Baseline levels of health inequality"),
HTML(
"<p>Love-Koh, J., Asaria, M., Cookson, R., Griffin, S., 2015.
The Social Distribution of Health: Estimating Quality-Adjusted Life
Expectancy in England. Value in Health, 18(5), 655–662.
"
),
tags$a(href = "https://doi.org/10.1016/j.jval.2015.03.1784", "[Link]", target =
"_blank"),
HTML("</p>"),
h4("The inequality staircase effects of health interventions"),
HTML(
"<p>Tugwell, P., de Savigny, D., Hawker, G., Robinson, V., 2006.
Applying clinical epidemiological methods to health equity: the
equity effectiveness loop. BMJ 332, 358–61.
"
),
tags$a(href = "https://doi.org/10.1136/bmj.332.7537.358", "[Link]", target =
"_blank"),
HTML("</p>"),
br(),
br()
),
easyClose = TRUE,
footer = div(modalButton("Close"), class = "border rounded-3")
)
)
}
tutorialUi <- function(){
showModal(modalDialog(
title = "Tutorial",size = "l",
tags$iframe(width="560", height="315",src="https://www.youtube.com/embed/ScMzIvxBSi4",title="YouTube video player",frameborder="0"),
easyClose = TRUE,
footer = div(modalButton("Close"),class="border rounded-3")
))
}
loadingScreenUi = function(){
div(
id="landing-div",
style = "position: absolute; top:0; bottom:0; left:0; right:0; z-index: 1900;",
class= "bg-dark",
div(
style = "height:100vh; width: 100vw; position: relative;",
class = "d-flex flex-column",
progress_circle(
value = 0,
shiny_id = "progress-circle",
color = "var(--primary)",
stroke_width = 5,
trail_color = "transparent",
duration = 3000,
text_color = "white",
width = "75vw",
height = "65vh",
easing = "easeOut",
),
div(
class="my-auto mx-auto text-center",
style = "z-index: 2500;",
div(
class="text-white display-2",
style ="text-shadow: 2px 2px #222d32;",
"Health Equity Impact Calculator",
),
div(
class="text-white display-5 py-3",
style ="text-shadow: 2px 2px #222d32;",
HTML("James Love-Koh, Paul Schneider <br>& Richard Cookson"),
),
div(
class="d-flex flex-row justify-content-center align-items-center",
div(
class="cell ms-auto",
tags$img(class ="image", src="york_logo.png"),
),
div(
class="me-auto",
tags$img(class ="", src="wellcome.png", width = "150px"),
),
),
),
)
)
}