本文整理汇总了PHP中CMediusers::getDS方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::getDS方法的具体用法?PHP CMediusers::getDS怎么用?PHP CMediusers::getDS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::getDS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* $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");
$function_id = CValue::get("function_id");
$list_chir_ids = array();
$user = new CMediusers();
$user->load($chir_id);
$ds = $user->getDS();
if ($function_id) {
$users = CConsultation::loadPraticiens(PERM_EDIT, $function_id);
$list_chir_ids = array_keys($users);
} else {
$list_chir_ids = array($chir_id);
}
// Liste des consultations a avancer si desistement
$now = CMbDT::date();
$where = array("plageconsult.date" => " > '{$now}'", "plageconsult.chir_id" => $ds->prepareIn($list_chir_ids), "consultation.si_desistement" => "= '1'", "consultation.annule" => "= '0'");
$ljoin = array("plageconsult" => "plageconsult.plageconsult_id = consultation.plageconsult_id");
$consultation_desist = new CConsultation();
/** @var CConsultation[] $consultations */
$consultations = $consultation_desist->loadList($where, "date, heure", null, null, $ljoin);
foreach ($consultations as $_consult) {
$_consult->loadRefPatient();
示例2: getDoctor
/**
* Return or create the doctor of the message
*
* @param DOMNode $node Node
*
* @return CMediusers|int|null
*/
function getDoctor($node)
{
$xpath = new CHPrimSanteMessageXPath($node ? $node->ownerDocument : $this);
$nodeDoctor = $xpath->query("P.13", $node);
$code = null;
$nom = null;
$prenom = null;
$type_code = null;
foreach ($nodeDoctor as $_node_doctor) {
$code = $xpath->queryTextNode("CNA.1", $_node_doctor);
$nom = $xpath->queryTextNode("CNA.2/PN.1", $_node_doctor);
$prenom = $xpath->queryTextNode("CNA.2/PN.2", $_node_doctor);
$type_code = $xpath->queryTextNode("CNA.3", $_node_doctor);
if ($code && $nom) {
break;
}
}
$mediuser = new CMediusers();
$mediuser->_user_last_name = $nom;
switch ($type_code) {
case "R":
$mediuser->rpps = $code;
break;
case "A":
$mediuser->adeli = $code;
break;
default:
if (strlen($code) == 9 && luhn($code)) {
$mediuser->adeli = $code;
}
if (strlen($code) == 11 && luhn($code)) {
$mediuser->rpps = $code;
}
}
// Cas où l'on a aucune information sur le médecin
if (!$mediuser->rpps && !$mediuser->adeli && !$mediuser->_id && !$mediuser->_user_last_name) {
return null;
}
$sender = $this->_ref_sender;
$ds = $mediuser->getDS();
$ljoin = array();
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
if ($mediuser->rpps || $mediuser->adeli) {
if ($mediuser->rpps) {
$where[] = $ds->prepare("rpps = %", $mediuser->rpps);
}
if ($mediuser->adeli) {
$where[] = $ds->prepare("adeli = %", $mediuser->adeli);
}
// Dans le cas où le praticien recherché par son ADELI ou RPPS est multiple
if ($mediuser->countList($where, null, $ljoin) > 1) {
$ljoin["users"] = "users_mediboard.user_id = users.user_id";
$where[] = $ds->prepare("users.user_last_name = %", $nom);
}
$mediuser->loadObject($where, null, null, $ljoin);
if ($mediuser->_id) {
return $mediuser;
}
}
$user = new CUser();
$ljoin = array();
$ljoin["users_mediboard"] = "users.user_id = users_mediboard.user_id";
$ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
$where = array();
$where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
$where[] = $ds->prepare("users.user_first_name = %", $prenom);
$where[] = $ds->prepare("users.user_last_name = %", $nom);
$order = "users.user_id ASC";
if ($user->loadObject($where, $order, null, $ljoin)) {
return $user->loadRefMediuser();
}
$mediuser->_user_first_name = $prenom;
$mediuser->_user_last_name = $nom;
return $this->createDoctor($mediuser);
}