Planned downtime from 11:00 UTC to 11:30 UTC. We try to keep it as short as possible!
Clinical trials viewer downloads and parses information from clinicaltrials.gov at the time of search to populate the graph of clinical trials. FDA information is updated weekly from the Drugs@FDA dataset and the FDA postmarketing commitment data set.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

243 lines
7.2 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <title>Clinical trials viewer</title>
  8. <!-- Bootstrap -->
  9. <link href="<?php echo SITE_URL; ?>css/bootstrap.min.css" rel="stylesheet">
  10. <!-- CTNotebook CSS -->
  11. <link href="<?php echo SITE_URL; ?>ctviewer.css" rel="stylesheet">
  12. <meta name="author" content="Benjamin Gregory Carlisle PhD Email: murph@bgcarlisle.com Website: https://www.bgcarlisle.com/ Social media: https://scholar.social/@bgcarlisle">
  13. </head>
  14. <body>
  15. <div class="container-fluid ctviewer-nav" id="nav-container" style="position: fixed; top: 0; z-index: 1000;">
  16. <ul class="nav">
  17. <li class="nav-item">
  18. <a class="nav-link active" href="<?php echo SITE_URL; ?>">Clinical trials viewer</a>
  19. </li>
  20. <li class="nav-item">
  21. <a class="nav-link" href="https://blog.bgcarlisle.com/ctviewer/" target="_blank">About</a>
  22. </li>
  23. <li class="nav-item">
  24. <a class="nav-link" href="#" onclick="show_citation(event);">Cite</a>
  25. </li>
  26. <li class="nav-item">
  27. <a class="nav-link" href="https://codeberg.org/bgcarlisle/ClinicalTrialsViewer" target="_blank">Source</a>
  28. </li>
  29. </ul>
  30. </div>
  31. <div id="citeMask" class="ctvHidden" onclick="hide_citation (event);">&nbsp;</div>
  32. <div id="citeCTViewer" class="ctvHidden">
  33. <h2>How to cite Clinical trials viewer</h2>
  34. <h3>BibTeX</h3>
  35. <pre>
  36. @software{carlisle_ctviewer_2019,
  37. location = {{Retrieved from https://trials.bgcarlisle.com/}},
  38. title = {Clinical trials viewer},
  39. url = {https://trials.bgcarlisle.com/},
  40. organization = {{The Grey Literature}},
  41. date = {2019-06},
  42. author = {Carlisle, Benjamin Gregory}
  43. }
  44. </pre>
  45. <h3>Vancouver</h3>
  46. <p>Carlisle BG. Clinical trials viewer [Internet]. Retrieved from https://trials.bgcarlisle.com/: The Grey Literature; 2019. Available from: https://trials.bgcarlisle.com/</p>
  47. <h3>AMA</h3>
  48. <p>Carlisle BG. <i>Clinical Trials Viewer</i>. Retrieved from https://trials.bgcarlisle.com/: The Grey Literature; 2019. https://trials.bgcarlisle.com/.</p>
  49. <h3>MLA</h3>
  50. <p>Carlisle, Benjamin Gregory. <i>Clinical Trials Viewer.</i> The Grey Literature, 2019, https://trials.bgcarlisle.com/.</p>
  51. <button onclick="hide_citation(event);" class="btn btn-block btn-primary">Close citation information</button>
  52. </div>
  53. <?php
  54. if ( ! isset ( $_GET['address'] ) ) { // No ctviewer address specified
  55. // Show search box
  56. include ( ABS_PATH . 'search-field.php' );
  57. } else {
  58. // Show plot
  59. include ( ABS_PATH . "plot-viewer.php" );
  60. }
  61. ?>
  62. <!-- jQuery -->
  63. <script src="<?php echo SITE_URL; ?>jquery-3.4.1.min.js"></script>
  64. <!-- Popper.js -->
  65. <script src="<?php echo SITE_URL; ?>js/bootstrap.bundle.min.js"></script>
  66. <!-- Bootstrap JS -->
  67. <script src="<?php echo SITE_URL; ?>js/bootstrap.min.js"></script>
  68. <!-- CTViewer JS -->
  69. <script>
  70. var ctviewerurl = '<?php echo SITE_URL; ?>';
  71. function ctviewer_search () {
  72. $('#search-form').slideUp(500, function () {
  73. $('#search-progress').html('<div style="text-align: center; margin-top: 50px;"><img src="https://trials.bgcarlisle.com/images/loading.gif"><p>Downloading data from <a href="https://www.clinicaltrials.gov/">www.clinicaltrials.gov</a>. This may take a minute or two.</p></div>');
  74. $('#search-progress').slideDown();
  75. });
  76. $.ajax ({
  77. url: ctviewerurl + 'query.php',
  78. type: 'post',
  79. data: {
  80. drug: $('#drug-query').val(),
  81. indication: $('#indication-query').val(),
  82. paeds: $('#paeds-checkbox').prop('checked')
  83. },
  84. dataType: 'html'
  85. }).done ( function (response) {
  86. $('#search-progress').html('');
  87. if ( response != 'FALSE' ) {
  88. window.location.href = ctviewerurl + response + '/';
  89. } else {
  90. alert ('Could not download trial data for: ' + $('#drug-query').val());
  91. window.location.href = ctviewerurl;
  92. }
  93. });
  94. }
  95. function show_trial_details ( nct_number ) {
  96. $('.ctvTrial').removeClass('selectedTrial');
  97. $('.ctvTrialDetails:not(#ctvDetails-' + nct_number + ')').slideUp(400, function () {
  98. // This fails in the case that there are no other Trial Details div's
  99. $('#ctvDetails-' + nct_number).slideDown();
  100. $('#ctvTrial-' + nct_number).addClass('selectedTrial');
  101. });
  102. // So I put this here for the case where there's only one:
  103. if ($('.ctvTrialDetails').length == 1) {
  104. $('#ctvDetails-' + nct_number).slideDown();
  105. $('#ctvTrial-' + nct_number).addClass('selectedTrial');
  106. }
  107. }
  108. function hide_trial_details () {
  109. $('.ctvTrial').removeClass('selectedTrial');
  110. $('.ctvTrialDetails').slideUp();
  111. }
  112. function show_citation (event) {
  113. event.preventDefault();
  114. $('#citeMask').fadeIn(400, function () {
  115. $('#citeCTViewer').slideDown();
  116. });
  117. }
  118. function hide_citation (event) {
  119. event.preventDefault();
  120. $('#citeCTViewer').slideUp(400, function () {
  121. $('#citeMask').fadeOut();
  122. });
  123. }
  124. function ctv_sort_trials (event, button, sortby) {
  125. event.preventDefault();
  126. $.ajax ({
  127. url: ctviewerurl + 'sort.php',
  128. type: 'post',
  129. data: {
  130. sortby: sortby,
  131. address: '<?php echo $ctviewer['address']; ?>'
  132. },
  133. dataType: 'html'
  134. }).done ( function (response) {
  135. var $trials = $('.ctvTrial');
  136. var sorted_trials = $trials.sort(function (a, b) {
  137. return $(a).attr(sortby) > $(b).attr(sortby) ? 1 : -1;
  138. });
  139. $('.ctvTrial').remove();
  140. $('div#ctvDrugViewGrid').append(sorted_trials);
  141. $('#sortby button').removeAttr('disabled');
  142. button.prop('disabled', true);
  143. });
  144. }
  145. $('#drug-query, #indication-query').bind('keypress', function(e) {
  146. if (e.keyCode == 13) {
  147. ctviewer_search();
  148. }
  149. });
  150. $(window).scroll( function () {
  151. $('#ctvYearMarkerContainer').css('top', $(this).scrollTop() + 50);
  152. });
  153. $(document).bind('keydown', function(keyStrokeEvent) {
  154. if (keyStrokeEvent.keyCode == 74) { // 'j' is pressed
  155. if ($('.selectedTrial').length) { // there is a selected trial
  156. $('.selectedTrial').last().next().click();
  157. } else { // no selected trial
  158. $('.ctvTrial').first().click();
  159. }
  160. }
  161. if (keyStrokeEvent.keyCode == 75) { // 'k' is pressed
  162. $('.selectedTrial').first().prev().click();
  163. }
  164. if (keyStrokeEvent.keyCode == 67) { // 'c' is pressed
  165. hide_trial_details();
  166. }
  167. });
  168. $(document).ready(function () {
  169. // Fix the navigation bar
  170. if ( $('#ctvDrugViewGrid').length ) {
  171. if ( $("#nav-container").width() < $('#ctvDrugViewGrid').width() ) {
  172. $("#nav-container").width(<?php echo $viewerwidth + 350; ?>);
  173. }
  174. }
  175. // Sort FDA info
  176. var $fdainfo = $('.fdaDocument, .fdaSubmission, .fdaPMC');
  177. var sorted_fda_info = $fdainfo.sort(function (a, b) {
  178. return $(a).attr('fdaSortDate') > $(b).attr('fdaSortDate') ? 1 : -1;
  179. });
  180. $('.fdaDocument, .fdaSubmission').remove();
  181. $('#fdaInfoContainer').append(sorted_fda_info);
  182. // Sort trials, if necessary
  183. if ( '<?php echo $ctviewer['sort_by']; ?>' != 'ctvSortStartDate' ) {
  184. $('#' + '<?php echo $ctviewer['sort_by']; ?>' + 'Button').click();
  185. }
  186. });
  187. </script>
  188. </body>
  189. </html>