本文整理汇总了PHP中CMbObject::massLoadFwdRef方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbObject::massLoadFwdRef方法的具体用法?PHP CMbObject::massLoadFwdRef怎么用?PHP CMbObject::massLoadFwdRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbObject
的用法示例。
在下文中一共展示了CMbObject::massLoadFwdRef方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (!$usermessage->subject) {
$usermessage->subject = "Re: " . $origin->subject;
}
$usermessage->to = $origin->from;
}
}
if ($usermessage->to) {
$usermessage->loadRefUsersTo();
}
// Historique des messages avec le destinataire
$where = array();
$where[] = "(usermessage.from = '{$usermessage->from}' AND usermessage.to = '{$usermessage->to}')" . "OR (usermessage.from = '{$usermessage->to}' AND usermessage.to = '{$usermessage->from}')";
$where["date_sent"] = " IS NOT NULL";
$historique = $usermessage->loadList($where, "date_sent DESC", "20", "date_sent, subject");
CMbObject::massLoadFwdRef($historique, "from");
CMbObject::massLoadFwdRef($historique, "to");
/** @var $historique CUserMessage[] */
foreach ($historique as $_mail) {
$_mail->loadRefUserFrom();
$_mail->loadRefUsersTo();
}
// Initialisation de CKEditor
$templateManager = new CTemplateManager();
$templateManager->editor = "ckeditor";
$templateManager->simplifyMode = true;
if ($usermessage->date_sent) {
$templateManager->printMode = true;
}
$templateManager->initHTMLArea();
// Création du template
$smarty = new CSmartyDP();
示例2: CFactureCabinet
$where["du_tiers"] = "> 0";
}
}
// Reglements via les factures de consultation
$where["cloture"] = "IS NOT NULL";
$where["patient_id"] = "IS NOT NULL";
$order = "ouverture, praticien_id";
$facture = new CFactureCabinet();
if ($all_group_money) {
$listFactures = $facture->loadList($where, $order, null, null, $ljoin);
} else {
$listFactures = $facture->loadGroupList($where, $order, null, null, $ljoin);
}
$listPlages = array();
CMbObject::massLoadFwdRef($listFactures, "praticien_id");
CMbObject::massLoadFwdRef($listFactures, "patient_id");
CMbObject::massCountBackRefs($listFactures, "reglements");
CMbObject::massCountBackRefs($listFactures, "notes");
foreach ($listFactures as $_facture) {
/* @var CFactureCabinet $_facture */
$_facture->loadRefGroup();
$_facture->loadRefPatient();
$_facture->loadRefPraticien();
$_facture->loadRefsConsultation();
if (count($_facture->_ref_consults)) {
$_facture->loadRefCoeffFacture();
$_facture->updateMontants();
$_facture->loadRefsReglements();
$_facture->loadRefsNotes();
if ($all_impayes) {
$_facture->loadRefsRelances();
示例3: CBlocOperatoire
$date = CValue::get("date");
$bloc_id = CValue::get("bloc_id");
$bloc = new CBlocOperatoire();
$bloc->load($bloc_id);
$in_salles = CSQLDataSource::prepareIn($bloc->loadBackIds("salles"));
$ljoin["plagesop"] = "operations.plageop_id = plagesop.plageop_id";
$where[] = "operations.salle_id {$in_salles} OR plagesop.salle_id {$in_salles}";
$where[] = "operations.date = '{$date}'";
$where["labo"] = "= 1";
$order = "entree_salle, time_operation";
$operation = new COperation();
/** @var COperation[] $operations */
$operations = $operation->loadList($where, $order, null, null, $ljoin);
CMbObject::massLoadFwdRef($operations, "plageop_id");
$chirs = CMbObject::massLoadFwdRef($operations, "chir_id");
CMbObject::massLoadFwdRef($chirs, "function_id");
$sejours = CMbObject::massLoadFwdRef($operations, "sejour_id");
CMbObject::massLoadFwdRef($sejours, "patient_id");
foreach ($operations as $_operation) {
$_operation->loadRefPatient();
$_operation->loadRefPlageOp();
$_operation->updateSalle();
$_operation->loadRefChir()->loadRefFunction();
$_operation->loadExtCodesCCAM();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("bloc", $bloc);
$smarty->assign("operations", $operations);
$smarty->display("print_bacterio.tpl");
示例4: unset
$whereSortants["sejour.sortie"] = "!= affectation.sortie";
unset($whereEntrants["service.group_id"]);
unset($whereSortants["service.group_id"]);
$whereEntrants["sejour.group_id"] = "= '{$group->_id}'";
$whereSortants["sejour.group_id"] = "= '{$group->_id}'";
/** @var CAffectation[] $deplacements */
/** @var CAffectation[] $dep_entrants */
/** @var CAffectation[] $dep_sortants */
$dep_entrants = $affectation->loadList($whereEntrants, $order, null, "affectation_id", $ljoin);
$dep_sortants = $affectation->loadList($whereSortants, $order, null, "affectation_id", $ljoin);
$deplacements = array_merge($dep_entrants, $dep_sortants);
$sejours = CMbObject::massLoadFwdRef($deplacements, "sejour_id");
$patients = CMbObject::massLoadFwdRef($sejours, "patient_id");
$praticiens = CMbObject::massLoadFwdRef($sejours, "praticien_id");
CMbObject::massLoadFwdRef($praticiens, "function_id");
CMbObject::massLoadFwdRef($deplacements, "lit_id");
$update_count = count($dep_entrants) . "/" . count($dep_sortants);
foreach ($deplacements as $_deplacement) {
$_deplacement->loadRefsFwd();
$sejour = $_deplacement->_ref_sejour;
$sejour->loadRefPatient(1);
$sejour->loadRefPraticien(1);
$sejour->loadNDA();
$_deplacement->_ref_next->loadRefLit()->loadCompleteView();
$_deplacement->_ref_prev->loadRefLit()->loadCompleteView();
if ($show_hour_anesth) {
$op = $sejour->loadRefCurrOperation($date);
$op->loadRefPlageOp();
$op->_ref_anesth->loadRefFunction();
}
if ($prestation_id) {
示例5: loadRefsDocItems
/**
* Load documents and files for object and sort by category
*
* @param boolean $with_cancelled Inclure les fichiers annulés
*
* @return int document + files count
*/
function loadRefsDocItems($with_cancelled = true)
{
$this->_nb_files = $this->loadRefsFiles();
$this->_nb_docs = $this->loadRefsDocs();
$this->_nb_files_docs = $this->_nb_files + $this->_nb_docs;
$categories_files = CMbObject::massLoadFwdRef($this->_ref_files, "file_category_id");
$categories_docs = CMbObject::massLoadFwdRef($this->_ref_documents, "file_category_id");
$categories = $categories_docs + $categories_files;
foreach ($this->_ref_documents as $_document) {
$cat_name = $_document->file_category_id ? $categories[$_document->file_category_id]->nom : "";
@($this->_ref_documents_by_cat[$cat_name][] = $_document);
@($this->_refs_docitems_by_cat[$cat_name][] = $_document);
}
foreach ($this->_ref_files as $_key => $_file) {
if (!$with_cancelled && $_file->annule) {
unset($this->_ref_files[$_key]);
continue;
}
$cat_name = $_file->file_category_id ? $categories[$_file->file_category_id]->nom : "";
@($this->_ref_files_by_cat[$cat_name][] = $_file);
@($this->_refs_docitems_by_cat[$cat_name][] = $_file);
}
ksort(@$this->_refs_docitems_by_cat);
}
示例6: reset
$plageconsult_id = $plageSel->plageconsult_id;
}
$plageSel->loadRefChir();
$plageSel->loadRefRemplacant();
$plageSel->loadRefPourCompte();
$plageSel->loadRefsNotes();
$plageSel->loadRefsBack($show_annulees, true, $show_payees);
if ($plageSel->_affected && count($plageSel->_ref_consultations)) {
$firstconsult = reset($plageSel->_ref_consultations);
$_firstconsult_time = substr($firstconsult->heure, 0, 5);
$lastconsult = end($plageSel->_ref_consultations);
$_lastconsult_time = substr($lastconsult->heure, 0, 5);
}
$consults = $plageSel->_ref_consultations;
CStoredObject::massLoadFwdRef($consults, "sejour_id");
$patients = CMbObject::massLoadFwdRef($consults, "patient_id");
CStoredObject::massCountBackRefs($patients, "notes");
CStoredObject::massLoadFwdRef($consults, "categorie_id");
// Détails sur les consultation affichées
foreach ($plageSel->_ref_consultations as $keyConsult => &$consultation) {
$consultation->_ref_plageconsult = $plageSel;
$consultation->loadRefSejour();
$consultation->loadRefPatient()->loadRefsNotes();
$consultation->loadRefCategorie();
$consultation->countDocItems();
$consultation->_view = "Consult. de " . $consultation->_ref_patient->_view;
$consultation->_view .= " (" . CMbDT::format($plageSel->date, "%d/%m/%Y") . ")";
//check 3333tel
if (CModule::getActive("3333tel")) {
C3333TelTools::checkConsults($consultation, $plageSel->_ref_chir->function_id);
}
示例7: array
}
$order = array();
$order[] = "date";
$order[] = "chir_id";
$order[] = "debut";
/** @var CPlageconsult[] $listPlage */
$listPlage = $plage->loadList($where, $order);
// Pour chaque plage on selectionne les consultations
foreach ($listPlage as $plage) {
$plage->listPlace = array();
$plage->listPlace2 = array();
$plage->listBefore = array();
$plage->listAfter = array();
$plage->listHorsPlace = array();
$listPlage[$plage->_id]->loadRefs(false, 1);
CMbObject::massLoadFwdRef($plage->_ref_consultations, "sejour_id");
for ($i = 0; $i <= $plage->_total; $i++) {
$minutes = $plage->_freq * $i;
$plage->listPlace[$i]["time"] = CMbDT::time("+ {$minutes} minutes", $plage->debut);
$plage->listPlace[$i]["consultations"] = array();
}
foreach ($plage->_ref_consultations as $keyConsult => $valConsult) {
/** @var CConsultation $consultation */
$consultation = $plage->_ref_consultations[$keyConsult];
$patient = $consultation->loadRefPatient(1);
$patient->loadIPP();
if ($consultation->sejour_id) {
$patient->_ref_curr_affectation = $consultation->loadRefSejour()->loadRefCurrAffectation(CMbDT::date($consultation->_datetime));
$patient->_ref_curr_affectation->loadView();
if ($patient->_ref_curr_affectation->_id) {
$show_lit = true;
示例8: array
$plageConsult->countPatients();
$plageConsult->loadFillRate();
if ($details) {
$plageConsult->loadRefsConsultations();
}
}
$plagesConsult[$date] = $plagesPerDayConsult;
}
if (in_array("interv", $export)) {
$where = array();
$where[] = "chir_id = '{$prat_id}' OR anesth_id = '{$prat_id}'";
$where["date"] = "= '{$date}'";
$where["salle_id"] = CSQLDataSource::prepareIn(array_keys($listSalles));
$plagesPerDayOp = $plageOp->loadList($where);
$salles = CMbObject::massLoadFwdRef($plagesPerDayOp, "salle_id");
CMbObject::massLoadFwdRef($salles, "bloc_id");
CMbObject::massLoadBackRefs($plagesPerDayOp, "operations");
foreach ($plagesPerDayOp as $key => $plage) {
$plage->loadRefSalle();
$plage->_ref_salle->loadRefBloc();
$plage->_ref_salle->_ref_bloc->loadRefGroup();
if ($details) {
$plage->loadRefsOperations();
}
$plage->multicountOperations();
$plagesOp[$plage->salle_id][$date] = $plagesPerDayOp[$key];
}
}
}
// Création du calendrier
$v = new CMbCalendar("Planning");
示例9: CPlageconsult
CCanDo::checkRead();
// Current user and current function
$mediuser = CMediusers::get();
$function = $mediuser->loadRefFunction();
// Filter
$filter = new CPlageconsult();
$filter->_user_id = CValue::get("_user_id", null);
$filter->_date_min = CValue::get("_date_min", CMbDT::date("last month"));
$filter->_date_max = CValue::get("_date_max", CMbDT::date());
$ds = $filter->_spec->ds;
$stats_creation = array();
$prats_creation = array();
if ($filter->_user_id) {
$query = "CREATE TEMPORARY TABLE consultation_creation AS \n SELECT user_log.user_id as user_id, plageconsult.chir_id as chir_id\n FROM user_log\n LEFT JOIN consultation ON consultation.consultation_id = user_log.object_id\n LEFT JOIN plageconsult ON plageconsult.plageconsult_id = consultation.plageconsult_id\n WHERE user_log.object_class = 'CConsultation'\n AND user_log.date BETWEEN '{$filter->_date_min} 00:00:00' AND '{$filter->_date_max} 23:59:59'\n AND user_log.type = 'create'";
$ds->exec($query);
$query = "SELECT consultation_creation.user_id, count(consultation_creation.user_id) AS total\n FROM consultation_creation\n WHERE consultation_creation.chir_id = '{$filter->_user_id}'\n GROUP BY consultation_creation.user_id\n ORDER BY total DESC";
$stats_creation = $ds->loadList($query);
$where = array();
$where["user_id"] = CSQLDataSource::prepareIn(CMbArray::pluck($stats_creation, "user_id"));
/* @var CMediusers[] $prats_creation*/
$prats_creation = $mediuser->loadList($where);
CMbObject::massLoadFwdRef($prats_creation, "function_id");
foreach ($prats_creation as $_prat) {
$_prat->loadRefFunction();
}
}
$smarty = new CSmartyDP();
$smarty->assign("filter", $filter);
$smarty->assign("prats_creation", $prats_creation);
$smarty->assign("stats_creation", $stats_creation);
$smarty->display("inc_stats_prise_rdv.tpl");
示例10: CLitLiaisonItem
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage Hospi
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
$lit_id = CValue::get("lit_id");
$lit_liaison_item = new CLitLiaisonItem();
$lit_liaison_item->lit_id = $lit_id;
/** @var CLitLiaisonItem[] $lits_liaisons_items */
$lits_liaisons_items = $lit_liaison_item->loadMatchingList();
CMbObject::massLoadFwdRef($lits_liaisons_items, "item_prestation_id");
foreach ($lits_liaisons_items as $_lit_liaison_item) {
$_lit_liaison_item->loadRefItemPrestation();
$_lit_liaison_item->_ref_item_prestation->loadRefObject();
}
$smarty = new CSmartyDP();
$smarty->assign("lits_liaisons_items", $lits_liaisons_items);
$smarty->assign("lit_id", $lit_id);
$smarty->display("inc_edit_liaisons_items.tpl");
示例11: array
}
$show_curr_affectation = CAppUI::conf("dPadmissions show_curr_affectation");
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, $order, null, null, $ljoin);
if ($heure) {
$date_min = CMbDT::dateTime("00:00:00", $date);
$date_max = CMbDT::dateTime("23:59:59", $date);
$where["sejour.entree"] = "<= '{$date_max}'";
$where["sejour.sortie"] = ">= '{$date_min}'";
$total_sejours = $sejour->loadList($where, $order, null, null, $ljoin);
} else {
$total_sejours = null;
}
$patients = CMbObject::massLoadFwdRef($sejours, "patient_id");
$praticiens = CMbObject::massLoadFwdRef($sejours, "praticien_id");
$functions = CMbObject::massLoadFwdRef($praticiens, "function_id");
// Chargement optimisée des prestations
CSejour::massCountPrestationSouhaitees($sejours);
CStoredObject::massLoadBackRefs($sejours, "notes");
CStoredObject::massLoadBackRefs($patients, "dossier_medical");
// Chargement des NDA
CSejour::massLoadNDA($sejours);
// Chargement des IPP
CPatient::massLoadIPP($patients);
// Chargement optimisé des prestations
CSejour::massCountPrestationSouhaitees($sejours);
$operations = CStoredObject::massLoadBackRefs($sejours, "operations", "date ASC", array("annulee" => "= '0'"));
CStoredObject::massLoadBackRefs($operations, "actes_ngap", "lettre_cle DESC");
$order = "code_association, code_acte,code_activite, code_phase, acte_id";
CStoredObject::massLoadBackRefs($operations, "actes_ccam", $order);
CStoredObject::massLoadBackRefs($sejours, "affectations");
示例12: loadRefsBesoins
/**
* Chargement des besoins
*
* @param string $from Date de début
* @param string $to Date de fin
*
* @return CBesoinRessource[]
*/
function loadRefsBesoins($from, $to)
{
if (!$from && !$to) {
return $this->_ref_besoins = array();
}
$besoin = new CBesoinRessource();
$where = array();
$ljoin = array();
$from_date = CMbDT::date($from);
$to_date = CMbDT::date($to);
$ljoin["operations"] = "besoin_ressource.operation_id = operations.operation_id";
$ljoin["usage_ressource"] = "usage_ressource.besoin_ressource_id = besoin_ressource.besoin_ressource_id";
// On ne charge que les besoins qui n'ont pas d'usage
$where[] = "usage_ressource.usage_ressource_id IS NULL";
$where["operations.date"] = "BETWEEN '{$from_date}' AND '{$to_date}'";
// Sur les interventions non annulées
$where["operations.annulee"] = "= '0'";
if ($this->type_ressource_id) {
$ljoin["ressource_materielle"] = "ressource_materielle.type_ressource_id = besoin_ressource.type_ressource_id";
$where["ressource_materielle.type_ressource_id"] = "= '{$this->type_ressource_id}'";
}
/** @var CBesoinRessource[] $besoins */
$besoins = $besoin->loadList($where, null, null, "besoin_ressource_id", $ljoin);
CMbObject::massLoadFwdRef($besoins, "operation_id");
foreach ($besoins as $_besoin) {
$operation = $_besoin->loadRefOperation();
$operation->loadRefPlageOp();
$deb_op = $operation->_datetime;
$fin_op = CMbDT::addDateTime($operation->temp_operation, $deb_op);
if ($deb_op > $to || $fin_op < $from) {
unset($besoins[$_besoin->_id]);
}
}
return $this->_ref_besoins = $besoins;
}
示例13: fillLimitedTemplate
function fillLimitedTemplate(&$template)
{
$this->loadRefsFwd(1);
$this->loadRefPraticien();
$this->loadRefChir2();
$this->loadRefChir3();
$this->loadRefChir4();
$this->loadRefsFiles();
$this->loadAffectationsPersonnel();
$plageop = $this->_ref_plageop;
$plageop->loadAffectationsPersonnel();
foreach ($this->_ext_codes_ccam as $_code) {
$_code->getRemarques();
$_code->getActivites();
}
$this->notify("BeforeFillLimitedTemplate", $template);
for ($i = 1; $i < 5; $i++) {
$prop = "_ref_chir" . ($i == 1 ? "" : "_{$i}");
$praticien = $this->{$prop};
$praticien->loadRefFunction();
$praticien->loadRefDiscipline();
$praticien->loadRefSpecCPAM();
$number = $i == 1 ? "" : " {$i}";
$template->addProperty("Opération - Chirurgien{$number}", $praticien->_id ? "Dr " . $praticien->_view : '');
$template->addProperty("Opération - Chirurgien{$number} - Nom", $praticien->_user_last_name);
$template->addProperty("Opération - Chirurgien{$number} - Prénom", $praticien->_user_first_name);
$template->addProperty("Opération - Chirurgien{$number} - Initiales", $praticien->_shortview);
$template->addProperty("Opération - Chirurgien{$number} - Discipline", $praticien->_ref_discipline->_view);
$template->addProperty("Opération - Chirurgien{$number} - Spécialité", $praticien->_ref_spec_cpam->_view);
$template->addProperty("Opération - Chirurgien{$number} - CAB", $praticien->cab);
$template->addProperty("Opération - Chirurgien{$number} - CONV", $praticien->conv);
$template->addProperty("Opération - Chirurgien{$number} - ZISD", $praticien->zisd);
$template->addProperty("Opération - Chirurgien{$number} - IK", $praticien->ik);
$template->addProperty("Opération - Chirurgien{$number} - Titres", $praticien->titres);
$template->addProperty("Opération - Chirurgien{$number} - ADELI", $praticien->adeli);
$template->addBarcode("Opération - Chirurgien{$number} - Code barre ADELI", $praticien->adeli, array("barcode" => array("title" => CAppUI::tr("CMediusers-adeli"))));
$template->addProperty("Opération - Chirurgien{$number} - RPPS", $praticien->rpps);
$template->addBarcode("Opération - Chirurgien{$number} - Code barre RPPS", $praticien->rpps, array("barcode" => array("title" => CAppUI::tr("CMediusers-rpps"))));
$template->addProperty("Opération - Chirurgien{$number} - E-mail", $praticien->_user_email);
$template->addProperty("Opération - Chirurgien{$number} - E-mail Apicrypt", $praticien->mail_apicrypt);
}
$template->addProperty("Opération - Anesthésiste - nom", @$this->_ref_anesth->_user_last_name);
$template->addProperty("Opération - Anesthésiste - prénom", @$this->_ref_anesth->_user_first_name);
$template->addProperty("Opération - Anesthésie", $this->_lu_type_anesth);
$template->addProperty("Opération - libellé", $this->libelle);
$template->addProperty("Opération - CCAM1 - code", @$this->_ext_codes_ccam[0]->code);
$template->addProperty("Opération - CCAM1 - description", @$this->_ext_codes_ccam[0]->libelleLong);
$template->addProperty("Opération - CCAM1 - montant activité 1", @$this->_ext_codes_ccam[0]->activites[1]->phases[0]->tarif);
$template->addProperty("Opération - CCAM1 - montant activité 4", @$this->_ext_codes_ccam[0]->activites[4]->phases[0]->tarif);
$template->addProperty("Opération - CCAM2 - code", @$this->_ext_codes_ccam[1]->code);
$template->addProperty("Opération - CCAM2 - description", @$this->_ext_codes_ccam[1]->libelleLong);
$template->addProperty("Opération - CCAM2 - montant activité 1", @$this->_ext_codes_ccam[1]->activites[1]->phases[0]->tarif);
$template->addProperty("Opération - CCAM2 - montant activité 4", @$this->_ext_codes_ccam[1]->activites[4]->phases[0]->tarif);
$template->addProperty("Opération - CCAM3 - code", @$this->_ext_codes_ccam[2]->code);
$template->addProperty("Opération - CCAM3 - description", @$this->_ext_codes_ccam[2]->libelleLong);
$template->addProperty("Opération - CCAM3 - montant activité 1", @$this->_ext_codes_ccam[2]->activites[1]->phases[0]->tarif);
$template->addProperty("Opération - CCAM3 - montant activité 4", @$this->_ext_codes_ccam[2]->activites[4]->phases[0]->tarif);
$template->addProperty("Opération - CCAM - codes", implode(" - ", $this->_codes_ccam));
if (CModule::getActive("tarmed") && CAppUI::conf("tarmed CCodeTarmed use_cotation_tarmed")) {
$this->loadRefsActes();
$template->addProperty("Opération - TARMED - codes", CActeTarmed::actesHtml($this), '', false);
$template->addProperty("Opération - Caisse - codes", CActeCaisse::actesHtml($this), '', false);
}
$template->addProperty("Opération - CCAM - descriptions", implode(" - ", CMbArray::pluck($this->_ext_codes_ccam, "libelleLong")));
$template->addProperty("Opération - salle", @$this->_ref_salle->nom);
$template->addProperty("Opération - côté", $this->cote);
$template->addProperty("Opération - position", $this->getFormattedValue("position"));
$template->addDateProperty("Opération - date", $this->_datetime_best != " 00:00:00" ? $this->_datetime_best : "");
$template->addLongDateProperty("Opération - date longue", $this->_datetime_best != " 00:00:00" ? $this->_datetime_best : "");
$template->addTimeProperty("Opération - heure", $this->time_operation);
$template->addTimeProperty("Opération - durée", $this->temp_operation);
$template->addTimeProperty("Opération - durée réelle", $this->_duree_interv);
$template->addTimeProperty("Opération - entrée bloc", $this->entree_salle);
$template->addTimeProperty("Opération - pose garrot", $this->pose_garrot);
$template->addTimeProperty("Opération - début induction", $this->induction_debut);
$template->addTimeProperty("Opération - début op", $this->debut_op);
$template->addTimeProperty("Opération - fin op", $this->fin_op);
$template->addTimeProperty("Opération - fin induction", $this->induction_fin);
$template->addTimeProperty("Opération - retrait garrot", $this->retrait_garrot);
$template->addTimeProperty("Opération - sortie bloc", $this->sortie_salle);
$template->addTimeProperty("Opération - entrée SSPI", $this->entree_reveil);
$template->addTimeProperty("Opération - sortie SSPI", $this->sortie_reveil_reel);
$template->addProperty("Opération - dépassement anesth", $this->depassement_anesth);
$template->addProperty("Opération - Passage USCPO", "{$this->duree_uscpo} nuit(s)");
if (CModule::getActive("mvsante")) {
$template->addTimeProperty("Opération - Remise au chirurgien", $this->remise_chir);
/** @var CLiaisonLibelleInterv[] $liaisons_libelles */
$liaisons_libelles = $this->loadBackRefs("liaison_libelle", "numero");
CMbObject::massLoadFwdRef($liaisons_libelles, "libelleop_id");
$libelles = array(0 => "", 1 => "", 2 => "", 3 => "");
foreach ($liaisons_libelles as $_liaison) {
$libelles[$_liaison->numero - 1] = $_liaison->loadRefLibelle()->nom;
}
$template->addProperty("Opération - Libellé 1", $libelles[0]);
$template->addProperty("Opération - Libellé 2", $libelles[1]);
$template->addProperty("Opération - Libellé 3", $libelles[2]);
$template->addProperty("Opération - Libellé 4", $libelles[3]);
}
$template->addProperty("Opération - depassement", $this->depassement);
$template->addProperty("Opération - exams pre-op", $this->examen);
//.........这里部分代码省略.........
示例14: foreach
foreach ($observations as $_obs) {
$_obs->loadRefUser();
$_obs->loadTargetObject();
if ($_obs->_ref_object) {
$_obs->_ref_object->loadRefsFwd();
}
$_obs->_ref_sejour = $sejours[$_obs->sejour_id];
$trans_and_obs[$_obs->_ref_sejour->patient_id][$_obs->date][] = $_obs;
}
$cste = new CConstantesMedicales();
$whereCstes = array();
$whereCstes[] = "(datetime >= '{$dateTime_min} ' AND datetime <= '{$dateTime_max}')";
$whereCstes["context_class"] = " = 'CSejour'";
$whereCstes["context_id"] = CSQLDataSource::prepareIn(array_keys($sejours));
$constantes = $cste->loadList($whereCstes, "FIND_IN_SET(context_id, '" . implode(',', $sejours_ids) . "')");
CMbObject::massLoadFwdRef($constantes, "user_id");
foreach ($constantes as $_constante) {
$_constante->loadRefUser();
$_constante->_ref_context = $sejours[$_constante->context_id];
$trans_and_obs[$_constante->patient_id][$_constante->datetime][] = $_constante;
}
// Tri des transmission, observations et constantes par date décroissante
foreach ($trans_and_obs as &$_trans) {
krsort($_trans, SORT_STRING);
}
}
if ($do_medicaments || $do_injections || $do_perfusions || $do_aerosols || $do_elements || $do_stupefiants) {
$prescription = new CPrescription();
$wherePresc = array();
$wherePresc["object_class"] = " = 'CSejour'";
$wherePresc["object_id"] = CSQLDataSource::prepareIn(array_keys($sejours));
示例15: loadView
/**
* @see parent::loadView()
*/
function loadView()
{
parent::loadView();
$naissances = $this->loadRefsNaissances();
$sejours = CMbObject::massLoadFwdRef($naissances, "sejour_enfant_id");
CMbObject::massLoadFwdRef($sejours, "patient_id");
foreach ($naissances as $_naissance) {
$_naissance->loadRefSejourEnfant()->loadRefPatient();
}
$this->loadLastAllaitement();
}