本文整理汇总了PHP中COperation::loadAffectationsPersonnel方法的典型用法代码示例。如果您正苦于以下问题:PHP COperation::loadAffectationsPersonnel方法的具体用法?PHP COperation::loadAffectationsPersonnel怎么用?PHP COperation::loadAffectationsPersonnel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperation
的用法示例。
在下文中一共展示了COperation::loadAffectationsPersonnel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: COperation
* @version $Revision$
*/
// @todo bloc n'est pas forcément actif
global $can;
$can->read |= CModule::getActive("dPbloc")->_can->read;
$can->needsRead();
$operation_id = CValue::getOrSession("operation_id", null);
$operation = new COperation();
$operation->load($operation_id);
$operation->loadRefsAnesthPerops();
$operation->loadRefsFwd();
$operation->loadRefsActesCCAM();
foreach ($operation->_ref_actes_ccam as $acte) {
$acte->loadRefsFwd();
}
$operation->loadAffectationsPersonnel();
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
$operation->guessActesAssociation();
} else {
foreach ($operation->_ref_actes_ccam as $acte) {
$acte->guessAssociation();
}
}
$operation->loadRefSortieLocker()->loadRefFunction();
$sejour = $operation->_ref_sejour;
$sejour->loadRefsFwd();
$sejour->loadRefPrescriptionSejour();
/** @var CAdministration[] $administrations */
$administrations = array();
$prescription_id = null;
if (CModule::getActive("dPprescription")) {
示例2: buildEventsGrid
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;
}