-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmake-table-bias.html
More file actions
222 lines (189 loc) · 10.9 KB
/
make-table-bias.html
File metadata and controls
222 lines (189 loc) · 10.9 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PubMed xml to table bias</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 );
citation_data = ""
$("#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 );
});
});
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(" "));
}
if ($("#type_intervention").is(":checked")){
citation+="<study><br><citation year=\"" + pubyear + "\" pmid=\"" + summary.result[id].uid + '\" trialregistration=\"\" journal_abbrev=\"' + summary.result[id].source + '\" totalsubjects=\"0\" >' + studyname + "</citation></span><br>"
citation+= String.fromCharCode(9) + " <randomization <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Method of randomization not described\"</span>><span style='background-color:yellow'>Unclear risk</span></randomization><br>"
citation+= String.fromCharCode(9) + " <allocation <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Method of concealing allocation not stated\"</span>><span style='background-color:yellow'> risk</span></allocation><br>"
citation+= String.fromCharCode(9) + " <blinding_people <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Did not state blinding of subjects and personnel.\"</span>><span style='background-color:yellow'> risk</span></blinding_people><br>"
citation+= String.fromCharCode(9) + " <blinding_assessment <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Blinding of assessors not stated\"</span>><span style='background-color:yellow'>Unclear risk</span></blinding_assessment><br>"
citation+= String.fromCharCode(9) + " <attrition <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Consort flow diagram not provided\"</span>><span style='background-color:yellow'>Unclear risk</span></attrition><br>"
citation+= String.fromCharCode(9) + " <selective_reporting <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Original protocol not available at a website for trial registration.\"</span>><span style='background-color:yellow'>Unclear risk</span></selective_reporting><br>"
citation+= String.fromCharCode(9) + " <other_biases><span style='background-color:yellow'> risk</span></other_biases><br>"
citation+= "</study><br>"
$("#criteria").html("<a href=\"http://handbook-5-1.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-5-1.cochrane.org/chapter_8/table_8_5_d_criteria_for_judging_risk_of_bias_in_the_risk_of.htm\">Cochrane's Risk of bias tool</a>'</li></ul>")
}
if ($("#type_diagnosis").is(":checked")){
citation+="<study><br><citation year=\"" + pubyear + "\" pmid=\"" + summary.result[id].uid + '\" nct=\"\" journal_abbrev=\"' + summary.result[id].source + '\" totalsubjects=\"0\" >' + studyname + "</citation></span><br>"
citation+= String.fromCharCode(9) + " <patient_selection <span style='background-color:green;color:white;font-weight:bold'>explanation=\"Nonconsecutive patients\"</span>><span style='background-color:yellow'>High risk</span></patient_selection><br>"
citation+= String.fromCharCode(9) + " <index_test><span style='background-color:yellow'> risk</span></index_test><br>"
citation+= String.fromCharCode(9) + " <reference_standard><span style='background-color:yellow'> risk</span></reference_standard><br>"
citation+= String.fromCharCode(9) + " <flow_timing><span style='background-color:yellow'> risk</span></flow_timing><br>"
citation+= "</study><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>")
}
$("#hints").show()
//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" checked><label for="type_intervention">Meta-analysis of randomized controlled trials (RCTs)</label></div>
</fieldset>
<div> </div>
<div id="status">Status: Waiting for input</div>
<h3>Risk of bias table</h3>
<div>Copy the content below into the appropriate file for topic. Then replace text that is highlighted in yellow using the criteria below:</div>
<div> </div>
<ul id="hints" style="display:none">
<li id="criteria"> </li>
<li id="explanations">For high and unclear risk, consider adding explanations as done in <span style="background-color:green;color:white;font-weight:bold">green</span> in example below. These will show when user mouses over the cell in the table.</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>