当前位置: 首页>>代码示例>>PHP>>正文


PHP CSejour::massLoadNDA方法代码示例

本文整理汇总了PHP中CSejour::massLoadNDA方法的典型用法代码示例。如果您正苦于以下问题:PHP CSejour::massLoadNDA方法的具体用法?PHP CSejour::massLoadNDA怎么用?PHP CSejour::massLoadNDA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSejour的用法示例。


在下文中一共展示了CSejour::massLoadNDA方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$where = array();
$where["entree"] = "< '{$next}'";
$where["sortie"] = "> '{$date}'";
$where["group_id"] = "= '{$group->_id}'";
$where["annule"] = "= '0'";
$order = array();
$order[] = "sortie";
$order[] = "entree";
$step = 30;
$limit = "{$page},{$step}";
/** @var CSejour[] $listSejours */
$count = $sejour->countList($where);
$listSejours = $sejour->loadList($where, $order, $limit);
$patients = CSejour::massLoadFwdRef($listSejours, "patient_id");
$ipps = CPatient::massLoadIPP($patients);
$ndas = CSejour::massLoadNDA($listSejours);
$praticiens = CSejour::massLoadFwdRef($listSejours, "praticien_id");
CMediusers::massLoadFwdRef($praticiens, "function_id");
CSejour::massLoadFwdRef($listSejours, "group_id");
CSejour::massLoadFwdRef($listSejours, "etablissement_sortie_id");
CSejour::massLoadFwdRef($listSejours, "service_sortie_id");
CSejour::massLoadFwdRef($listSejours, "service_sortie_id");
foreach ($listSejours as $_sejour) {
    $_sejour->_ref_patient = $patients[$_sejour->patient_id];
    $_sejour->loadRefPraticien();
    $_sejour->loadExtCodesCCAM();
    $_sejour->loadRefsFactureEtablissement();
    $_sejour->countActes();
    $_sejour->loadRefTraitementDossier();
}
// Création du template
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_current_sejours.php

示例2: array

        $where["sejour.annule"] = " = '0'";
        if (CAppUI::conf("dPurgences create_sejour_hospit")) {
            $where["rpu.mutation_sejour_id"] = "IS NULL";
        }
        break;
    default:
        $where["affectation.entree"] = "<= '{$datetime_max}'";
        $where["affectation.sortie"] = ">= '{$datetime_min}'";
        $where["affectation.service_id"] = " = '{$service_id}'";
}
$patients_offline = array();
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, null, null, "sejour.sejour_id", $ljoin);
CSejour::massLoadSurrAffectation($sejours, $datetime_avg);
CSejour::massLoadCurrAffectation($sejours, $datetime_avg, $service_id);
CSejour::massLoadNDA($sejours);
/** @var CPatient[] $patients */
$patients = CStoredObject::massLoadFwdRef($sejours, "patient_id");
CPatient::massLoadIPP($patients);
CStoredObject::massCountBackRefs($sejours, "operations");
// Recherche de transmissions // observations // consultations
$datetime_delta = CMbDT::date("-3 days", $datetime_avg);
$sejours_ids = CMbArray::pluck($sejours, "_id");
$where = array("sejour_id" => CSQLDataSource::prepareIn($sejours_ids));
// Transmissions
$whereTrans = $where;
$whereTrans["libelle_atc"] = "IS NOT NULL";
$whereTrans["date"] = "BETWEEN '{$datetime_delta}' AND '{$datetime_avg}'";
$transmission = new CTransmissionMedicale();
$transmissions = $transmission->loadList($whereTrans, "date");
$whereTrans = $where;
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:offline_sejours_lite.php

