本文整理汇总了PHP中CMediusers::get方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::get方法的具体用法?PHP CMediusers::get怎么用?PHP CMediusers::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
/**
* @see parent::store()
*/
function store()
{
$this->completeField("handled");
if (!$this->creation_date) {
$this->creation_date = CMbDT::dateTime();
if ($this->_id) {
$this->creation_date = $this->loadFirstLog()->date;
}
}
if ($this->fieldModified("handled", "1") || $this->handled && !$this->handled_date && !$this->handled_user_id) {
$this->handled_date = CMbDT::dateTime();
$this->handled_user_id = CMediusers::get()->_id;
if ($this->handled) {
$last_log = $this->loadLastLog();
$this->handled_date = $last_log->date;
$this->handled_user_id = $last_log->user_id;
}
}
if ($this->fieldModified("handled", "0")) {
$this->handled_date = $this->handled_user_id = "";
}
if ($msg = parent::store()) {
return $msg;
}
}
示例2: logForSejour
/**
* logSejourAccess
*
* @param CSejour $sejour
*
* @return bool has the access been logged
*/
static function logForSejour($sejour)
{
$group = $sejour->loadRefEtablissement();
if (!CAppUI::conf("admin CLogAccessMedicalData enable_log_access", $group) || !$sejour->_id) {
return false;
}
$user = CMediusers::get();
$conf = CAppUI::conf("admin CLogAccessMedicalData round_datetime", $group);
$datetime = CMbDT::dateTime();
switch ($conf) {
case '1m':
// minute
$datetime = CMbDT::format($datetime, "%y-%m-%d %H:%M:00");
break;
case '10m':
// 10 minutes
$minute = CMbDT::format($datetime, "%M");
$minute = str_pad(floor($minute / 10) * 10, 2, 0, STR_PAD_RIGHT);
$datetime = CMbDT::format($datetime, "%y-%m-%d %H:{$minute}:00");
break;
case '1d':
// 1 day
$datetime = CMbDT::format($datetime, "%y-%m-%d 00:00:00");
break;
default:
// 1 hour
$datetime = CMbDT::format($datetime, "%y-%m-%d %H:00:00");
break;
}
return self::logintoDb($user->_id, $sejour->_class, $sejour->_id, $datetime, $group->_id);
}
示例3: getFieldAndObjectStatic
/**
* Get field and object corresponding to $field field
*
* @param CMbObject $object Object
* @param string $field Field name
*
* @return array
*/
static function getFieldAndObjectStatic(CMbObject $object, $field)
{
if (strpos($field, "CONNECTED_USER") === 0) {
$object = CMediusers::get();
if ($field != "CONNECTED_USER") {
$field = substr($field, 15);
}
}
return array($object, $field);
}
示例4: store
/**
* @see parent::store()
*/
function store()
{
// Save owner and creation date
if (!$this->_id) {
if (!$this->creation_date) {
$this->creation_date = CMbDT::dateTime();
}
if (!$this->owner_id) {
$this->owner_id = CMediusers::get()->_id;
}
}
return parent::store();
}
示例5: store
/**
* @see parent::store()
*/
function store()
{
$this->completeField("operation_id");
if ($this->_id && $this->etat != "a_commander") {
if (CMediusers::get()->_id == $this->loadRefOperation()->chir_id) {
$this->etat = "modify";
}
}
// Standard storage
if ($msg = parent::store()) {
return $msg;
}
}
示例6: setDestinationActiveParticipant
public function setDestinationActiveParticipant()
{
$destination_active_participant = $this->msg_xml->addElement($this->audit_message, 'ActiveParticipant');
$MSH = $this->hl7_xml->queryNode("MSH", null, $foo, true);
$receiving_facility = $this->hl7_xml->queryTextNode("MSH.5/HD.1", $MSH);
$receiving_application = $this->hl7_xml->queryTextNode("MSH.6/HD.1", $MSH);
$this->msg_xml->addAttribute($destination_active_participant, 'UserID', "{$receiving_facility}|{$receiving_application}");
$this->msg_xml->addAttribute($destination_active_participant, 'AlternativeUserID', CMediusers::get()->_id);
$this->msg_xml->addAttribute($destination_active_participant, 'UserName', trim(CMediusers::get()));
$this->msg_xml->addAttribute($destination_active_participant, 'UserIsRequestor', "false");
$this->msg_xml->addAttribute($destination_active_participant, 'NetworkAccessPointID', $this->hostname);
$this->msg_xml->addAttribute($destination_active_participant, 'NetworkAccessPointTypeCode', "2");
$this->destination_active_participant = $destination_active_participant;
$this->setDestinationActiveParticipantRoleIDCode();
}
示例7: loadSalutations
/**
* Set starting and closing formulas
*
* @param integer|null $user_id Given owner id
*
* @return null
*/
function loadSalutations($user_id = null)
{
if (!$this->_id) {
return null;
}
$salutation = new CSalutation();
$salutation->owner_id = $user_id ? $user_id : CMediusers::get()->_id;
$salutation->object_class = $this->_class;
$salutation->object_id = $this->_id;
if ($salutation->loadMatchingObject()) {
$this->_starting_formula = $salutation->starting_formula;
$this->_closing_formula = $salutation->closing_formula;
} else {
$this->_starting_formula = CAppUI::tr('CSalutation-starting_formula|default');
$this->_closing_formula = CAppUI::tr('CSalutation-closing_formula|default');
}
}
示例8: loadAllSalutations
/**
* Load all salutation from a given class
*
* @param string $object_class Target object class
* @param integer|null $object_id Target object ID
* @param int $perm Permission needed on owners
* @param integer|null $owner_id Specific owner ID
*
* @return CSalutation[]
*/
static function loadAllSalutations($object_class, $object_id = null, $perm = PERM_EDIT, $owner_id = null)
{
if (!$owner_id) {
$users = new CMediusers();
$users = $users->loadListWithPerms($perm, array('actif' => "= '1'"));
$user_ids = $users ? CMbArray::pluck($users, '_id') : array(CMediusers::get()->_id);
unset($users);
} else {
$user_ids = array($owner_id);
}
/** @var CSalutation $salutation */
$salutation = new self();
$ds = $salutation->_spec->ds;
$where = array('owner_id' => $ds->prepareIn($user_ids), 'object_class' => $ds->prepare('= ?', $object_class));
if ($object_id) {
$where['object_id'] = $ds->prepare('= ?', $object_id);
}
return $salutation->loadList($where);
}
示例9: extractData
/**
* @see parent::extractData
*/
function extractData()
{
/** @var CCDAFactory $factory */
$factory = $this->mbObject;
$this->document = $factory->mbObject;
$this->targetObject = $factory->targetObject;
$this->id_classification = 0;
$this->id_external = 0;
$mediuser = CMediusers::get();
$specialty = $mediuser->loadRefOtherSpec();
$group = $mediuser->loadRefFunction()->loadRefGroup();
$identifiant = CXDSTools::getIdEtablissement(true, $group) . "/{$mediuser->_id}";
$this->specialty = $specialty->code . "^" . $specialty->libelle . "^" . $specialty->oid;
$this->xcn_mediuser = CXDSTools::getXCNMediuser($identifiant, $mediuser->_p_last_name, $mediuser->_p_first_name);
$this->xon_etablissement = CXDSTools::getXONetablissement($group->text, CXDSTools::getIdEtablissement(false, $group));
$this->xpath = new CMbXPath($factory->dom_cda);
$this->xpath->registerNamespace("cda", "urn:hl7-org:v3");
$this->patient_id = $this->getID($factory->patient, $factory->receiver);
$this->ins_patient = $this->getIns($factory->patient);
$uuid = CMbSecurity::generateUUID();
$this->uuid["registry"] = $uuid . "1";
$this->uuid["extrinsic"] = $uuid . "2";
$this->uuid["signature"] = $uuid . "3";
}
示例10: explode
* $Id: object_merger.php 22331 2014-03-06 11:13:46Z charlyecho $
*
* @package Mediboard
* @subpackage System
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 22331 $
*/
$objects_class = CValue::getOrSession('objects_class');
$readonly_class = CValue::get('readonly_class');
$objects_id = CValue::get('objects_id');
$mode = CValue::get('mode');
if (!is_array($objects_id)) {
$objects_id = explode("-", $objects_id);
}
$user = CMediusers::get();
CMbArray::removeValue("", $objects_id);
$objects = array();
$result = null;
$checkMerge = null;
$statuses = array();
$merge_type = null;
if (class_exists($objects_class) && count($objects_id)) {
foreach ($objects_id as $object_id) {
/** @var CMbObject $object */
$object = new $objects_class();
$merge_type = $object->_spec->merge_type;
if ($merge_type == 'none') {
CAppUI::stepAjax("Merging_%sclass_is_forbidden_by_spec", UI_MSG_ERROR, CAppUI::tr($object->_class));
}
// the CMbObject is loaded
示例11: array
<?php
/**
* $Id: ajax_edit_source_mediuser.php 27587 2015-03-18 09:31:32Z aurelie17 $
*
* @package Mediboard
* @subpackage mediusers
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 27587 $
*/
CCanDo::checkRead();
$user_id = CValue::getOrSession("user_id");
$mediuser = CMediusers::get($user_id);
// Source File system d'envoi
$fs_source_envoi = CExchangeSource::get("envoi-tarmed-{$mediuser->_guid}", "file_system", true, null, false);
// Source File system d'envoi
$fs_source_reception = CExchangeSource::get("reception-tarmed-{$mediuser->_guid}", "file_system", true, null, false);
$fs_sources_tarmed = array("fs_source_envoi" => array($fs_source_envoi), "fs_source_reception" => array($fs_source_reception));
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("fs_sources_tarmed", $fs_sources_tarmed);
$smarty->display("sources_archive.tpl");
示例12: loadListExecutants
/**
* Charge les exécutants possibles
*
* @return CMediusers[]|null Exécutants possible, null si exécutant déterminé
*/
function loadListExecutants()
{
$user = CMediusers::get();
$this->_list_executants = $user->loadProfessionnelDeSante(PERM_READ);
// No executant guess for the existing acte
if ($this->executant_id || $this->_id) {
return null;
}
// User executant
if (CAppUI::pref("user_executant")) {
$this->executant_id = $user->_id;
return null;
}
// Referring pratician executant
$praticien = $this->loadRefPraticien();
if ($praticien && $praticien->_id) {
$this->executant_id = $praticien->_id;
return null;
}
return $this->_list_executants;
}
示例13: foreach
// get data uri
foreach ($data as $_key => &$_data) {
$file = new CFile();
$file->load($_data["file_id"]);
$file->getDataURI();
$_data["file_uri"] = $file->_data_uri;
}
//user
$user = CMediusers::get($user_id);
// file
$file = new CFile();
$file->setObject($context);
$file->file_name = CAppUI::tr("CFile-create-mozaic") . " de " . CAppUI::tr($context->_class) . " du " . CMbDT::dateToLocale(CMbDT::date()) . ".pdf";
$file->file_type = "application/pdf";
$file->file_category_id = $cat_id;
$file->author_id = CMediusers::get()->_id;
$file->fillFields();
$file->updateFormFields();
$file->forceDir();
$file->store();
$cr = new CCompteRendu();
$cr->_page_format = "A4";
$cr->_orientation = "portrait";
// use template for header and footer
$template_header = new CTemplateManager();
$context->fillTemplate($template_header);
$header = CCompteRendu::getSpecialModel($user, "CPatient", "[ENTETE MOZAIC]");
if ($header->_id) {
$header->loadContent();
$template_header->renderDocument($header->_source);
} else {
示例14: loadSent
/**
* Load the sent mails for an account
*
* @param int $account_id The account id
* @param int $start The start
* @param int $limit The number of mails to load
*
* @return CUserMail[]
*/
public static function loadSent($account_id, $start, $limit)
{
$source_smtp = CExchangeSource::get('mediuser-' . CMediusers::get()->_id, "smtp");
if ($source_smtp->_id) {
$where[] = "(account_id = '{$account_id}' AND account_class = 'CSourcePOP') OR (account_id = '{$source_smtp->_id}' AND account_class = 'CSourceSMTP')";
} else {
$where['account_id'] = "= '{$account_id}'";
$where['account_class'] = "= 'CSourcePOP'";
}
$where['sent'] = " = '1' ";
$order = "date_inbox DESC";
$limit = "{$start}, {$limit}";
$mail = new CUserMail();
return $mail->loadList($where, $order, $limit);
}
示例15: CPatient
*/
CCanDo::checkRead();
$patient_id = CValue::getOrSession("patient_id", 0);
if (!$patient_id) {
CAppUI::setMsg("Vous devez selectionner un patient", UI_MSG_ALERT);
CAppUI::redirect("m=dPpatients&tab=0");
}
// Récuperation du patient sélectionné
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadDossierComplet(PERM_READ);
$patient->loadRefDossierMedical();
$patient->_ref_dossier_medical->loadRefsAntecedents();
$patient->_ref_dossier_medical->loadRefsTraitements();
$patient->countINS();
$userSel = CMediusers::get();
// Suppression des consultations d'urgences
foreach ($patient->_ref_consultations as $keyConsult => $consult) {
if ($consult->motif == "Passage aux urgences") {
unset($patient->_ref_consultations[$keyConsult]);
}
}
$can_view_dossier_medical = CModule::getCanDo('dPcabinet')->edit || CModule::getCanDo('dPbloc')->edit || CModule::getCanDo('dPplanningOp')->edit || $userSel->isFromType(array("Infirmière"));
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("canCabinet", CModule::getCanDo("dPcabinet"));
$smarty->assign("canPlanningOp", CModule::getCanDo("dPplanningOp"));
$smarty->assign("patient", $patient);
$smarty->assign("can_view_dossier_medical", $can_view_dossier_medical);
$smarty->assign("isImedsInstalled", CModule::getActive("dPImeds") && CImeds::getTagCIDC(CGroups::loadCurrent()));
$smarty->display("inc_vw_full_patients.tpl");