-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmake-table-pico.html
More file actions
280 lines (245 loc) · 14.8 KB
/
make-table-pico.html
File metadata and controls
280 lines (245 loc) · 14.8 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PubMed xml to table PICO</title>
<link rel="stylesheet" href="/openmetaanalysis.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script>
//http://www.alexhadik.com/blog/2014/6/12/create-pubmed-citations-automatically-using-pubmed-api
//http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=25164756&retmode=json
//http://api.jquery.com/jquery.getjson/
///Not used:
//http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2904758/
var citation_bias = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><br><included><br>';
$(document).ready(function(){
$("#submitbutton").on("click", function(){
//disable the button to prevent multiple clicks
$("#submitbutton").prop( "disabled", true );
$("#status").html("<i>searching...</i>")
//Get list of IDs based on search terms
$.getJSON('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmode=json',{
term : $("#input").val(),
format: "json"
})
.done(function(data){
var ids = data.esearchresult.idlist;
var publications = [];
iterateJSON(ids, publications);
$("#submitbutton").prop( "disabled", false );
});
$("#hints").show()
});
$(".type").on("click", function(){
$("#labels").show()
if ($("#type_intervention").is(":checked")){
$("#box0label").html('Enter study design')
$("#box0").attr("placeholder", "Enter randomized controlled trial?")
$("#box1label").html('Patients')
$("#box1").attr("placeholder", "Enter the condition being studied")
$("#box2label").html('Intervention')
$("#box2").attr("placeholder", "Enter the intervention being studied")
$("#box3label").html('Comparison')
$("#box3").attr("placeholder", "Enter placebo?")
$("#box4label").html('Outcome')
$("#box4").attr("placeholder", "Enter the primary outcome being studied (your can add secondaires later)")
}
if ($("#type_diagnosis").is(":checked")){
$("#box0label").html('Enter study design')
$("#box0").attr("placeholder", "Enter cross sectional study (be careful of case-control)?")
$("#box1label").html('Patients')
$("#box1").attr("placeholder", "Enter sndrome or condition being studied")
$("#box2label").html('Index test')
$("#box2").attr("placeholder", "Enter the index test (test/symptom/sign) being studied")
$("#box3label").html('Reference test')
$("#box3").attr("placeholder", "Enter the reference ('gold standard') test")
$("#box4label").html('Flow and timing')
$("#box4").attr("placeholder", "Enter something like 'index preceded reference test by x to x days'")
}
});
function iterateJSON(idlist, publications) {
var id = idlist.pop();
// test with http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=11850928,11482001&format=json
$.getJSON('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id='+id+'&retmode=json',
function(summary){
var citation = "<span style='color:red;font-weight:bold'><!-- start of a new study --><br>";
//for(author in summary.result[id].authors){
// citation+=summary.result[id].authors[author].name+', ';
//}
//citation+=' \"'+summary.result[id].title+'\" <i>'+summary.result[id].fulljournalname+'</i> '+summary.result[id].volume+'.'+summary.result[id].issue+' ('+summary.result[id].pubdate+'): '+summary.result[id].pages+'.';
var studyname = summary.result[id].authors[0].name;
studyname = studyname.substring(0, studyname.indexOf(" "));
var pubyear = summary.result[id].pubdate
if (pubyear.indexOf(" ") > 1){
pubyear = pubyear.substring(0, pubyear.indexOf(" "));
}
citation+= "<study><br><citation year=\"" + pubyear + "\" pmid=\"" + summary.result[id].uid + '\" trialregistration=\"\" journal_abbrev=\"' + summary.result[id].source + '\">' + studyname + "</citation></span><br>"
if ($("#type_intervention").is(":checked")){
citation+= String.fromCharCode(9) + " <design><span style='background-color:yellow'>" + $("#box0").val() + "</span></design><br>"
citation+= String.fromCharCode(9) + " <patients total=\"<span style='background-color:yellow'>__</span>\"><br>"
citation+= String.fromCharCode(9) + " <description><span style='background-color:yellow'>" + $("#box1").val() + "</span></description><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Mean age __ months</span></bullet><br>"
citation+= String.fromCharCode(9) + " </patients><br>"
citation+= String.fromCharCode(9) + " <intervention><span style='background-color:yellow'>" + $("#box2").val() + "</span><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Amount?</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Frequency?</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Duration?</span></bullet><br>"
citation+= String.fromCharCode(9) + " </intervention><br>"
citation+= String.fromCharCode(9) + " <comparison><span style='background-color:yellow'>" + $("#box3").val() + "</span><br>"
citation+= String.fromCharCode(9) + " </comparison><br>"
citation+= String.fromCharCode(9) + " <outcome><br>"
citation+= String.fromCharCode(9) + " <bullet type='primary' url='http://pubmed.gov/delete_url_if_not_needed'><span style='background-color:yellow'>" + $("#box4").val() + " measured how and when</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet type='secondary'><span style='background-color:yellow'>Criteria used or how measured?</span></bullet><br>"
citation+= String.fromCharCode(9) + " </outcome><br>"
$("#criteria").html("<a href=\"http://handbook.cochrane.org/chapter_8/table_8_5_d_criteria_for_judging_risk_of_bias_in_the_risk_of.htm\">Individual criteria for judging risk of bias</a> in a trial using the '<a href=\"http://handbook.cochrane.org/chapter_8/8_5_the_cochrane_collaborations_tool_for_assessing_risk_of_bias.htm\">Cochrane's Risk of bias tool</a>'</li></ul>")
}
if ($("#type_diagnosis").is(":checked")){
citation+= String.fromCharCode(9) + " <design><span style='background-color:yellow'>" + $("#box0").val() + "</span></design><br>"
citation+= String.fromCharCode(9) + " <patient_selection total=\"<span style='background-color:yellow'>__</span>\"><br>"
citation+= String.fromCharCode(9) + " <description><span style='background-color:yellow'>" + $("#box1").val() + "</span></description><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Consecutive enrollment</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Mean age __ months</span></bullet><br>"
citation+= String.fromCharCode(9) + " </patient_selection><br>"
citation+= String.fromCharCode(9) + " <index_test><span style='background-color:yellow'>" + $("#box2").val() + "</span><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Who interpreted?</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Interpretation standardized?</span></bullet><br>"
citation+= String.fromCharCode(9) + " </index_test><br>"
citation+= String.fromCharCode(9) + " <reference_standard><span style='background-color:yellow'>" + $("#box3").val() + "</span><br>"
citation+= String.fromCharCode(9) + " <bullet type='primary'><span style='background-color:yellow'>Criteria or cutoffs used?</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet type='secondary' ><span style='background-color:yellow'>Who interpreted?</span></bullet><br>"
citation+= String.fromCharCode(9) + " <bullet type='secondary' url='http://pubmed.gov/delete_url_if_not_needed'><span style='background-color:yellow'>Interpretation standardized?</span></bullet><br>"
citation+= String.fromCharCode(9) + " </reference_standard><br>"
citation+= String.fromCharCode(9) + " <flow_timing><span style='background-color:yellow'>" + $("#box4").val() + "</span><br>"
citation+= String.fromCharCode(9) + " <bullet><span style='background-color:yellow'>Other issues to note?</span></bullet><br>"
citation+= String.fromCharCode(9) + " </flow_timing><br>"
$("#criteria").html("<a href=\"http://www.bris.ac.uk/quadas/quadas-2/\">Four criteria for judging risk of bias from QUADAS-2</a> (see Risk of bias row in the Table guided by the detailed criteria in the rows above)</li></ul>")
}
citation+= "</study><br>"
//publications.push(citation);
publications += citation;
//citation = ""
//citation+="<span style='color:red;font-weight:bold'><citation pmid=\"" + summary.result[id].uid + '\" year=\"' + pubyear + '\" journal_abbrev=\"' + summary.result[id].source + '\">' + studyname + "</citation></span><br>";
//publications1.push(citation);
//citation = ""
//citation+=studyname + "," + pubyear + "," + summary.result[id].uid + ", , , , ,'',<br>";
//publications2.push(citation);
if(idlist.length!=0){
iterateJSON(idlist, publications);
}else{
//editor.setValue(publications)
$("#editor").html(citation_bias + publications + '<!-- Leave this bottom line --\><br></included>')
}
});
}
})
</script>
<style type="text/css" media="screen">
#editor {
position: relative;
border-style:solid;
border-width:medium;
}
#menu
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}
.listitem
{
display:inline;
float:left;
}
a.menuitem:link,a.menuitem:visited
{
display:block;
width:150px;
font-weight:bold;
text-align:center;
padding:4px;
text-decoration:none;background-color:#6DC6E7;
color:#FFFFFF;
}
a.menuitem:hover,a.menuitem:active
{
background-color:#0022B4;
color:#FFFFFF;
}
.tooltiptext{
display: none;
}
.ToolTipClass{
color:black;
border-color:#0022B4;
background-color: #6DC6E7
}
</style>
</head>
<body>
<!--
http://jquery-csv.googlecode.com/git/examples/basic-usage.html
http://jquery-csv.googlecode.com/git/examples/flot.html -> seems best and most stable without reticulating spines error
http://code.google.com/p/jquery-csv/wiki/API -> instructions
-->
<div class="wrapper">
<div class="page-header">
<div style="color:#0022B4">
<h1>openMetaAnalysis: <span style="font-size:50%">collaborative and continuous</span></h1>
</div>
<ul id="menu">
<li class="listitem"><a href="http://openmetaanalysis.github.io/" class="menuitem">Home</a></li>
<li class="listitem"><a href="https://public.opencpu.org/ocpu/github/openMetaAnalysis/home/www/editor.html" class="menuitem">Editor</a></li>
<li class="listitem"><a href="https://public.opencpu.org/ocpu/github/openMetaAnalysis/home/www/arrows.html" class="menuitem">Arrows Plot</a></li>
<li class="listitem"><a href="http://openmetaanalysis.github.io/methods.html" class="menuitem">Methods</a></li>
<li class="listitem"><a href="http://openmetaanalysis.github.io/contribute.html" class="menuitem">Get involved</a></li>
</ul>
</div>
<h2>Make tables</h2>
<input id="input" type="text" autocomplete="on" size="100" placeholder="Enter search terms or a list of PMIDs separated by spaces, commas, or semi-colons"><br/>
<button id="submitbutton" type="button">Submit</button>
<fieldset>
<legend style="font-weight:bold">Meta-analysis type</legend>
<div><input name="type" class="type" value="diagnosis" id="type_diagnosis" type="radio"><label for="type_diagnosis">Meta-analysis of diagnostic test assessments (DTAs)</label></div>
<div><input name="type" class="type" value="intervention" id="type_intervention" type="radio" ><label for="type_intervention">Meta-analysis of randomized controlled trials (RCTs)</label></div>
</fieldset>
<fieldset id="labels" style="display:none">
<legend style="font-weight:bold">Prepopulate fields that are similar between studies?</legend>
<table style="border:none;border-collapse: collapse;">
<tr><td style="width:200px"><span id="box0label"> </span></td><td><input name="box0" class="field" placeholder="enter text" id="box0" size="100"></td></tr>
<tr><td style="width:200px"><span id="box1label"> </span></td><td><input name="box1" class="field" placeholder="enter condition being studied" id="box1" size="100"></td></tr>
<tr><td style="width:200px"><span id="box2label"> </span></td><td><input name="box2" class="field" placeholder="enter text" id="box2" size="100"></td></tr>
<tr><td style="width:200px"><span id="box3label"> </span></td><td><input name="box3" class="field" placeholder="enter text" id="box3" size="100"></td></tr>
<tr><td style="width:200px"><span id="box4label"> </span></td><td><input name="box4" class="field" placeholder="enter text" id="box4" size="100"></td></tr>
</table>
</fieldset>
<div id="status">Status: Waiting for input</div>
<h3>PICO table</h3>
<div>Copy the content below into the appropriate file for topic. Then replace text that is highlighted in yellow. Add text relevant to the criteria below:</div>
<ul id="hints" style="display:none">
<li id="bullets">If a bullet is not needed, delete its entire row.</li>
<li id="criteria"> </li>
<li id="explanations">For important clinical observations that may explain a study's results, consider surrounding the text with **<span style="background-color:yellow;">to make a yellow highlight</span>**.</li>
</ul>
<div id="editor">Please wait for code to be written here.</div>
<script>
//For gh-pages
//Page history and edit
var pagename = location.pathname.split('/').slice(-1);
if (pagename.toString().length < 1){pagename = "index.html"}
document.write("<div style='text-align:center'><a href='https://github.com/openMetaAnalysis/openMetaAnalysis.github.io/blob/master/" + pagename + "'>Edit this page</a> - <a href='https://github.com/openMetaAnalysis/openMetaAnalysis.github.io/commits/master/" + pagename + "'>Page history</a></div>")
</script>
</div>
<script src="javascripts/scale.fix.js"></script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-56740469-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>