Skip to content

Commit

Permalink
AMC Reporting Module Is Completed:
Browse files Browse the repository at this point in the history
 -Patient Specific Education AMC measure completed
   -Clickable entry placed in main encounter screen
 -Medications Reconciliation AMC measure completed
   -Clickable entry placed in main encounter screen
 -Escribe Reporting AMC measure completed
   -Clickable entry placed in prescription editing screen
 -Send Summary to Referral AMC measure completed
   -Clickable entry placed in Patient Transactions
   -Can be tracked at Reports->Clinic->AMC Tracking
 -Provide Clinical Summary for Each Office Visit AMC measure completed
   -Clickable entry placed in main encounter screen
   -Can be tracked at Reports->Clinic->AMC Tracking
 -Use CPOE for Medication Orders AMC measure completed
 -Timely electronic access AMC measure completed
   -Note it relies on the existance of a patient portal
   -New Patient Portal Authorization in the patient
    demographics->Choices section.
   -New column in the patient_data table to hold the
    Patient Portal Authorization.
 -Patient Record Request AMC Measure completed
   -The request can be submitted from the
    Patient/Client->Records->Patient Record Request page.
   -The request can be tracked on the
    Reports->Clinic->AMC Tracking page.
 -Lab Results AMC Measure completed
   -Need to manually enter the non-electronic labs in the
    report at Reports->Clinical->Automated Measures (AMC)
 -Mechanism to deal with miscellaneous AMC rules added
   -amc_misc_data sql table to store elements
    along with accompanying functions.
 -Three CDR reports (standard,CQM,AMC) are now controlled
   by three separate globals in Administration->Globals->CDR.
 -Added a tracking report for applicable measures:
   -Administration->Clinic->AMC Tracking
   -Controlled by a global in Administration->Globals->CDR.
   -Following measures are tracked here:
     -Send Summary to Referral AMC measure
     -Provide Clinical Summary for Each Office Visit AMC Measure
     -Patient Record Request AMC Measure
 -Added prompting for pertinent AMC information at various place.
   -Controlled by a global in Administration->Globals->CDR.
  • Loading branch information
bradymiller committed Jun 4, 2011
1 parent bd91936 commit d43cdab
Show file tree
Hide file tree
Showing 49 changed files with 2,146 additions and 44 deletions.
12 changes: 12 additions & 0 deletions controllers/C_Prescription.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require_once($GLOBALS['fileroot'] . "/library/classes/Provider.class.php");
require_once($GLOBALS['fileroot'] . "/library/classes/RXList.class.php");
require_once($GLOBALS['fileroot'] . "/library/registry.inc");
require_once($GLOBALS['fileroot'] . "/library/amc.php");

