本文整理汇总了PHP中COperation::loadList方法的典型用法代码示例。如果您正苦于以下问题:PHP COperation::loadList方法的具体用法?PHP COperation::loadList怎么用?PHP COperation::loadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperation
的用法示例。
在下文中一共展示了COperation::loadList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getForDates
/**
* liste les interventions hors plage entre 2 date données
*
* @param date $start date de début
* @param date|null $end date de fin (si null = date de début)
* @param array $chir_ids chirs targeted
* @param array $salle_ids salles to check
*
* @return COperation[]
*/
static function getForDates($start, $end = null, $chir_ids = array(), $salle_ids = array())
{
$d_start = $start;
$d_end = $end ? $end : $start;
$ljoin = array();
$ljoin["sejour"] = "sejour.sejour_id = operations.sejour_id";
$where = array();
if (count($chir_ids)) {
$where["chir_id"] = CSQLDataSource::prepareIn($chir_ids);
}
if (count($salle_ids)) {
$where[] = "operations.salle_id IS NULL OR operations.salle_id " . CSQLDataSource::prepareIn($salle_ids);
}
$where["operations.plageop_id"] = "IS NULL";
$where["operations.date"] = "BETWEEN '{$d_start}' AND '{$d_end}'";
$where["operations.annulee"] = "= '0'";
$where["sejour.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$order = "operations.date, operations.chir_id";
$op = new COperation();
/** @var COperation[] $listHorsPlage */
$listHorsPlage = $op->loadList($where, $order, null, null, $ljoin);
return $listHorsPlage;
}
示例2: array
$where = array();
$where["date"] = " = '" . CMbDT::date($date_depart) . "'";
$where["annulee"] = " = '0'";
$ljoin = array();
$ljoin["sallesbloc"] = "sallesbloc.salle_id = operations.salle_id";
if ($bloc_id) {
$where["sallesbloc.bloc_id"] = "= '{$bloc_id}'";
} else {
$bloc = new CBlocOperatoire();
$where_bloc = array("group_id" => "= '" . CGroups::loadCurrent()->_id . "'");
$blocs = $bloc->loadListWithPerms(PERM_READ, $where_bloc, "nom");
$where["sallesbloc.bloc_id"] = CSQLDataSource::prepareIn(array_keys($blocs));
}
$operation = new COperation();
/** @var COperation[] $operations */
$operations = $operation->loadList($where, "time_operation ASC", null, null, $ljoin);
$sejours = CMbObject::massLoadFwdRef($operations, "sejour_id");
CMbObject::massLoadFwdRef($sejours, "patient_id");
CMbObject::massLoadFwdRef($operations, "salle_id");
CMbObject::massLoadFwdRef($operations, "plageop_id");
foreach ($operations as $_operation) {
$_operation->loadRefPlageOp();
$_operation->updateSalle();
$_operation->updateHeureUS();
$sejour = $_operation->loadRefSejour();
$affectation = $sejour->loadRefCurrAffectation($date_depart);
$affectation->loadView();
$sejour->loadRefPatient();
}
// Tri à posteriori
switch ($order_col) {
示例3: array
$ljoin["plagesop"] = "operations.plageop_id = plagesop.plageop_id";
$where = array();
$in_salles = CSQLDataSource::prepareIn(array_keys($salles));
$where[] = "plagesop.salle_id {$in_salles} OR operations.salle_id {$in_salles}";
$where["materiel"] = "!= ''";
$where[] = " operations.date BETWEEN '{$date_min}' AND '{$date_max}'";
if ($praticien_id) {
$where["operations.chir_id"] = " = '{$praticien_id}'";
} elseif ($function_id) {
$mediuser = new CMediusers();
$users = $mediuser->loadProfessionnelDeSante(PERM_READ, $function_id);
$where["operations.chir_id"] = CSQLDataSource::prepareIn(array_keys($users));
}
$order = "operations.date, rank";
$operation = new COperation();
$ops = $operation->loadList($where, $order, null, "operation_id", $ljoin);
$operations = array();
$commande = new CCommandeMaterielOp();
foreach ($commande->_specs["etat"]->_list as $spec) {
$operations[$spec] = array();
}
foreach ($ops as $_op) {
/** @var COperation $_op */
$_op->loadRefPatient();
$_op->loadRefChir()->loadRefFunction();
$_op->loadRefPlageOp();
$_op->loadExtCodesCCAM();
$_op->loadRefCommande();
if (!$_op->_ref_commande_mat->_id && !$_op->annulee) {
$operations["a_commander"][$_op->_id] = $_op;
} elseif ($_op->_ref_commande_mat->_id) {
示例4: COperation
$where[] = "operations.chir_id " . $in_prats . " OR operations.chir_2_id " . $in_prats . " OR operations.chir_3_id " . $in_prats . " OR operations.chir_4_id " . $in_prats;
$where[] = "operations.anesth_id IS NULL OR operations.anesth_id {$in_prats}";
} else {
$where_chir = "operations.chir_id = '{$user->_id}' OR operations.chir_2_id = '{$user->_id}'\n OR operations.chir_3_id = '{$user->_id}' OR operations.chir_4_id = '{$user->_id}'";
if ($user->isAnesth()) {
$where[] = "{$where_chir} OR\n operations.anesth_id = '{$user->_id}' OR\n (operations.anesth_id IS NULL && plagesop.anesth_id = '{$user->_id}')";
} else {
$where[] = $where_chir;
}
}
/** @var COperation[] $interventions */
$operation = new COperation();
if (!$interv_with_no_codes) {
$where[] = "LENGTH(codes_ccam) > 0";
}
$interventions = $operation->loadList($where, null, null, null, $ljoin);
$totals["interventions"] = count($interventions);
$where = array();
if (!$all_prats) {
//$where["executant_id"] = "= '$user->_id'";
$where["code_activite"] = $user->_is_anesth ? "= '4'" : "!= '4'";
}
CStoredObject::massCountBackRefs($interventions, "actes_ccam", $where);
// Préparation des interventions
CDatedCodeCCAM::$cache_layers = Cache::INNER_OUTER;
foreach ($interventions as $key => $_interv) {
$_interv->loadExtCodesCCAM();
}
foreach ($interventions as $key => $_interv) {
$codes_ccam = $_interv->_ext_codes_ccam;
// Nombre d'acte cotés par le praticien et réinitialisation du count pour le cache
示例5: array
$nbIntervNonPlacees = 0;
foreach ($listDays as $keyDate => $valDate) {
// Récupération des plages par jour
$where = array();
$where["date"] = "= '{$keyDate}'";
$where["salle_id"] = "= '{$salle->_id}'";
$order = "debut";
$listPlages[$keyDate] = $listPlage->loadList($where, $order);
// Récupération des interventions hors plages du jour
$where = array();
$where["date"] = "= '{$keyDate}'";
$where["annulee"] = "= '0'";
$where["salle_id"] = "= '{$salle->_id}'";
$order = "time_operation";
/** @var COperation[] $horsPlages */
$horsPlages = $operation->loadList($where, $order);
// Détermination des bornes du semainier
$min = CPlageOp::$hours_start . ":" . reset(CPlageOp::$minutes) . ":00";
$max = CPlageOp::$hours_stop . ":" . end(CPlageOp::$minutes) . ":00";
// Détermination des bornes de chaque plage
foreach ($listPlages[$keyDate] as $plage) {
/** @var CPlageOp $plage */
$plage->loadRefsFwd();
$plage->loadRefsNotes();
$plage->_ref_chir->loadRefsFwd();
$plage->multicountOperations();
$nbIntervNonPlacees += $plage->_count_operations - $plage->_count_operations_placees;
$plage->loadAffectationsPersonnel();
$plage->fin = min($plage->fin, $max);
$plage->debut = max($plage->debut, $min);
$plage->updateFormFields();
示例6: count
}
}
$totalOp += count($_plage->_ref_operations);
}
/**
* Comptage des Interventions hors plages
*/
$operation = new COperation();
$where = array();
$ljoin["sejour"] = "sejour.sejour_id = operations.sejour_id";
$where["operations.date"] = "= '{$date}'";
$where["operations.plageop_id"] = "IS NULL";
$where["operations.annulee"] = "= '0'";
$where["sejour.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
/** @var COperation[] $horsplages */
$horsplages = $operation->loadList($where, null, null, null, $ljoin);
$totalOp += count($horsplages);
foreach ($horsplages as $_operation) {
$counts["urgences"]["total"]++;
if ($_operation->facture) {
$counts["urgences"]["facturees"]++;
}
}
/**
* Comptage des séjours
*/
$group = CGroups::loadCurrent();
$next = CMbDT::date("+1 day", $date);
$sejour = new CSejour();
$where = array();
$where["entree"] = "< '{$next}'";
示例7: CPlanningWeek
//Instanciation du planning
$planning = new CPlanningWeek($debut, $debut, $fin, $nbDays, false, $print ? "1000" : "auto");
$planning->title = $prat->_view;
$planning->guid = $prat->_guid;
$planning->hour_min = "07";
$planning->hour_max = "20";
$planning->pauses = array("07", "12", "19");
$whereHP["plageop_id"] = " IS NULL";
for ($i = 0; $i < $nbDays; $i++) {
$jour = CMbDT::date("+{$i} day", $debut);
$where["date"] = $whereInterv["date"] = $whereHP["date"] = "= '{$jour}'";
if (CAppUI::pref("showIntervPlanning")) {
// HORS PLAGE
$horsPlage = new COperation();
/** @var COperation[] $horsPlages */
$horsPlages = $horsPlage->loadList($whereHP);
CMbObject::massLoadFwdRef($horsPlages, "chir_id");
foreach ($horsPlages as $_horsplage) {
$lenght = CMBDT::minutesRelative("00:00:00", $_horsplage->temp_operation);
$op = new CPlanningRange($_horsplage->_guid, $jour . " " . $_horsplage->time_operation, $lenght, $_horsplage, "3c75ea", "horsplage");
$planning->addRange($op);
}
// INTERVENTIONS
/** @var CPlageOp[] $intervs */
$interv = new CPlageOp();
$intervs = $interv->loadList($whereInterv);
CMbObject::massLoadFwdRef($intervs, "chir_id");
foreach ($intervs as $_interv) {
$range = new CPlanningRange($_interv->_guid, $jour . " " . $_interv->debut, CMbDT::minutesRelative($_interv->debut, $_interv->fin), CAppUI::tr($_interv->_class), "bbccee", "plageop");
$planning->addRange($range);
}
示例8: CPrestationJournaliere
$prestation_id = CAppUI::pref("prestation_id_hospi");
if (CAppUI::conf("dPhospi prestations systeme_prestations", $group) == "standard" || $prestation_id == "all") {
$prestation_id = "";
}
$prestation = new CPrestationJournaliere();
$prestation->load($prestation_id);
$format_print = CAppUI::conf("dPbloc printing format_print", $group);
$ordre_passage_temp = array();
$ordre_passage = array();
// Operations de chaque plage
foreach ($plagesop as $plage) {
$plage->loadRefsFwd(1);
$where["operations.plageop_id"] = "= '{$plage->_id}'";
$op = new COperation();
/** @var COperation[] $listOp */
$listOp = $op->loadList($where, $order, null, null, $ljoin);
$chirs = CStoredObject::massLoadFwdRef($listOp, "chir_id");
$sejours = CStoredObject::massLoadFwdRef($listOp, "sejour_id");
CStoredObject::massLoadFwdRef($sejours, "patient_id");
foreach ($listOp as $key => $operation) {
$operation->loadRefPlageOp();
if ($operation->_datetime_best < $filter->_datetime_min || $operation->_datetime_best > $filter->_datetime_max) {
unset($listOp[$key]);
continue;
}
$operation->loadRefsConsultAnesth();
if ($no_consult_anesth && $operation->_ref_consult_anesth->_id) {
unset($listOp[$operation->_id]);
}
$operation->loadRefPraticien();
$operation->loadExtCodesCCAM();
示例9: array
$joins = array();
$where["plageop_id"] = "= '{$_plage->_id}'";
$where["annulee"] = "= '0'";
// Intervention ordonnancé
switch ($filter->_ranking) {
case "ok":
$where["rank"] = "!= '0'";
break;
case "ko":
$where["rank"] = "= '0'";
}
if ($filter->_codes_ccam) {
$where["codes_ccam"] = "LIKE '%{$filter->_codes_ccam}%'";
}
$order = "operations.rank";
$listOperations = $tempOp->loadList($where, $order, null, null, $ljoin);
// Urgences
$where["plageop_id"] = "IS NULL";
$where["salle_id"] = "= '{$_plage->salle_id}'";
$where["chir_id"] = "= '{$_plage->chir_id}'";
$where["date"] = "= '{$_plage->date}'";
$where["operation_id"] = $_plage->_spec->ds->prepareNotIn($listUrgencesTraitees);
$listUrgences = $tempOp->loadList($where, $order, null, null, $ljoin);
$listUrgencesTraitees = array_merge($listUrgencesTraitees, array_keys($listUrgences));
// On compile les interventions
$_plage->_ref_operations = array_merge($listOperations, $listUrgences);
} else {
// Cas des urgences restantes
$ljoin["sejour"] = "sejour.sejour_id = operations.sejour_id";
$where["sejour.group_id"] = "= '{$group->_id}'";
$where["plageop_id"] = "IS NULL";
示例10: loadOperationsFromLinkedObjects
/**
* Load the COperation to send from the linked CSalle objects
*
* @param CSalle[] $linked_objects The linked objects
*
* @return COperation[]
*/
protected static function loadOperationsFromLinkedObjects($linked_objects)
{
$salles = array();
foreach ($linked_objects as $_linked_object) {
$salles[] = $_linked_object->object_id;
}
$operation = new COperation();
$where = array('salle_id' => CMySQLDataSource::prepareIn($salles), 'date' => " = '" . CMbDT::date() . "'", 'plageop_id' => ' IS NULL');
/* Loading the unplanned operations */
$unplanned_operations = $operation->loadList($where);
$ljoin = array("plagesop" => "plagesop.plageop_id = operations.plageop_id");
$where = array("plagesop.salle_id" => CMySQLDataSource::prepareIn($salles), "plagesop.date" => " = '" . CMbDT::date() . "'", "operations.salle_id" => CMySQLDataSource::prepareIn($salles));
/* Loading the planned operations */
$operations = $operation->loadList($where, null, null, null, $ljoin);
$operations = array_merge($operations, $unplanned_operations);
CMbObject::massLoadFwdRef($operations, 'plageop_id');
CMbObject::massLoadFwdRef($operations, 'chir_id');
CMbObject::massLoadFwdRef($operations, 'sejour_id');
return $operations;
}
示例11: COperation
}
$operation = new COperation();
// Liste des interventions non validées
$ljoin = array();
$ljoin["plagesop"] = "operations.plageop_id = plagesop.plageop_id";
$where = array();
$where["plagesop.date"] = "BETWEEN '{$date}' AND '{$fin}'";
if ($bloc->_id) {
$salles = $bloc->loadRefsSalles();
$where["plagesop.salle_id"] = CSQLDataSource::prepareIn(array_keys($salles));
}
$where["operations.annulee"] = "= '0'";
$where["operations.rank"] = "= '0'";
$order = "plagesop.date, plagesop.chir_id";
/** @var COperation[] $listNonValidees */
$listNonValidees = $operation->loadList($where, $order, null, null, $ljoin);
foreach ($listNonValidees as $_operation) {
$_operation->loadRefPlageOp();
$_operation->loadExtCodesCCAM();
$_operation->loadRefPraticien()->loadRefFunction();
$_operation->loadRefPatient();
}
$listHorsPlage = CIntervHorsPlage::getForDates($date, $fin, null, array_keys($bloc->_ref_salles));
foreach ($listHorsPlage as $_operation) {
$_operation->loadRefPlageOp();
$_operation->loadExtCodesCCAM();
$_operation->loadRefPraticien()->loadRefFunction();
$_operation->loadRefPatient();
}
// Création du template
$smarty = new CSmartyDP();
示例12: array
$bloc->type = "obst";
$bloc->group_id = $group->_id;
/** @var CBlocOperatoire[] $blocs */
$blocs = $bloc->loadMatchingList();
$salles = array();
foreach ($blocs as $_bloc) {
$salles = $_bloc->loadRefsSalles();
foreach ($salles as $_salle) {
$salles[$_salle->_id] = $_salle->_id;
}
}
// anesth
$anesth = new CMediusers();
$anesths = $anesth->loadListFromType(array("Anesthésiste"), PERM_READ);
/** @var COperation[] $ops */
$ops = $op->loadList($where, "date DESC, time_operation", null, null, $ljoin);
CMbObject::massLoadFwdRef($ops, "sejour_id");
CMbObject::massLoadFwdRef($ops, "anesth_id");
$chirs = CMbObject::massLoadFwdRef($ops, "chir_id");
CMbObject::massLoadFwdRef($chirs, "function_id");
foreach ($ops as $_op) {
$_op->loadRefChir()->loadRefFunction();
$_op->loadRefAnesth();
$_op->loadRefSalle();
$_op->loadRefPlageOp();
$sejour = $_op->loadRefSejour();
$sejour->loadRefCurrAffectation();
$grossesse = $sejour->loadRefGrossesse();
$grossesse->loadRefsNaissances();
$grossesse->loadRefParturiente();
$_op->updateDatetimes();
示例13: array
}
if ($salle_id) {
$where["operations.salle_id"] = $ds->prepare("=?", $salle_id);
}
if ($bloc_id) {
$ljoin["sallesbloc"] = "sallesbloc.salle_id = operations.salle_id";
$where["sallesbloc.bloc_id"] = $ds->prepare("=?", $bloc_id);
}
if ($hors_plage) {
$where["operations.plageop_id"] = "IS NULL";
}
if ($codes_ccam) {
$where["operations.codes_ccam"] = $ds->prepare("LIKE %", "%{$codes_ccam}%");
}
/** @var COperation[] $interventions */
$interventions = $interv->loadList($where, null, null, "operation_id", $ljoin);
// Chargements de masse
$sejours = CMbObject::massLoadFwdRef($interventions, "sejour_id");
CMbObject::massLoadFwdRef($sejours, "patient_id");
CMbObject::massLoadFwdRef($sejours, "praticien_id");
CMbObject::massLoadFwdRef($interventions, "chir_id");
$columns = array("IPP", "Nom", "Nom naissance", "Prénom", "Date naissance", "Sexe", "Date intervention", "Libellé intervention", "Chirurgien nom", "Chirurgien prénom", "NDA", "Praticien nom", "Praticien prénom", "Date entrée", "Date sortie");
$csv = new CCSVFile();
$csv->writeLine($columns);
foreach ($interventions as $_intervention) {
$_sejour = $_intervention->loadRefSejour();
$_patient = $_sejour->loadRefPatient();
$_praticien = $_sejour->loadRefPraticien();
$_chir = $_intervention->loadRefChir();
$_patient->loadIPP();
$_sejour->loadNDA();
示例14: CPlageOp
* dPboard
*
* @category Board
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version SVN: $Id:$
* @link http://www.mediboard.org
*/
global $prat;
$date_interv = CValue::getOrSession("date_interv", CMbDT::date());
// Chargement des plages du mois
$plage = new CPlageOp();
$where = array("date" => "= '" . $date_interv . "'", "chir_id" => "= '" . $prat->_id . "'");
$order = "date, debut";
$listPlages = $plage->loadList($where, $order);
$interv = new COperation();
$where = array();
$where[] = "(plageop_id " . CSQLDataSource::prepareIn(array_keys($listPlages)) . " OR (operations.date = '{$date_interv}' AND operations.chir_id = '" . $prat->_id . "'))";
/** @var COperation[] $listIntervs */
$listIntervs = $interv->loadList($where);
foreach ($listIntervs as &$_interv) {
$_interv->loadRefsFwd();
}
// Variables de templates
$smarty = new CSmartyDP();
$smarty->assign("date_interv", $date_interv);
$smarty->assign("listIntervs", $listIntervs);
$smarty->assign("prec", CMbDT::date("-1 DAYS", $date_interv));
$smarty->assign("suiv", CMbDT::date("+1 DAYS", $date_interv));
$smarty->display("vw_trace_cotes.tpl");
示例15: mineSome
/**
* Mine or remine the first available operations
*
* @param int $limit
* @param string $phase
*
* @return array Success/failure counts report
*/
function mineSome($limit = 100, $phase = "mine")
{
$report = array("success" => 0, "failure" => 0);
if (!$limit) {
return $report;
}
$operation = new COperation();
/** @var COperation[] $operations */
$operations = array();
if ($phase == "remine") {
$date = CMbDT::date(self::$remine_delay);
$where["date"] = "< '{$date}'";
$where["remined"] = "= '0'";
$mined = $this->loadList($where, null, $limit);
$operation_ids = CMbArray::pluck($mined, "operation_id");
$operations = $operation->loadAll($operation_ids);
}
if ($phase == "postmine") {
$date = CMbDT::date(self::$postmine_delay);
$where["date"] = "< '{$date}'";
$where["postmined"] = "= '0'";
$mined = $this->loadList($where, null, $limit);
$operation_ids = CMbArray::pluck($mined, "operation_id");
$operations = $operation->loadAll($operation_ids);
}
if ($phase == "mine") {
$date = CMbDT::date(self::$mine_delay);
$table = $this->_spec->table;
$ljoin[$table] = "{$table}.operation_id = operations.operation_id";
$where[] = "operations.date < '{$date}'";
$where["{$table}.operation_id"] = "IS NULL";
$operations = $operation->loadList($where, null, $limit, null, $ljoin);
}
$plages = CStoredObject::massLoadFwdRef($operations, "plageop_id");
$salles = CStoredObject::massLoadFwdRef($plages, "salle_id");
CStoredObject::massLoadFwdRef($salles, "bloc_id");
foreach ($operations as $_operation) {
$_operation->loadRefPlageOp();
$this->mine($_operation);
if ($msg = $this->store()) {
trigger_error($msg, UI_MSG_ERROR);
$report["failure"]++;
continue;
}
$report["success"]++;
}
return $report;
}