$arbre = $med->getCodeNiveauSup($arbre); if ($arbre) { $diags_actes[] = $arbre; } } while ($arbre); } } $mix = $_ref_object->_ref_prescription_sejour->loadRefsPrescriptionLineMixes(); foreach ($_ref_object->_ref_prescription_sejour->_ref_prescription_line_mixes as $_mix) { foreach ($_mix->loadRefsLines() as $item) { if ($item->atc) { $arbre = $item->atc; $diags_actes[] = $item->atc; do { $med = new CMedicamentClasseATC(); $arbre = $med->getCodeNiveauSup($arbre); if ($arbre) { $diags_actes[] = $arbre; } } while ($arbre); } } } // récupération des favoris avec cibles pour le dossier de soins if (isset($diags_actes)) { $diags_actes = array_unique($diags_actes); $list = array("CCodeCIM10", "CCodeCCAM", "CMedicamentClasseATC"); $where["object_class"] = " " . CSQLDataSource::prepareIn($list); $where["object_id"] = " " . CSQLDataSource::prepareIn($diags_actes); $targets = $targets->loadList($where); $tab_favoris_id = array();