added ability to check for any encounter type, removed unused files, some more report...
[openemr.git] / library / classes / rulesets / Cqm / reports / NFQ_0038 / Numerator2.php
blob6a1b283d70ace374d6f749642af431dca5f9c91c
1 <?php
2 class NFQ_0038_Numerator2 implements CqmFilterIF
4 public function getTitle() {
5 return "Numerator 2";
8 public function test( CqmPatient $patient, $dateBegin, $dateEnd )
10 $dobPlus42Days = date( 'Y-m-d 00:00:00', strtotime( '+42 day', strtotime( $patient->dob ) ) );
11 $dobPlus2Years = date( 'Y-m-d 00:00:00', strtotime( '+2 year', strtotime( $patient->dob ) ) );
12 $options = array( Medication::OPTION_COUNT => 3, Medication::OPTION_UNIQUE_DATES => true );
13 if ( Helper::check( ClinicalType::MEDICATION, Medication::IPV, $patient, $dobPlus42Days, $dobPlus2Years, $options ) &&
14 !( Helper::check( ClinicalType::ALLERGY, Allergy::IPV, $patient ) ||
15 Helper::check( ClinicalType::ALLERGY, Allergy::NEOMYCIN, $patient ) ||
16 Helper::check( ClinicalType::ALLERGY, Allergy::STREPTOMYCIN, $patient ) ||
17 Helper::check( ClinicalType::ALLERGY, Allergy::POLYMYXIN, $patient ) ) ) {
18 return true;
21 return false;