2 // Copyright (C) 2011 Ken Chapple <ken@mi-squared.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 require_once( 'ClinicalType.php' );
11 class Communication
extends ClinicalType
13 const DIET_CNSLT
= 'comm_diet_cnslt'; // communication provider to provider: dietary consultation order
14 const COUNS_NUTRITION
= 'comm_couns_nutrition'; // Communication to patient: counseling for nutrition
15 const COUNS_PHYS_ACTIVITY
= 'comm_couns_phys_activity'; // Communication to patient: counseling for physical activity
16 const PREV_RECEIPT_VACCINE
= 'comm_previous_receipt_vaccine';
17 public function getListId() {
18 return 'Clinical_Rules_Comm_Types';
21 public function doPatientCheck( RsPatient
$patient, $beginDate = null, $endDate = null, $options = null )
23 // TODO Read from referrals to check for ditary consult?
24 // TODO How to check for patient communication?
25 // for now, check for any encounter
26 $encounters = getEncounters( $patient->id
, $beginDate, $endDate );
27 ( empty($encounters) ) ?
$totalNumberAppt = 0 : $totalNumberAppt = count( $encounters );
28 if ( $totalNumberAppt < 1 ) {