示例3: unset

            $next["CSejour"]->loadRefsNotes();
            if ($filter == "dhe") {
                unset($listConsultations[$_consult->_id]);
            }
        }
        $_consult->_next_sejour_and_operation = $next;
    } elseif ($filter == "dhe") {
        unset($listConsultations[$_consult->_id]);
    }
}
CStoredObject::massLoadFwdRef($sejours_total, "patient_id");
CStoredObject::massLoadFwdRef($sejours_total, "praticien_id");
CStoredObject::massLoadBackRefs($sejours_total, "notes");
CStoredObject::massLoadBackRefs($sejours_total, "affectations", "sortie DESC");
// Chargement des NDA
CSejour::massLoadNDA($sejours_total);
// Chargement optimisé des prestations
CSejour::massCountPrestationSouhaitees($sejours_total);
foreach ($sejours_total as $_sejour) {
    $_sejour->loadRefPatient();
    $_sejour->loadRefPraticien();
    $_sejour->loadRefsNotes();
    $_sejour->loadRefFirstAffectation();
    $_sejour->getDroitsCMU();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("hier", $hier);
$smarty->assign("demain", $demain);
$smarty->assign("filter", $filter);
$smarty->assign("is_modal", $is_modal);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_vw_preadmissions.php

示例4: loadServiceComplet

/**
 * Charge complètement un service pour l'affichage des affectations
 *
 * @param CService $service       le service concerné
 * @param string   $date          le filtre de date sur les affectations
 * @param string   $mode          forcer le chargement des affectations effectuées
 * @param int      $praticien     charge les séjours pour un praticien en particulier
 * @param string   $type          charge les séjours pour un type d'hospitalisation
 * @param int      $prestation_id charge la prestation éventuellement associée à chaque séjour
 *
 *
 * @return void
 */
function loadServiceComplet(&$service, $date, $mode, $praticien_id = "", $type = "", $prestation_id = "", $with_dossier_medical = true)
{
    $service->_nb_lits_dispo = 0;
    $dossiers = array();
    $systeme_presta = CAppUI::conf("dPhospi prestations systeme_prestations", CGroups::loadCurrent());
    $lits = $service->loadRefsLits();
    foreach ($lits as $_lit) {
        $_lit->_ref_affectations = array();
        $_lit->checkDispo($date);
    }
    $affectations = $service->loadRefsAffectations($date, $mode, false, true);
    $sejours = CMbObject::massLoadFwdRef($affectations, "sejour_id");
    CMbObject::massLoadFwdRef($sejours, "patient_id");
    CMbObject::massLoadFwdRef($sejours, "prestation_id");
    CMbObject::massLoadFwdRef($sejours, "praticien_id");
    if (CModule::getActive("dPImeds")) {
        CSejour::massLoadNDA($sejours);
    }
    foreach ($affectations as $_affectation) {
        $sejour = $_affectation->loadRefSejour();
        if ($praticien_id) {
            if ($sejour->praticien_id != $praticien_id) {
                unset($affectations[$_affectation->_id]);
                continue;
            }
        }
        if ($type) {
            if ($sejour->type != $type) {
                unset($affectations[$_affectation->_id]);
                continue;
            }
        }
        $lits[$_affectation->lit_id]->_ref_affectations[$_affectation->_id] = $_affectation;
        $_affectation->loadRefsAffectations(true);
        $_affectation->checkDaysRelative($date);
        $aff_prev = $_affectation->_ref_prev;
        if ($aff_prev->_id) {
            if ($aff_prev->lit_id) {
                $aff_prev->loadRefLit();
            } else {
                $aff_prev->loadRefService();
            }
        }
        $aff_next = $_affectation->_ref_next;
        if ($aff_next->_id) {
            if ($aff_next->lit_id) {
                $aff_prev->loadRefLit();
            } else {
                $aff_prev->loadRefService();
            }
        }
        $sejour->loadRefPrestation();
        $sejour->loadRefsOperations();
        $sejour->loadNDA();
        $sejour->loadRefPraticien();
        $sejour->loadRefPatient();
        if ($with_dossier_medical) {
            $sejour->_ref_patient->loadRefDossierMedical(false);
            $dossiers[] = $sejour->_ref_patient->_ref_dossier_medical;
        }
        // Chargement des droits CMU
        $sejour->getDroitsCMU();
        foreach ($sejour->_ref_operations as $_operation) {
            $_operation->loadExtCodesCCAM();
        }
        $_affectation->_ref_lit = $lits[$_affectation->lit_id];
        $_affectation->loadRefLit();
        $_affectation->_ref_lit->_ref_chambre->_nb_affectations++;
        if ($systeme_presta == "expert" && $prestation_id) {
            $sejour->loadLiaisonsForDay($prestation_id, $date);
        }
    }
    foreach ($lits as $_lit) {
        array_multisort(CMbArray::pluck($_lit->_ref_affectations, "_ref_sejour", "entree"), SORT_ASC, $_lit->_ref_affectations);
    }
    if ($with_dossier_medical) {
        CDossierMedical::massCountAntecedentsByType($dossiers, "deficience");
    }
    if (!$service->externe) {
        foreach ($service->_ref_chambres as $_chambre) {
            $_chambre->checkChambre();
            $service->_nb_lits_dispo += $_chambre->_nb_lits_dispo;
        }
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:98,代码来源:inc_vw_affectations.php

示例5: array

    CApp::$chrono->start();
    // Affectations dans les couloirs
    $where = array();
    $where[] = "affectation.service_id IN (" . join($services_ids, ',') . ")";
    $where["sejour.annule"] = " = '0'";
    $where[] = "(affectation.entree BETWEEN '{$date} 00:00:00' AND '{$date} 23:59:59')\r\n            OR (affectation.sortie BETWEEN '{$date} 00:00:00' AND '{$date} 23:59:59')";
    $groupSejourNonAffectes["couloir"] = loadAffectationsCouloirs($where, $order, null, $prestation_id);
}
$imeds_active = CModule::getActive("dPImeds");
$functions_filter = array();
foreach ($groupSejourNonAffectes as $_keyGroup => $_group) {
    if ($_keyGroup == "couloir") {
        continue;
    }
    if ($imeds_active) {
        CSejour::massLoadNDA($_group);
    }
    /** @var CSejour[] $_group */
    foreach ($_group as $_key => $_sejour) {
        $_sejour->loadRefChargePriceIndicator();
        $functions_filter[$_sejour->_ref_praticien->function_id] = $_sejour->_ref_praticien->_ref_function;
        if ($filterFunction && $filterFunction != $_sejour->_ref_praticien->function_id) {
            unset($groupSejourNonAffectes[$_keyGroup][$_key]);
        }
    }
}
$affectation = new CAffectation();
$affectation->entree = CMbDT::addDateTime("08:00:00", $date);
$affectation->sortie = CMbDT::addDateTime("23:00:00", $date);
// Chargement conf prestation
$systeme_presta = CAppUI::conf("dPhospi prestations systeme_prestations", "CGroups-{$g}");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:vw_affectations.php


注:本文中的CSejour::massLoadNDA方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。