Skip to content

Commit

Permalink
completed amc item 8
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Dec 22, 2015
1 parent 5abc8fc commit 86fc314
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
*/
// Denominator:
// Reporting period start and end date
// Prescription written for drugs requiring a prescription in order to be dispensed
// Generate and transmit permissible prescriptions electronically (Controlled substances with drug formulary).( AMC-2014:170.314(g)(1)/(2)–8 )
// Prescription written for drugs requiring a prescription in order to be dispensed(including controlled substance)
class AMC_304b_1_STG2_Denominator implements AmcFilterIF
{
public function getTitle()
Expand All @@ -33,7 +32,7 @@ public function getTitle()

public function test( AmcPatient $patient, $beginDate, $endDate )
{
return true;
return true;
}

}
20 changes: 9 additions & 11 deletions library/classes/rulesets/Amc/reports/AMC_304b_1_STG2/Numerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ public function getTitle()

public function test( AmcPatient $patient, $beginDate, $endDate )
{
//The number of prescriptions in the denominator generated, queried for a drug formulary and transmitted electronically
//
// Still TODO
// AMC MU2 TODO :
// Note OpenEMR official codebase does not support the eTransmit and forumulary items
//
if ( ($patient->object['eTransmit'] == 1) && ($patient->object['formulary'] == 'yes') ) {
return true;
}else{
return false;
}
//The number of prescriptions in the denominator generated, queried for a drug formulary and transmitted electronically
$eprescribe = amcCollect('e_prescribe_amc',$patient->id,'prescriptions',$patient->object['id']);
$checkformulary = amcCollect('e_prescribe_chk_formulary_amc',$patient->id,'prescriptions',$patient->object['id']);
if ( !(empty($eprescribe)) && !(empty($checkformulary)) ) {
return true;
}
else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ public function getTitle()

public function test( AmcPatient $patient, $beginDate, $endDate )
{
return true;
// Check if prescription is for a controlled substance
$controlledSubstanceCheck = amcCollect('e_prescribe_cont_subst_amc',$patient->id,'prescriptions',$patient->object['id']);
// Exclude controlled substances
if (empty($controlledSubstanceCheck)) {
// Not a controlled substance, so include in denominator.
return true;
}
else {
// Is a controlled substance, so exclude from denominator.
return false;
}
}

}
20 changes: 9 additions & 11 deletions library/classes/rulesets/Amc/reports/AMC_304b_2_STG2/Numerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ public function getTitle()

public function test( AmcPatient $patient, $beginDate, $endDate )
{
//The number of prescriptions in the denominator generated, queried for a drug formulary and transmitted electronically.
//
// Still TODO
// AMC MU2 TODO :
// Note OpenEMR official codebase does not support the eTransmit and forumulary items
//
if ( ($patient->object['eTransmit'] == 1) && ($patient->object['formulary'] == 'yes') ) {
return true;
}else{
return false;
}
//The number of prescriptions in the denominator generated, queried for a drug formulary and transmitted electronically
$eprescribe = amcCollect('e_prescribe_amc',$patient->id,'prescriptions',$patient->object['id']);
$checkformulary = amcCollect('e_prescribe_chk_formulary_amc',$patient->id,'prescriptions',$patient->object['id']);
if ( !(empty($eprescribe)) && !(empty($checkformulary)) ) {
return true;
}
else {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ public function getTitle()

public function test( AmcPatient $patient, $beginDate, $endDate )
{
return true;
// Check if prescription is for a controlled substance
$controlledSubstanceCheck = amcCollect('e_prescribe_cont_subst_amc',$patient->id,'prescriptions',$patient->object['id']);
// Exclude controlled substances
if (empty($controlledSubstanceCheck)) {
// Not a controlled substance, so include in denominator.
return true;
}
else {
// Is a controlled substance, so exclude from denominator.
return false;
}
}

}
19 changes: 8 additions & 11 deletions library/classes/rulesets/Amc/reports/AMC_304b_STG1/Numerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ public function getTitle()

public function test( AmcPatient $patient, $beginDate, $endDate )
{
//The number of prescriptions in the denominator transmitted electronically
//
// Still TODO
// AMC MU2 TODO :
// Note OpenEMR official codebase does not support the eTransmit item
//
if($patient->object['eTransmit'] == 1) {
return true;
}else{
return false;
}
// The number of prescriptions in the denominator transmitted electronically.
$amcElement = amcCollect('e_prescribe_amc',$patient->id,'prescriptions',$patient->object['id']);
if (!(empty($amcElement))) {
return true;
}
else {
return false;
}
}
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// is a database change in the course of development. It is used
// internally to determine when a database upgrade is needed.
//
$v_database = 149;
$v_database = 150;

// Access control version identifier, this is to be incremented whenever there
// is a access control change in the course of development. It is used
Expand Down

0 comments on commit 86fc314

Please sign in to comment.