コード例 #1
0
    }
    // Si tout est coté, on n'affiche pas l'opération
    if ($nb_actes_ccam >= $nbCodes) {
        unset($consultations[$key]);
        continue;
    }
    $_consult->_actes_non_cotes = $nbCodes - $nb_actes_ccam;
    $_consult->loadRefsFwd();
    $_consult->loadRefSejour();
    $_consult->loadRefPraticien()->loadRefFunction();
    // Liste des actes CCAM cotées
    foreach ($_consult->loadRefsActesCCAM() as $_acte) {
        $_acte->loadRefExecutant();
    }
}
$consultations = CModelObject::naturalSort($consultations, array("_date"));
if (!$export) {
    $smarty = new CSmartyDP();
    $smarty->assign("totals", $totals);
    $smarty->assign("interventions", $interventions);
    $smarty->assign("consultations", $consultations);
    $smarty->assign("debut", $debut);
    $smarty->assign("fin", $fin);
    $smarty->assign("all_prats", $all_prats);
    $smarty->assign("board", CValue::get("board", 0));
    $smarty->assign('interv_with_no_codes', $interv_with_no_codes);
    $smarty->assign('display_not_exported', CValue::get('display_not_exported', 0));
    $smarty->display("../../dPboard/templates/inc_list_interv_non_cotees.tpl");
} else {
    $csv = new CCSVFile();
    $line = array("Praticiens", "Patient", "Evènement", "Actes Non cotés", "Codes prévus", "Actes cotés");
コード例 #2
0
 static function buildEventsGrid(COperation $interv, $time_debut_op_iso, $time_fin_op_iso, $time_min, $time_max)
 {
     // ---------------------------------------------------
     // Gestes, Medicaments, Perfusions peranesth
     $evenements = array("CAnesthPerop" => array(), "CAffectationPersonnel" => array());
     // Personnel de l'interv
     $interv->loadAffectationsPersonnel();
     foreach ($interv->_ref_affectations_personnel as $affectations) {
         foreach ($affectations as $_affectation) {
             if (!$_affectation->debut || !$_affectation->fin) {
                 continue;
             }
             $evenements["CAffectationPersonnel"][$_affectation->_id] = array("icon" => null, "label" => $_affectation->_ref_personnel, "unit" => null, "alert" => false, "datetime" => $_affectation->debut, "position" => CSupervisionTimedEntity::getPosition($_affectation->debut, $time_min, $time_max), "width" => CSupervisionTimedEntity::getWidth($_affectation->debut, $_affectation->fin, $time_min, $time_max), "object" => $_affectation, "editable" => false);
         }
     }
     // Personnel de la plage
     $plageop = $interv->_ref_plageop;
     $plageop->loadAffectationsPersonnel();
     foreach ($plageop->_ref_affectations_personnel as $affectations) {
         foreach ($affectations as $_affectation) {
             if (!$_affectation->debut || !$_affectation->fin) {
                 continue;
             }
             $evenements["CAffectationPersonnel"][$_affectation->_id] = array("icon" => null, "label" => $_affectation->_ref_personnel, "unit" => null, "alert" => false, "datetime" => $_affectation->debut, "position" => CSupervisionTimedEntity::getPosition($_affectation->debut, $time_min, $time_max), "width" => CSupervisionTimedEntity::getWidth($_affectation->debut, $_affectation->fin, $time_min, $time_max), "object" => $_affectation, "editable" => false);
         }
     }
     // Gestes perop
     $interv->loadRefsAnesthPerops();
     foreach ($interv->_ref_anesth_perops as $_perop) {
         $evenements["CAnesthPerop"][$_perop->_id] = array("icon" => null, "label" => $_perop->libelle, "unit" => null, "alert" => $_perop->incident, "datetime" => $_perop->datetime, "position" => CSupervisionTimedEntity::getPosition($_perop->datetime, $time_min, $time_max), "object" => $_perop, "editable" => true);
     }
     // Lignes de medicaments et d'elements
     $sejour = $interv->loadRefSejour();
     $prescription = $sejour->loadRefPrescriptionSejour();
     if ($prescription->_id) {
         $lines = $prescription->loadPeropLines(false);
         foreach ($lines as $_line_array) {
             $_line = $_line_array["object"];
             $key = "CPrescription._chapitres.{$_line->_chapitre}";
             if (!isset($evenements[$key])) {
                 $evenements[$key] = array("subitems" => array(), "icon" => $_line->_chapitre);
             }
             // Build view
             $_subkey = array("line" => $_line, "label" => "");
             $_view = "";
             if ($_line instanceof CPrescriptionLineElement) {
                 $_view = $_line->_view;
             } elseif ($_line instanceof CPrescriptionLineMix) {
                 foreach ($_line->_ref_lines as $_mix_item) {
                     $_view .= "{$_mix_item->_ucd_view} / ";
                 }
             } else {
                 $_view = $_line->_ucd_view;
             }
             $_subkey["label"] = $_view;
             $_subkey_guid = $_subkey["line"]->_guid;
             if (!isset($evenements[$key]["subitems"][$_subkey_guid])) {
                 $evenements[$key]["subitems"][$_subkey_guid] = array("label" => $_subkey["label"], "line" => $_line, "items" => array());
             }
             foreach ($_line_array["administrations"] as $_adms) {
                 $_adms = CModelObject::naturalSort($_adms, array("dateTime"));
                 foreach ($_adms as $_adm) {
                     $unite = "";
                     if ($_line instanceof CPrescriptionLineMedicament || $_line instanceof CPrescriptionLineMix) {
                         $unite = $_adm->_ref_object->_ref_produit->libelle_unite_presentation;
                     }
                     $evenements[$key]["subitems"][$_subkey_guid]["items"][] = array("label" => "", "unit" => "{$_adm->quantite} {$unite}", "alert" => false, "datetime" => $_adm->dateTime, "position" => CSupervisionTimedEntity::getPosition($_adm->dateTime, $time_min, $time_max), "object" => $_adm, "editable" => false);
                 }
             }
         }
     }
     return $evenements;
 }
コード例 #3
0
ファイル: CRPU.class.php プロジェクト: fbone/mediboard4
 /**
  * Charge toutes les réponses du RPU
  *
  * @return CMotifReponse[]
  */
 function loadRefsReponses()
 {
     $this->_ref_reponses = $this->loadBackRefs("reponses_rpu");
     return $this->_ref_reponses = CModelObject::naturalSort($this->_ref_reponses, array("_degre"));
 }
コード例 #4
0
$where["type"] = "= 'body'";
// Niveau utilisateur
$where["user_id"] = " = '{$curr_user->_id}'";
if ($user->canEdit()) {
    $where["user_id"] = "IN ('{$user->_id}', '{$curr_user->_id}')";
}
$modeles = $compte_rendu->seek($keywords, $where, 100, false, null, "nom");
// Niveau fonction
// Inclusion des fonctions secondaires de l'utilisateur connecté
// et de l'utilisateur concerné
unset($where["user_id"]);
$sec_function = new CSecondaryFunction();
$whereSecFunc = array();
$whereSecFunc["user_id"] = " = '{$curr_user->_id}'";
if ($user->canEdit()) {
    $whereSecFunc["user_id"] = "IN ('{$user->_id}', '{$curr_user->_id}')";
}
$function_sec = $sec_function->loadList($whereSecFunc);
$function_ids = array_merge(CMbArray::pluck($function_sec, "function_id"), array($user->function_id, $curr_user->function_id));
$where["function_id"] = CSQLDataSource::prepareIn($function_ids);
$modeles = array_merge($modeles, $compte_rendu->seek($keywords, $where, 100, false, null, "nom"));
// Niveau établissement
unset($where["function_id"]);
$where["group_id"] = " = '{$user->_group_id}'";
$modeles = array_merge($modeles, $compte_rendu->seek($keywords, $where, 100, false, null, "nom"));
$modeles = CModelObject::naturalSort($modeles, array("nom"), true);
$smarty = new CSmartyDP();
$smarty->assign("modeles", $modeles);
$smarty->assign("nodebug", true);
$smarty->assign("keywords", $keywords);
$smarty->display("inc_modele_autocomplete.tpl");