forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Can be found at Miscellaneous->Patient Education.
- Loading branch information
1 parent
11b2840
commit 761d122
Showing
2 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<?php | ||
// Copyright (C) 2011 Tony McCormick <[email protected]> | ||
// Brady Miller <[email protected]> | ||
// | ||
// This program is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU General Public License | ||
// as published by the Free Software Foundation; either version 2 | ||
// of the License, or (at your option) any later version. | ||
|
||
// Open websearch for patient education materials | ||
|
||
//SANITIZE ALL ESCAPES | ||
$sanitize_all_escapes=true; | ||
// | ||
|
||
//STOP FAKE REGISTER GLOBALS | ||
$fake_register_globals=false; | ||
// | ||
|
||
//Include required scripts/libraries | ||
require_once("../globals.php"); | ||
|
||
|
||
// Reference website links | ||
$websites = array( | ||
'Medline' => 'https://vsearch.nlm.nih.gov/vivisimo/cgi-bin/query-meta?v%3Aproject=medlineplus&query=[%]&x=12&y=15', | ||
'eMedicine' => 'https://search.medscape.com/reference-search?newSearchHeader=1&queryText=[%]', | ||
'WebMD' => 'https://www.webmd.com/search/search_results/default.aspx?query=[%]&sourceType=undefined' | ||
); | ||
|
||
// Collect variables | ||
$form_lookup_at = (isset($_POST['form_lookup_at'])) ? $_POST['form_lookup_at'] : ''; | ||
$form_diagnosis = (isset($_POST['form_diagnosis'])) ? $_POST['form_diagnosis'] : ''; | ||
?> | ||
|
||
<html> | ||
<head> | ||
<?php html_header_show();?> | ||
<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css"> | ||
<script type="text/javascript" src="../../library/js/jquery.1.3.2.js"></script> | ||
|
||
<script type="text/javascript"> | ||
function searchResultsPopup(search_term,link) { | ||
link_formatted = link.replace("[%]",encodeURIComponent(search_term)); | ||
top.restoreSession(); | ||
window.open(link_formatted); | ||
} | ||
</script> | ||
|
||
<title><?echo htmlspecialchars( xl('Find Patient Education Materials'), ENT_NOQUOTES); ?></title> | ||
</head> | ||
|
||
<body class="body_top"> | ||
|
||
<span class='title'><?php echo htmlspecialchars( xl('Web Search'), ENT_NOQUOTES); ?> - <?php echo htmlspecialchars( xl('Patient Education Materials'), ENT_NOQUOTES); ?></span> | ||
|
||
<form method='post' action='patient_edu_web_lookup.php' id='theform' onsubmit='return top.restoreSession()'> | ||
|
||
<div id="report_parameters"> | ||
|
||
<table> | ||
<tr> | ||
<td> | ||
<div style='float:left'> | ||
<table class='text'> | ||
<tr> | ||
<td> | ||
<?php echo htmlspecialchars( xl('Search in'), ENT_NOQUOTES); | ||
echo ' '; | ||
echo "<select name='form_lookup_at'>\n"; | ||
foreach ($websites as $key => $value) { | ||
echo " <option value='" . htmlspecialchars($key, ENT_QUOTES) . "'"; | ||
if ($key == $form_lookup_at) echo ' selected'; | ||
echo ">" . htmlspecialchars( xl($key), ENT_NOQUOTES) . "</option>\n"; | ||
} | ||
echo "</select>"; ?> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<input type='text' name='form_diagnosis' size='60' value='<?php echo htmlspecialchars($form_diagnosis, ENT_QUOTES); ?>' | ||
title='<?php echo htmlspecialchars( xl('Search Text'), ENT_QUOTES); ?>'> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
</div> | ||
|
||
</td> | ||
<td align='left' valign='middle' height="100%"> | ||
<table style='border-left:1px solid; width:100%; height:100%' > | ||
<tr> | ||
<td> | ||
<div style='margin-left:15px'> | ||
<a href='#' class='css_button' onclick='$("#theform").submit();'> | ||
<span> | ||
<?php echo htmlspecialchars( xl('Submit'), ENT_NOQUOTES); ?> | ||
</span> | ||
</a> | ||
|
||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
</div> <!-- end of parameters --> | ||
|
||
<div class='text'> | ||
<?php | ||
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); | ||
?> | ||
</div> | ||
<div class='text'> | ||
<?php if (!empty($form_diagnosis) && !empty($form_lookup_at)) { ?> | ||
<script type="text/javascript"> | ||
searchResultsPopup('<?php echo addslashes($form_diagnosis); ?>','<?php echo addslashes($websites[$form_lookup_at]) ?>'); | ||
</script> | ||
<?php } ?> | ||
</div> | ||
</form> | ||
</body> | ||
</html> |