3 * Open websearch for patient education materials
5 * Copyright (C) 2011 Tony McCormick <tony@mi-squared.com>
6 * Copyright (C) 2011 Brady Miller <brady@sparmy.com>
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
20 * @author Tony McCormick <tony@mi-squared.com>
21 * @author Brady Miller <brady@sparmy.com>
22 * @link http://www.open-emr.org
26 //SANITIZE ALL ESCAPES
27 $sanitize_all_escapes=true;
30 //STOP FAKE REGISTER GLOBALS
31 $fake_register_globals=false;
34 //Include required scripts/libraries
35 require_once("../globals.php");
38 // Reference website links
40 'Medline' => 'http://vsearch.nlm.nih.gov/vivisimo/cgi-bin/query-meta?v%3Aproject=medlineplus&query=[%]&x=12&y=15',
41 'eMedicine' => 'http://search.medscape.com/reference-search?newSearchHeader=1&queryText=[%]',
42 'WebMD' => 'http://www.webmd.com/search/search_results/default.aspx?query=[%]&sourceType=undefined'
46 $form_lookup_at = (isset($_POST['form_lookup_at'])) ?
$_POST['form_lookup_at'] : '';
47 $form_diagnosis = (isset($_POST['form_diagnosis'])) ?
$_POST['form_diagnosis'] : '';
52 <?php
html_header_show();?
>
53 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
54 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-3-2/index.js"></script
>
56 <script type
="text/javascript">
57 function searchResultsPopup(search_term
,link
) {
58 link_formatted
= link
.replace("[%]",encodeURIComponent(search_term
));
60 window
.open(link_formatted
);
64 <title
><?php
echo htmlspecialchars( xl('Find Patient Education Materials'), ENT_NOQUOTES
); ?
></title
>
67 <body
class="body_top">
69 <span
class='title'><?php
echo htmlspecialchars( xl('Web Search'), ENT_NOQUOTES
); ?
> - <?php
echo htmlspecialchars( xl('Patient Education Materials'), ENT_NOQUOTES
); ?
></span
>
71 <form method
='post' action
='patient_edu_web_lookup.php' id
='theform' onsubmit
='return top.restoreSession()'>
73 <div id
="report_parameters">
76 <tr
class="misc-internet-search">
78 <div style
='float:left'>
82 <?php
echo htmlspecialchars( xl('Search in'), ENT_NOQUOTES
);
84 echo "<select name='form_lookup_at'>\n";
85 foreach ($websites as $key => $value) {
86 echo " <option value='" . htmlspecialchars($key, ENT_QUOTES
) . "'";
87 if ($key == $form_lookup_at) echo ' selected';
88 echo ">" . htmlspecialchars( xl($key), ENT_NOQUOTES
) . "</option>\n";
95 <input type
='text' name
='form_diagnosis' size
='60' value
='<?php echo htmlspecialchars($form_diagnosis, ENT_QUOTES); ?>'
96 title
='<?php echo htmlspecialchars( xl('Search Text
'), ENT_QUOTES); ?>'>
104 <td align
='left' valign
='middle' height
="100%">
105 <table style
='border-left:1px solid; width:100%; height:100%' >
108 <div style
='margin-left:15px'>
109 <a href
='#' class='css_button' onclick
='top.restoreSession(); $("#theform").submit();'>
111 <?php
echo htmlspecialchars( xl('Submit'), ENT_NOQUOTES
); ?
>
123 </div
> <!-- end of parameters
-->
127 echo htmlspecialchars( xl('Please input search criteria above, and click Submit to view results. (Results will be displayed in a pop up window)'), ENT_NOQUOTES
);
131 <?php
if (!empty($form_diagnosis) && !empty($form_lookup_at)) { ?
>
132 <script type
="text/javascript">
133 searchResultsPopup('<?php echo addslashes($form_diagnosis); ?>','<?php echo addslashes($websites[$form_lookup_at]) ?>');