/** * $Id$ * * @package Mediboard * @subpackage Cabinet * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $patient_id = CValue::get("patient_id"); $patient = new CPatient(); $patient->load($patient_id); $listPrat = CConsultation::loadPraticiens(PERM_EDIT, null, null, null, false); $patient->loadRefsDocItems(); foreach ($patient->_ref_files_by_cat as $cat => $files_by_cat) { foreach ($files_by_cat as $key => $_file) { if ($_file->annule) { unset($patient->_ref_files_by_cat[$cat][$key]); } } } $where = array(); $where["plageconsult.chir_id"] = CSQLDataSource::prepareIn(array_keys($listPrat)); $patient->loadRefsConsultations($where); $patient->loadRefsSejours(); $dossier_medical = $patient->loadRefDossierMedical(); $dossier_medical->loadRefsAntecedents(); $dossier_medical->loadRefsTraitements(); $prescription = $dossier_medical->loadRefPrescription();