本文整理汇总了PHP中CMediusers::loadRefFunction方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::loadRefFunction方法的具体用法?PHP CMediusers::loadRefFunction怎么用?PHP CMediusers::loadRefFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::loadRefFunction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadRefMetaObject
/**
* Load object
*
* @return CMbObject|CMediusers
*/
function loadRefMetaObject()
{
$this->_ref_metaobject = CMbMetaObject::loadFromGuid("{$this->object_class}-{$this->object_id}");
if ($this->object_class == "CMediusers") {
$this->_ref_mediuser = $this->_ref_metaobject;
$this->_ref_mediuser->loadRefFunction();
}
return $this->_ref_metaobject;
}
示例2: loadRefUser
/**
* Charge l'utilisateur qui a enregistré la première fois la constante
*
* @return CMediusers
*/
function loadRefUser()
{
if (!$this->user_id) {
$first_log = $this->loadFirstLog();
$this->_ref_user = $first_log->loadRefUser();
$this->_ref_user->loadRefMediuser()->loadRefFunction();
$this->user_id = $this->_ref_user->_id;
$this->store();
return $this->_ref_user = $this->_ref_user->_ref_mediuser;
}
$this->_ref_user = $this->loadFwdRef("user_id", true);
$this->_ref_user->loadRefFunction();
return $this->_ref_user;
}
示例3: array
}
// Sejours pour lesquels le rééducateur est exécutant pour des lignes prescrites mais n'a pas encore d'evenement planifiés
if ($mode == "count" || $mode == "plannable") {
if (!CModule::getActive("dPprescription")) {
$counts["plannable"] = null;
$sejours = array();
} else {
// Séjours élligibles
$where = array();
$where["sejour.type"] = "= 'ssr'";
$where["sejour.entree"] = "<= '{$planning->date_max}'";
$where["sejour.sortie"] = ">= '{$planning->date_min}'";
$where["sejour.annule"] = "= '0'";
$sejour_ids = $sejour->loadIds($where);
// Identifiants de catégorie de prescriptions disponibles
$function = $mediuser->loadRefFunction();
$executants = $function->loadBackRefs("executants_prescription");
$category_ids = CMbArray::pluck($executants, "category_prescription_id");
// Recherche des lignes de prescriptions executables
$line = new CPrescriptionLineElement();
$join = array();
$where = array();
$join["element_prescription"] = "element_prescription.element_prescription_id = prescription_line_element.element_prescription_id";
$where["element_prescription.category_prescription_id"] = $ds->prepareIn($category_ids);
$join["prescription"] = "prescription.prescription_id = prescription_line_element.prescription_id";
$where["prescription.type"] = "= 'sejour'";
$where["prescription.object_class"] = "= 'CSejour'";
$where["prescription.object_id"] = $ds->prepareIn($sejour_ids);
$line_ids = $line->loadIds($where, null, null, null, $join);
// Prescriptions exécutables
$query = new CRequest();
示例4: foreach
}
foreach ($_sejour->_ref_documents as $_doc) {
$_doc->canDo();
}
}
}
}
// Praticien concerné
$user = CMediusers::get();
if ($user->isPraticien()) {
$praticien = $user;
} else {
$praticien = new CMediusers();
$praticien->load(CValue::getOrSession("pratSel", CValue::getOrSession("praticien_id")));
}
$praticien->loadRefFunction();
$praticien->_ref_function->loadRefGroup();
$praticien->canDo();
// Compter les modèles d'étiquettes
$modele_etiquette = new CModeleEtiquette();
$where = array();
$where['object_class'] = "= 'COperation'";
$where["group_id"] = " = '" . CGroups::loadCurrent()->_id . "'";
$nb_modeles_etiquettes_operation = $modele_etiquette->countList($where);
$where['object_class'] = "= 'CSejour'";
$nb_modeles_etiquettes_sejour = $modele_etiquette->countList($where);
$nb_printers = 0;
if (CModule::getActive("printing")) {
// Chargement des imprimantes pour l'impression d'étiquettes
$user_printers = CMediusers::get();
$function = $user_printers->loadRefFunction();
示例5: CMediusers
$debut = CMbDT::date("next monday", $debut);
$fin = CMbDT::date("next sunday", $debut);
// L'utilisateur est-il praticien ?
$chir = null;
$mediuser = CMediusers::get();
if ($mediuser->isPraticien()) {
$chir = $mediuser;
}
// Praticien selectionné
$chirSel = CValue::getOrSession("praticien_id");
if (!$chirSel) {
$chirSel = $chir ? $chir->user_id : null;
}
$prat = new CMediusers();
$prat->load($chirSel);
$function_prat = $prat->loadRefFunction();
$user = new CMediusers();
$nbjours = 7;
$listPlageConsult = new CPlageconsult();
$listPlageOp = new CPlageOp();
$where = array();
$where["date"] = "= '{$fin}'";
$where["chir_id"] = " = '{$chirSel}'";
$operation = new COperation();
$operation->chir_id = $chirSel;
$operation->date = $fin;
// find for day number
if (!$listPlageConsult->countList($where) && !$listPlageOp->countList($where) && !$operation->countMatchingList()) {
$nbjours--;
// Aucune plage le dimanche, on peut donc tester le samedi.
$dateArr = CMbDT::date("-1 day", $fin);
示例6: CMediusers
* $Id: $
*
* @package Mediboard
* @subpackage Cabinet
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: $
*/
CCanDo::checkRead();
$chir_id = CValue::get("chir_id");
$field_name = CValue::get("field_name", "_secondary_function_id");
$empty_function_principale = CValue::get("empty_function_principale", 0);
$type_onchange = CValue::get("type_onchange", "consult");
$change_active = CValue::get("change_active", "1");
$chir = new CMediusers();
$chir->load($chir_id);
$chir->loadRefFunction()->loadRefGroup();
/** @var CSecondaryFunction[] $_functions */
$_functions = $chir->loadBackRefs("secondary_functions");
CMbObject::massLoadFwdRef(CMbArray::pluck($_functions, "_ref_function"), "group_id");
foreach ($_functions as $_function) {
$_function->_ref_function->loadRefGroup();
}
$smarty = new CSmartyDP();
$smarty->assign("_functions", $_functions);
$smarty->assign("chir", $chir);
$smarty->assign("field_name", $field_name);
$smarty->assign("empty_function_principale", $empty_function_principale);
$smarty->assign("type_onchange", $type_onchange);
$smarty->assign("change_active", $change_active);
$smarty->display("inc_refresh_secondary_functions.tpl");
示例7: CMediusers
$chir_id = CValue::getOrSession("chir_id");
$mediuser = CMediusers::get($chir_id);
if (!$mediuser->isPraticien()) {
$mediuser = new CMediusers();
}
$function_id = CValue::getOrSession("function_id");
$type = CValue::getOrSession("type", "interv");
$page = CValue::get("page");
$sejour_type = CValue::get("sejour_type");
$step = 30;
$protocole = new CProtocole();
$where = array();
$chir = new CMediusers();
$chir->load($chir_id);
if ($chir->_id) {
$chir->loadRefFunction();
$functions = array($chir->function_id);
$chir->loadBackRefs("secondary_functions");
foreach ($chir->_back["secondary_functions"] as $curr_sec_func) {
$functions[] = $curr_sec_func->function_id;
}
$list_functions = implode(",", $functions);
$where[] = "protocole.chir_id = '{$chir->_id}' OR protocole.function_id IN ({$list_functions})";
} else {
$where["function_id"] = " = '{$function_id}'";
}
$where["for_sejour"] = $type == 'interv' ? "= '0'" : "= '1'";
if ($sejour_type) {
$where["type"] = "= '{$sejour_type}'";
}
$order = "libelle_sejour, libelle, codes_ccam";
示例8: loadAides
/**
* Charge toutes les aides à la saisie de l'objet pour un utilisateur donné
*
* @param int $user_id Utilisateur
* @param string $keywords Permet de filtrer les aides commançant par le filtre, si non null
* @param string $depend_value_1 Valeur de la dépendance 1 lié à l'aide
* @param string $depend_value_2 Valeur de la dépendance 2 lié à l'aide
* @param string $object_field Type d'objet concerné
* @param string $strict True or False
*
* @return void
*/
function loadAides($user_id, $keywords = null, $depend_value_1 = null, $depend_value_2 = null, $object_field = null, $strict = "true")
{
foreach ($this->_specs as $field => $spec) {
if (isset($spec->helped)) {
$this->_aides[$field] = array("no_enum" => null);
}
}
// Chargement de l'utilisateur courant
$user = new CMediusers();
$user->load($user_id);
$user->loadRefFunction();
// Préparation du chargement des aides
$ds =& $this->_spec->ds;
// Construction du Where
$where = array();
$where[] = "(user_id = '{$user_id}' OR \n function_id = '{$user->function_id}' OR \n group_id = '{$user->_ref_function->group_id}')";
$where["class"] = $ds->prepare("= %", $this->_class);
if ($strict == "true") {
if ($depend_value_1) {
$where["depend_value_1"] = " = '{$depend_value_1}'";
}
if ($depend_value_2) {
$where["depend_value_2"] = " = '{$depend_value_2}'";
}
} else {
if ($depend_value_1) {
$where[] = "(depend_value_1 = '{$depend_value_1}' OR depend_value_1 IS NULL)";
}
if ($depend_value_2) {
$where[] = "(depend_value_2 = '{$depend_value_2}' OR depend_value_2 IS NULL)";
}
}
if ($object_field) {
$where["field"] = " = '{$object_field}'";
}
// tri par user puis function puis group (ordre inversé pour avoir ce résultat)
$order = "group_id, function_id, user_id, depend_value_1, depend_value_2, name, text";
// Chargement des Aides de l'utilisateur
$aide = new CAideSaisie();
// TODO: si on veut ajouter un $limit, il faudrait l'ajouter en argument de la fonction loadAides
$aides = $aide->seek($keywords, $where, null, null, null, $order);
$this->orderAides($aides, $depend_value_1, $depend_value_2);
}
示例9: CPlageconsult
*/
CCanDo::checkEdit();
// Période
$filter = new CPlageconsult();
$filter->_date_min = CValue::getOrSession("_date_min");
$filter->_date_max = CValue::getOrSession("_date_max");
// Tri sur les praticiens
$mediuser = CMediusers::get();
$mediuser->loadRefFunction();
$prat = new CMediusers();
$prat->load(CValue::getOrSession("chir"));
if (!$prat->_id) {
CAppUI::stepMessage(UI_MSG_WARNING, "CMediusers-warning-undefined");
return;
}
$prat->loadRefFunction();
$listPrat = array($prat->_id => $prat);
$plageconsult = new CPlageconsult();
$ljoin = array();
$ljoin["consultation"] = "consultation.plageconsult_id = plageconsult.plageconsult_id";
$where = array();
$where[] = "\n (plageconsult.chir_id <> '{$prat->_id}' AND \n (plageconsult.remplacant_id = '{$prat->_id}' OR plageconsult.pour_compte_id = '{$prat->_id}'))\n OR \n (plageconsult.chir_id = '{$prat->_id}' AND \n ((plageconsult.remplacant_id <> '{$prat->_id}' AND plageconsult.remplacant_id IS NOT NULL)\n OR \n (plageconsult.pour_compte_id <> '{$prat->_id}' AND plageconsult.pour_compte_id IS NOT NULL))\n )";
$where["plageconsult.date"] = " BETWEEN '{$filter->_date_min}' AND '{$filter->_date_max}'";
$where["consultation.annule"] = "= '0'";
$order = "chir_id ASC";
$listPlages = $plageconsult->loadList($where, $order, null, null, $ljoin);
$plages = array();
foreach ($listPlages as $plage) {
$plage->loadRefsConsultations();
$plages[$plage->_id]["total"] = 0;
foreach ($plage->_ref_consultations as $consult) {
示例10: editFacture
/**
* Edition de la facture
*
* @param bool $create création ou non du pdf
*
* @return void
*/
function editFacture($create = true)
{
if ($create) {
$this->createPdf();
}
foreach ($this->factures as $the_facture) {
$this->facture = $the_facture;
$this->facture->loadRefsItems();
$this->_no_round = false;
if ($this->facture->cloture && !count($this->facture->_ref_items)) {
$this->facture->creationLignesFacture();
}
$this->patient = $this->facture->loadRefPatient();
$this->facture->_ref_patient->loadRefsCorrespondantsPatient();
$this->praticien = $this->facture->loadRefPraticien();
$this->facture->loadRefAssurance();
$this->facture->loadRefsObjects();
$this->facture->loadRefsReglements();
if ($this->type_pdf == "relance") {
$this->facture->loadRefsRelances();
}
$this->function_prat = $this->praticien->loadRefFunction();
$this->group = $this->function_prat->loadRefGroup();
$adherent = $this->facture->loadNumAdherent($this->praticien->adherent);
$this->adherent = $adherent["compte"];
if ($this->type_pdf == "BVR") {
$this->loadTotaux();
$this->acompte = 0;
$this->nb_factures = count($this->facture->_montant_factures_caisse);
$this->num_fact = 0;
foreach ($this->facture->_montant_factures_caisse as $cle_facture => $montant_facture) {
if ($this->acompte < $this->facture->_montant_avec_remise) {
$this->editHautFacture($cle_facture, $montant_facture);
$this->editBVR($montant_facture);
}
}
}
if ($this->type_pdf == "BVR_TS") {
$this->loadTotaux();
$this->acompte = 0;
$this->nb_factures = count($this->facture->_montant_factures_caisse);
$this->num_fact = 0;
$montant = 0;
if ($this->acompte < $this->facture->_montant_avec_remise) {
$montant = $this->facture->_montant_avec_remise - $this->facture->_reglements_total_patient;
$montant = $montant - $this->facture->_reglements_total_tiers;
$this->editHautFacture(" ", $montant);
$this->editBVR($montant);
}
$this->type_pdf = "justif_TS";
$this->function_prat->adresse = str_replace("\r\n", ' ', $this->function_prat->adresse);
$this->patient->adresse = str_replace("\r\n", ' ', $this->patient->adresse);
$this->editCenterJustificatif(0, $montant);
} elseif ($this->type_pdf == "justif") {
$this->function_prat->adresse = str_replace("\r\n", ' ', $this->function_prat->adresse);
$this->patient->adresse = str_replace("\r\n", ' ', $this->patient->adresse);
foreach ($this->facture->_montant_factures_caisse as $cle_facture => $montant_facture) {
$this->editCenterJustificatif($cle_facture, $montant_facture);
}
} elseif ($this->type_pdf == "relance") {
$this->editRelanceEntete();
//$this->editHautFacture(1, $this->relance->_montant, true);
if (CAppUI::conf("ref_pays") == 2) {
$this->editBVR($this->relance->_montant);
}
}
}
}
示例11: loadForDays
/**
* load plages for a day or between 2 days
* check for chir, anesth or function of given prat_id
*
* @param string $prat_id prat_id (mediuser_id)
* @param string $date_min date min to check
* @param null|string $date_max date max
*
* @return CPlageOp[]
*/
function loadForDays($prat_id, $date_min, $date_max = null)
{
$prat = new CMediusers();
$prat->load($prat_id);
$function = $prat->loadRefFunction();
$where = array();
$where[] = "chir_id = '{$prat_id}' OR anesth_id = '{$prat_id}' OR spec_id = '{$function->_id}'";
$where["date"] = $date_max ? "BETWEEN '{$date_min}' AND '{$date_max}'" : " = '{$date_min}'";
return $this->loadList($where);
}
示例12: loadRefValidator
/**
* Get validator
*
* @return CMediusers
*/
function loadRefValidator()
{
$this->_ref_validator = $this->loadFwdRef("validator_id", true);
$this->_ref_validator->loadRefFunction();
return $this->_ref_validator;
}
示例13: constant
}
if ($order_col == "lit_id") {
$sorter_lit = CMbArray::pluck($sejours, "_ref_curr_affectation", "_ref_lit", "_view");
$sorter_patient_nom = CMbArray::pluck($sejours, "_ref_patient", "nom");
$sorter_patient_prenom = CMbArray::pluck($sejours, "_ref_patient", "prenom");
array_multisort($sorter_lit, constant("SORT_{$order_way}"), $sorter_patient_nom, SORT_ASC, $sorter_patient_prenom, SORT_ASC, $sejours);
}
// Ajustements services
$service = new CService();
$service->load($filter->service_id);
$services[$service->_id] = $service;
unset($services[""]);
// Ajustements kinés
$kine = new CMediusers();
$kine->load($filter->referent_id);
$kine->loadRefFunction();
$kines[$kine->_id] = $kine;
unset($kines[""]);
// Tris a posteriori : détruit les clés !
array_multisort(CMbArray::pluck($kines, "_view"), SORT_ASC, $kines);
array_multisort(CMbArray::pluck($services, "_view"), SORT_ASC, $services);
array_multisort(CMbArray::pluck($praticiens, "_view"), SORT_ASC, $praticiens);
// Couleurs
$libelles = CMbArray::pluck($sejours, "libelle");
$colors = CColorLibelleSejour::loadAllFor($libelles);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("filter", $filter);
$smarty->assign("colors", $colors);
$smarty->assign("sejours", $sejours);
示例14: getSpecialModel
/**
* Retourne un modèle de nom prédéfini pour un utilisateur et une classe donnés
*
* @param CMediusers $user User
* @param string $object_class Target Class
* @param string $name Model Name
*
* @return CCompteRendu|null
*/
static function getSpecialModel($user, $object_class, $name)
{
if (!isset(self::$special_names[$object_class][$name])) {
self::error("no_special", $object_class, $name);
return null;
}
$model = new CCompteRendu();
if (!$user->_id) {
return $model;
}
$model->nom = $name;
$model->object_class = $object_class;
$model->type = CCompteRendu::$special_names[$object_class][$name];
// Utilisateur
$model->user_id = $user->_id;
$model->loadMatchingObject();
if ($model->_id) {
return $model;
}
// Fonction
$model->user_id = null;
$model->function_id = $user->function_id;
$model->loadMatchingObject();
if ($model->_id) {
return $model;
}
// Etablissement
$user->loadRefFunction();
$model->function_id = null;
$model->group_id = $user->_ref_function->group_id;
$model->loadMatchingObject();
return $model;
}
示例15: array
$where = array("actif" => "='1'");
$functions = $function->loadListWithPerms(PERM_READ, $where);
}
// Récupération du user à ajouter/editer
$object = new CMediusers();
if (CValue::get("no_association")) {
$object->user_id = $user_id;
$object->updateFormFields();
$object->_user_id = $user_id;
$object->_id = null;
$object->actif = CValue::get("ldap_user_actif", 1);
$object->deb_activite = CValue::get("ldap_user_deb_activite");
$object->fin_activite = CValue::get("ldap_user_fin_activite");
} else {
$object->load($user_id);
$object->loadRefFunction();
$object->loadRefProfile();
}
$object->loadNamedFile("identite.jpg");
$object->loadNamedFile("signature.jpg");
// Savoir s'il est relié au LDAP
if (isset($object->_ref_user)) {
$object->_ref_user->isLDAPLinked();
}
// Chargement des banques
$banques = array();
if (class_exists("CBanque")) {
$order = "nom ASC";
$banque = new CBanque();
$banques = $banque->loadList(null, $order);
}