4 * CQM NQF 0028(2014) Initial Patient Population
6 * Copyright (C) 2015 Ensoftek, Inc
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
21 * @link http://www.open-emr.org
24 class NFQ_0028_2014_InitialPatientPopulation
implements CqmFilterIF
26 public function getTitle()
28 return "Initial Patient Population";
31 public function test( CqmPatient
$patient, $beginDate, $endDate )
33 $oneEncounter = array( Encounter
::OPTION_ENCOUNTER_COUNT
=> 1 );
34 $twoEncounters = array( Encounter
::OPTION_ENCOUNTER_COUNT
=> 2 );
36 if ( $patient->calculateAgeOnDate( $beginDate ) >= 18 &&
37 ( Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_OFF_VIS
, $patient, $beginDate, $endDate, $twoEncounters ) ||
38 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_OPHTHAL
, $patient, $beginDate, $endDate, $twoEncounters ) ||
39 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_HEA_AND_BEH
, $patient, $beginDate, $endDate, $twoEncounters ) ||
40 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_OCC_THER
, $patient, $beginDate, $endDate, $twoEncounters ) ||
41 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_PSYCH_AND_PSYCH
, $patient, $beginDate, $endDate, $twoEncounters ) ||
42 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_PRE_MED_SER_18_OLDER
, $patient, $beginDate, $endDate, $oneEncounter ) ||
43 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_PRE_IND_COUNSEL
, $patient, $beginDate, $endDate, $oneEncounter ) ||
44 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_PRE_MED_GROUP_COUNSEL
, $patient, $beginDate, $endDate, $oneEncounter ) ||
45 Helper
::check( ClinicalType
::ENCOUNTER
, Encounter
::ENC_PRE_MED_OTHER_SERV
, $patient, $beginDate, $endDate, $oneEncounter )