public function test(AmcPatient $patient, $beginDate, $endDate) { // If height/length, weight, and blood pressure (all) within scope of practice: // Number of unique patients seen by the EP during the EHR reporting period if (exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate)) { $options = array(Encounter::OPTION_ENCOUNTER_COUNT => 1); if (Helper::checkAnyEncounter($patient, $beginDate, $endDate, $options)) { return true; } else { return false; } } else { if (exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate)) { $options = array(Encounter::OPTION_ENCOUNTER_COUNT => 1); if (Helper::checkAnyEncounter($patient, $beginDate, $endDate, $options)) { return true; } else { return false; } } else { if (exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate)) { $options = array(Encounter::OPTION_ENCOUNTER_COUNT => 1); if (Helper::checkAnyEncounter($patient, $beginDate, $endDate, $options) && $patient->calculateAgeOnDate($endDate) >= 3) { return true; } else { return false; } } } } }
public function test(AmcPatient $patient, $beginDate, $endDate) { if ($patient->calculateAgeOnDate($endDate) >= 3 && exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate) || $patient->calculateAgeOnDate($endDate) < 3 && exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate)) { return true; } else { return false; } }
public function test(AmcPatient $patient, $beginDate, $endDate) { //The number of patients in the denominator who have entries of BP as structured data (Effective 2013 onward for providers for whom height and weight is out of scope of practice) if (exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate)) { return true; } else { return false; } }
public function test(AmcPatient $patient, $beginDate, $endDate) { //The number of patients in the denominator who have entries of height/length, weight and blood pressure recorded as structured data (effective 2013 only). if (exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'BMI', 'gt', '0', 'ge', 1, '', '', $endDate)) { return true; } else { return false; } }
public function test(AmcPatient $patient, $beginDate, $endDate) { // have demographics recorded as structured data // Need preferred language, gender, race, ethnicity, date of birth. if (exist_database_item($patient->id, 'patient_data', 'language', '', '', 'ge', 1) && exist_database_item($patient->id, 'patient_data', 'sex', '', '', 'ge', 1) && exist_database_item($patient->id, 'patient_data', 'race', '', '', 'ge', 1) && exist_database_item($patient->id, 'patient_data', 'ethnicity', '', '', 'ge', 1) && exist_database_item($patient->id, 'patient_data', 'DOB', '', '', 'ge', 1)) { return true; } else { return false; } }
public function test(AmcPatient $patient, $beginDate, $endDate) { // Record and chart changes in vital signs // Need height,weight,BP, and BMI. if (exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bps', '', '', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', '', '', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'BMI', 'gt', '0', 'ge', 1, '', '', $endDate)) { return true; } else { return false; } }
public function test(AmcPatient $patient, $beginDate, $endDate) { //If height/length, weight, and blood pressure (all) within scope of practice (Optional 2013; Required effective 2014): //Patients 3 years of age or older in the denominator for whom Height/length, weight, and blood pressure are recorded //Patients younger than 3 years of age in the denominator for whom height/length and weight are recorded if ($patient->calculateAgeOnDate($endDate) >= 3 && exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate) || $patient->calculateAgeOnDate($endDate) < 3 && exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate) && exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate)) { return true; } else { return false; } }
/** * Function to check database filters and targets * * @param string $patient_id pid of selected patient. * @param array $filter array containing filter/target elements * @param array $interval array containing interval elements * @param string $dateTarget target date(format Y-m-d H:i:s). blank is current date. * @return boolean true if check passed, otherwise false */ function database_check($patient_id, $filter, $interval = '', $dateTarget = '') { $isMatch = false; //matching flag // Set date to current if not set $dateTarget = $dateTarget ? $dateTarget : date('Y-m-d H:i:s'); // Unpackage interval information // (Assume only one for now and only pertinent for targets) $intervalType = ''; $intervalValue = ''; if (!empty($interval)) { $intervalType = $interval[0]['value']; $intervalValue = $interval[0]['interval']; } foreach ($filter as $row) { // Row description // [0]=>special modes $temp_df = explode("::", $row['value']); if ($temp_df[0] == "CUSTOM") { // Row description // [0]=>special modes(CUSTOM) [1]=>category [2]=>item [3]=>complete? [4]=>number of hits comparison [5]=>number of hits if (exist_custom_item($patient_id, $temp_df[1], $temp_df[2], $temp_df[3], $temp_df[4], $temp_df[5], $intervalType, $intervalValue, $dateTarget)) { // Record the match $isMatch = true; } else { // If this is a required entry then return false if ($row['required_flag']) { return false; } } } else { if ($temp_df[0] == "LIFESTYLE") { // Row description // [0]=>special modes(LIFESTYLE) [1]=>column [2]=>status if (exist_lifestyle_item($patient_id, $temp_df[1], $temp_df[2], $dateTarget)) { // Record the match $isMatch = true; } else { // If this is a required entry then return false if ($row['required_flag']) { return false; } } } else { // Default mode // Row description // [0]=>special modes(BLANK) [1]=>table [2]=>column [3]=>value comparison [4]=>value [5]=>number of hits comparison [6]=>number of hits if (exist_database_item($patient_id, $temp_df[1], $temp_df[2], $temp_df[3], $temp_df[4], $temp_df[5], $temp_df[6], $intervalType, $intervalValue, $dateTarget)) { // Record the match $isMatch = true; } else { // If this is a required entry then return false if ($row['required_flag']) { return false; } } } } } // return results of check return $isMatch; }