class C_Prescription extends Controller {

Expand Down Expand Up @@ -179,6 +180,17 @@ function edit_action_process() {
return $this->edit_action($this->prescriptions[0]->id);
}

// Set the AMC reporting flag (to record percentage of prescriptions that
// are set as e-prescriptions)
if (!(empty($_POST['escribe_flag']))) {
// add the e-prescribe flag
processAmcCall('e_prescribe_amc', true, 'add', $this->prescriptions[0]->get_patient_id(), 'prescriptions', $this->prescriptions[0]->id);
}
else {
// remove the e-prescribe flag
processAmcCall('e_prescribe_amc', true, 'remove', $this->prescriptions[0]->get_patient_id(), 'prescriptions', $this->prescriptions[0]->id);
}

if ($this->prescriptions[0]->get_active() > 0) {
return $this->send_action($this->prescriptions[0]->id);
}
Expand Down
14 changes: 11 additions & 3 deletions interface/main/left_nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
Expand Down Expand Up @@ -1089,6 +1090,12 @@ function selpopup(selobj) {
</ul>
</li>

<li><a class="collapsed_lv2"><span><?php xl('Records','e') ?></span></a>
<ul>
<?php genTreeLink('RTop','prq',xl('Patient Record Request')); ?>
</ul>
</li>

<?php if ($GLOBALS['gbl_nav_visit_forms']) { ?>
<li><a class="collapsed_lv2"><span><?php xl('Visit Forms','e') ?></span></a>
<ul>
Expand Down Expand Up @@ -1199,9 +1206,10 @@ function selpopup(selobj) {
</li>
<li><a class="collapsed_lv2"><span><?php xl('Clinic','e') ?></span></a>
<ul>
<?php genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?>
<?php genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?>
<?php genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?>
<?php if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?>
<?php if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?>
<?php if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?>
<?php if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?>
</ul>
</li>
<li class="open"><a class="expanded_lv2"><span><?php xl('Visits','e') ?></span></a>
Expand Down
144 changes: 138 additions & 6 deletions interface/patient_file/encounter/forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
require_once("$srcdir/acl.inc");
require_once("$srcdir/formatting.inc.php");
require_once("$srcdir/patient.inc");
require_once("$srcdir/amc.php");
?>
<html>

Expand Down Expand Up @@ -145,12 +146,62 @@ function divtoggle(spanid, divid) {
}
?>
</div>
<div style='float:left;margin-left:10px'>
<?php if (acl_check('admin', 'super')) { ?>
<a href='toggledivs(this.id,this.id);' class='css_button' onclick='return deleteme()'><span><?php echo xl('Delete') ?></span></a>
&nbsp;&nbsp;&nbsp;<a href="#" onClick='expandcollapse("expand");' style="font-size:80%;"><?php xl('Expand All','e'); ?></a>
&nbsp;&nbsp;&nbsp;<a style="font-size:80%;" href="#" onClick='expandcollapse("collapse");'><?php xl('Collapse All','e'); ?></a>
<?php } ?>

<div>
<div style='float:left;margin-left:10px'>
<?php if (acl_check('admin', 'super')) { ?>
<a href='toggledivs(this.id,this.id);' class='css_button' onclick='return deleteme()'><span><?php echo xl('Delete') ?></span></a>
<?php } ?>
&nbsp;&nbsp;&nbsp;<a href="#" onClick='expandcollapse("expand");' style="font-size:80%;"><?php xl('Expand All','e'); ?></a>
&nbsp;&nbsp;&nbsp;<a style="font-size:80%;" href="#" onClick='expandcollapse("collapse");'><?php xl('Collapse All','e'); ?></a>
</div>

<?php if ($GLOBALS['enable_amc_prompting']) { ?>
<div style='float:right;margin-right:25px;border-style:solid;border-width:1px;'>
<div style='float:left;margin:5px 5px 5px 5px;'>

<?php // Display the education resource checkbox (AMC prompting)
$itemAMC = amcCollect("patient_edu_amc", $pid, 'form_encounter', $encounter);
?>
<?php if (!(empty($itemAMC))) { ?>
<input type="checkbox" id="prov_edu_res" checked>
<?php } else { ?>
<input type="checkbox" id="prov_edu_res">
<?php } ?>
<span class="text"><?php echo xl('Provided Education Resource(s)?') ?></span><br>

<?php // Display the Provided Clinical Summary checkbox (AMC prompting)
$itemAMC = amcCollect("provide_sum_pat_amc", $pid, 'form_encounter', $encounter);
?>
<?php if (!(empty($itemAMC))) { ?>
<input type="checkbox" id="provide_sum_pat_flag" checked>
<?php } else { ?>
<input type="checkbox" id="provide_sum_pat_flag">
<?php } ?>
<span class="text"><?php echo xl('Provided Clinical Summary?') ?></span><br>

<?php // Display the medication reconciliation checkboxes (AMC prompting)
$itemAMC = amcCollect("med_reconc_amc", $pid, 'form_encounter', $encounter);
?>
<?php if (!(empty($itemAMC))) { ?>
<input type="checkbox" id="trans_trand_care" checked>
<span class="text"><?php echo xl('Transition/Transfer of Care?') ?></span><br>
<?php if (!(empty($itemAMC['date_completed']))) { ?>
<input type="checkbox" id="med_reconc_perf" checked>
<?php } else { ?>
<input type="checkbox" id="med_reconc_perf">
<?php } ?>
<span class="text"><?php echo xl('Medication Reconciliation Performed?') ?></span><br>
<?php } else { ?>
<input type="checkbox" id="trans_trand_care">
<span class="text"><?php echo xl('Transition/Transfer of Care?') ?></span><br>
<input type="checkbox" id="med_reconc_perf" DISABLED>
<span class="text"><?php echo xl('Medication Reconciliation Performed?') ?></span><br>
<?php } ?>

</div>
</div>
<?php } ?>
</div>
<br/>
<br/>
Expand Down Expand Up @@ -271,6 +322,87 @@ function divtoggle(spanid, divid) {
$(".onerow").mouseout(function() { $(this).toggleClass("highlight"); });
$(".onerow").click(function() { GotoForm(this); });

$("#prov_edu_res").click(function() {
if ( $('#prov_edu_res').attr('checked') ) {
var mode = "add";
}
else {
var mode = "remove";
}
top.restoreSession();
$.post( "../../../library/ajax/amc_misc_data.php",
{ amc_id: "patient_edu_amc",
complete: true,
mode: mode,
patient_id: <?php echo htmlspecialchars($pid,ENT_NOQUOTES); ?>,
object_category: "form_encounter",
object_id: <?php echo htmlspecialchars($encounter,ENT_NOQUOTES); ?>
}
);
});

$("#provide_sum_pat_flag").click(function() {
if ( $('#provide_sum_pat_flag').attr('checked') ) {
var mode = "add";
}
else {
var mode = "remove";
}
top.restoreSession();
$.post( "../../../library/ajax/amc_misc_data.php",
{ amc_id: "provide_sum_pat_amc",
complete: true,
mode: mode,
patient_id: <?php echo htmlspecialchars($pid,ENT_NOQUOTES); ?>,
object_category: "form_encounter",
object_id: <?php echo htmlspecialchars($encounter,ENT_NOQUOTES); ?>
}
);
});

$("#trans_trand_care").click(function() {
if ( $('#trans_trand_care').attr('checked') ) {
var mode = "add";
// Enable the reconciliation checkbox
$("#med_reconc_perf").removeAttr("disabled");
}
else {
var mode = "remove";
//Disable the reconciliation checkbox (also uncheck it if applicable)
$("#med_reconc_perf").attr("disabled", true);
$("#med_reconc_perf").removeAttr("checked");
}
top.restoreSession();
$.post( "../../../library/ajax/amc_misc_data.php",
{ amc_id: "med_reconc_amc",
complete: false,
mode: mode,
patient_id: <?php echo htmlspecialchars($pid,ENT_NOQUOTES); ?>,
object_category: "form_encounter",
object_id: <?php echo htmlspecialchars($encounter,ENT_NOQUOTES); ?>
}
);
});

$("#med_reconc_perf").click(function() {
if ( $('#med_reconc_perf').attr('checked') ) {
var mode = "complete";
}
else {
var mode = "uncomplete";
}
top.restoreSession();
$.post( "../../../library/ajax/amc_misc_data.php",
{ amc_id: "med_reconc_amc",
complete: true,
mode: mode,
patient_id: <?php echo htmlspecialchars($pid,ENT_NOQUOTES); ?>,
object_category: "form_encounter",
object_id: <?php echo htmlspecialchars($encounter,ENT_NOQUOTES); ?>
}
);
});

// $(".deleteme").click(function(evt) { deleteme(); evt.stopPropogation(); });

var GotoForm = function(obj) {
Expand Down
27 changes: 27 additions & 0 deletions interface/patient_file/transaction/add_transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
require_once("../../globals.php");
require_once("$srcdir/transactions.inc");
require_once("$srcdir/options.inc.php");
require_once("$srcdir/amc.php");

// Referral plugin support.
$fname = $GLOBALS['OE_SITE_DIR'] . "/LBF/REF.plugin.php";
Expand Down Expand Up @@ -72,6 +73,16 @@
$transid = sqlInsert("INSERT INTO transactions SET $sets", $sqlBindArray);
}

// Set the AMC sent records flag
if (!(empty($_POST['send_sum_flag']))) {
// add the sent records flag
processAmcCall('send_sum_amc', true, 'add', $pid, 'transactions', $transid);
}
else {
// remove the sent records flag
processAmcCall('send_sum_amc', true, 'remove', $pid, 'transactions', $transid);
}

if ($GLOBALS['concurrent_layout'])
$body_onload_code = "javascript:location.href='transactions.php';";
else
Expand Down Expand Up @@ -293,6 +304,22 @@ function submitme() {

<div id='referdiv'>

<?php if ($GLOBALS['enable_amc_prompting']) { ?>
<div style='float:right;margin-right:25px;border-style:solid;border-width:1px;'>
<div style='float:left;margin:5px 5px 5px 5px;'>
<?php // Display the send records checkbox (AMC prompting)
$itemAMC = amcCollect("send_sum_amc", $pid, 'transactions', $transid);
?>
<?php if (!(empty($itemAMC))) { ?>
<input type="checkbox" id="send_sum_flag" name="send_sum_flag" checked>
<?php } else { ?>
<input type="checkbox" id="send_sum_flag" name="send_sum_flag">
<?php } ?>
<span class="text"><?php echo xl('Sent Medical Records?') ?></span><br>
</div>
</div>
<?php } ?>

<div id="DEM">
<ul class="tabNav">
<?php
Expand Down
81 changes: 81 additions & 0 deletions interface/patient_file/transaction/record_request.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
// Copyright (C) 2010 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.

//SANITIZE ALL ESCAPES
$sanitize_all_escapes=true;
//

//STOP FAKE REGISTER GLOBALS
$fake_register_globals=false;
//

require_once("../../globals.php");

?>
<html>
<head>
<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
<link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['webroot'] ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media="screen" />
<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery.1.3.2.js"></script>
<script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/dialog.js"></script>
<script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/textformat.js"></script>
<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/js/common.js"></script>
<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script>
<script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar.js"></script>
<?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
<script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar_setup.js"></script>
<SCRIPT LANGUAGE="JavaScript">


$(document).ready(function(){
$("#req_button").click(function() {
// hide the button, show the message, and send the ajax call
$('#req_button').hide();
$('#openreq').show();
top.restoreSession();
$.post( "../../../library/ajax/amc_misc_data.php",
{ amc_id: "provide_rec_pat_amc",
complete: false,
mode: "add_force",
patient_id: <?php echo htmlspecialchars($pid,ENT_NOQUOTES); ?>
}
);
});

});

</script>
</head>

<?php // collect data
$recordRequest = sqlQuery("SELECT * FROM `amc_misc_data` WHERE `pid`=? AND `amc_id`='provide_rec_pat_amc' AND (`date_completed` IS NULL OR `date_completed`='') ORDER BY `date_created` DESC", array($pid) );
?>

<body class="body_top">

<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td><span class="title"><?php echo htmlspecialchars( xl('Patient Records Request'), ENT_NOQUOTES); ?></span>&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>
<br>
<br>

<?php if (empty($recordRequest)) { ?>
<a href="javascript:void(0)" id="req_button" class="css_button"><span><?php echo htmlspecialchars( xl('Patient Record Request'), ENT_NOQUOTES);?></span></a>
<br>
<span class="text" id="openreq" style="display:none"><?php echo htmlspecialchars(xl('The patient record request has been recorded.'), ENT_NOQUOTES) ?></span>
<?php } else { ?>
<a href="javascript:void(0)" id="req_button" class="css_button" style="display:none"><span><?php echo htmlspecialchars( xl('Patient Record Request'), ENT_NOQUOTES);?></span></a>
<br>
<span class="text" id="openreq"><?php echo htmlspecialchars(xl('There is already an open patient record request.'), ENT_NOQUOTES) ?></span>
<?php } ?>

</body>
</html>
Loading

0 comments on commit d43cdab

Please sign in to comment.