Skip to content

Commit

Permalink
Added patient education module:
Browse files Browse the repository at this point in the history
 -Can be found at Miscellaneous->Patient Education.
  • Loading branch information
tmccormi authored and bradymiller committed May 5, 2011
1 parent 11b2840 commit 761d122
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interface/main/left_nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
'new' => array(xl('New Pt') , 0, 'new/new.php'),
'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
Expand Down Expand Up @@ -1287,6 +1288,7 @@ function selpopup(selobj) {
</li>
<li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
<ul>
<?php genTreeLink('RTop','ped',xl('Patient Education')); ?>
<?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
<?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
<?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
Expand Down
125 changes: 125 additions & 0 deletions interface/reports/patient_edu_web_lookup.php
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 '&nbsp;&nbsp;';
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>

0 comments on commit 761d122

Please sign in to comment.