コード例 #1
0
 /**
  * Method to load the target object of thesaurus target
  *
  * @return CActeNGAP|CCodeCCAM|CCodeCIM10
  */
 function loadRefTarget()
 {
     if ($this->object_class && $this->object_id) {
         switch ($this->object_class) {
             case "CCodeCIM10":
                 $object = new CCodeCIM10();
                 $object->code = $this->object_id;
                 $object->loadLite();
                 $this->_ref_target = $object;
                 break;
             case "CCodeCCAM":
                 $object = new CCodeCCAM($this->object_id);
                 $object->load();
                 $this->_ref_target = $object;
                 break;
             case "CActeNGAP":
                 $object = new CActeNGAP();
                 $object->code = $this->object_id;
                 $object->loadMatchingObject();
                 $this->_ref_target = $object;
                 break;
             case "CMedicamentClasseATC":
                 $object = new CMedicamentClasseATC();
                 $niveau = $object->getNiveau($this->object_id);
                 $object->loadClasseATC($niveau, $this->object_id);
                 $this->_ref_target = $object;
                 break;
             default:
                 // nothing to do
                 break;
         }
     }
     return $this->_ref_target;
 }
コード例 #2
0
ファイル: vw_search_auto.php プロジェクト: fbone/mediboard4
             $med = new CMedicamentClasseATC();
             $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);
コード例 #3
0
 * @link     http://www.mediboard.org */
CCanDo::checkRead();
$thesaurus_entry_id = CValue::get("thesaurus_entry", null);
$search_agregation = CValue::get("search_agregation", null);
$search_body = CValue::get("search_body", null);
$search_user_id = CValue::get("search_user_id", null);
$search_types = CValue::get("search_types", null);
$search_contexte = CValue::get("search_contexte", null);
$thesaurus_entry = new CSearchThesaurusEntry();
if ($thesaurus_entry_id) {
    $thesaurus_entry->load($thesaurus_entry_id);
    $search_types = explode("|", $thesaurus_entry->types);
    $thesaurus_entry->loadRefsTargets();
    foreach ($thesaurus_entry->_atc_targets as $_target) {
        foreach ($_target->_ref_target as $_atc) {
            $object = new CMedicamentClasseATC();
            $_target->_libelle = $object->getLibelle($_target->object_id);
        }
    }
} else {
    $thesaurus_entry->agregation = $search_agregation;
    $thesaurus_entry->entry = $search_body;
    $thesaurus_entry->user_id = $search_user_id;
    $thesaurus_entry->types = is_array($search_types) ? implode(" ", $search_types) : explode(" ", $thesaurus_entry->types);
    $thesaurus_entry->contextes = $search_contexte;
}
$types = array();
$group = CGroups::loadCurrent();
if (CAppUI::conf("search active_handler active_handler_search_types", $group)) {
    $types = explode("|", CAppUI::conf("search active_handler active_handler_search_types", $group));
}