本文整理汇总了PHP中CSejour::loadList方法的典型用法代码示例。如果您正苦于以下问题:PHP CSejour::loadList方法的具体用法?PHP CSejour::loadList怎么用?PHP CSejour::loadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSejour
的用法示例。
在下文中一共展示了CSejour::loadList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
if (!in_array($order_col, array("_entree", "ccmu", "_patient_id"))) {
$order_col = "ccmu";
}
switch ($order_col) {
case "_entree":
$order = "entree {$order_way}, rpu.ccmu {$order_way}";
break;
case "ccmu":
$order = "rpu.ccmu {$order_way}, entree {$order_way}";
break;
case "_patient_id":
$order = "patients.nom {$order_way}, ccmu {$order_way}";
}
/** @var CSejour[] $listSejours */
$listSejours = $sejour->loadList($where, $order, null, "`sejour`.sejour_id", $ljoin);
if ($service_id) {
foreach ($listSejours as $key => $sejour) {
$curr_aff = $sejour->getCurrAffectation();
if (!$curr_aff->_id && (!$sejour->service_id || $sejour->service_id != $service_id) || $curr_aff->service_id != $service_id) {
unset($listSejours[$key]);
}
}
}
CMbObject::massLoadFwdRef($listSejours, "patient_id");
CMbObject::massLoadFwdRef($listSejours, "group_id");
$prats = CMbObject::massLoadFwdRef($listSejours, "praticien_id");
CMbObject::massLoadFwdRef($prats, "function_id");
CMbObject::massCountBackRefs($listSejours, "notes");
CMbObject::massCountBackRefs($listSejours, "rpu");
CMbObject::massCountBackRefs($listSejours, "consultations");
示例2: loadRefsSejours
/**
* Charge les séjours du patient
*
* @param array $where SQL where clauses
*
* @return CSejour[]n loadRef
*/
function loadRefsSejours($where = array())
{
if (!$this->_id) {
return $this->_ref_sejours = array();
}
$sejour = new CSejour();
$group_id = CGroups::loadCurrent()->_id;
$where["patient_id"] = "= '{$this->_id}'";
if (CAppUI::conf("dPpatients CPatient multi_group") == "hidden") {
$where["sejour.group_id"] = "= '{$group_id}'";
}
$order = "entree DESC";
return $this->_ref_sejours = $sejour->loadList($where, $order);
}
示例3: CService
ob_clean();
CApp::setMemoryLimit("1024M");
CApp::setTimeLimit(240);
$service_id = CValue::get("service_id");
$date = CValue::get("date", CMbDT::date());
$service = new CService();
$service->load($service_id);
$datetime_min = "{$date} 00:00:00";
$datetime_max = "{$date} 23:59:59";
$datetime_avg = "{$date} " . CMbDT::time();
$sejour = new CSejour();
$where = array();
$ljoin = array();
$ljoin["affectation"] = "sejour.sejour_id = affectation.sejour_id";
$where["sejour.entree"] = "<= '{$datetime_max}'";
$where["sejour.sortie"] = " >= '{$datetime_min}'";
$where["affectation.entree"] = "<= '{$datetime_max}'";
$where["affectation.sortie"] = ">= '{$datetime_min}'";
$where["affectation.service_id"] = " = '{$service_id}'";
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, null, null, "sejour.sejour_id", $ljoin);
$ordonnances = array();
foreach ($sejours as $_sejour) {
$_prescription = $_sejour->loadRefPrescriptionSejour();
$_patient = $_sejour->loadRefPatient();
$params = array("prescription_id" => $_prescription->_id ?: "", "in_progress" => 1, "multipart" => 1);
$_content = CApp::fetch("dPprescription", "print_prescription_fr", $params);
$_naissance = str_replace("/", "-", $_patient->getFormattedValue("naissance"));
$ordonnances[] = array("title" => base64_encode($_patient->_view . " - " . $_naissance), "content" => base64_encode($_content), "extension" => "pdf");
}
CApp::json($ordonnances);
示例4: CSejour
$page = CValue::get("page", 0);
$next = CMbDT::date("+1 day", $date);
$sejour = new CSejour();
$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();
示例5: array
$where["isolement"] = "= '1'";
}
$items_prestation = array();
if ($prestation_id) {
$prestation = new CPrestationJournaliere();
$prestation->load($prestation_id);
$items_prestation = $prestation->loadBackRefs("items", "rank asc");
}
if ($item_prestation_id && $prestation_id) {
// L'axe de prestation a pu changer, donc ne pas appliquer l'item de prestation s'il ne fait pas partie de l'axe choisi
if (isset($items_prestation[$item_prestation_id])) {
$ljoin["item_liaison"] = "sejour.sejour_id = item_liaison.sejour_id";
$where["item_liaison.item_souhait_id"] = " = '{$item_prestation_id}'";
}
}
$sejours = $sejour->loadList($where, $order, null, null, $ljoin);
$praticiens = CStoredObject::massLoadFwdRef($sejours, "praticien_id");
CStoredObject::massLoadFwdRef($sejours, "prestation_id");
CStoredObject::massLoadFwdRef($praticiens, "function_id");
CStoredObject::massLoadFwdRef($sejours, "patient_id");
$services = CStoredObject::massLoadFwdRef($sejours, "service_id");
foreach ($sejours as $_sejour_imc) {
/* @var CAffectation $_affectation_imc*/
$conf_imc = $_sejour_imc->service_id ? "CService-" . $_sejour_imc->service_id : CGroups::loadCurrent();
if (CAppUI::conf("dPhospi vue_temporelle show_imc_patient", $conf_imc)) {
$_sejour_imc->loadRefPatient()->loadRefLatestConstantes(null, array("poids", "taille"));
}
}
$sejours_non_affectes = array();
$functions_filter = array();
$operations = array();
示例6: CSejour
}
}
/**
* Comptage des séjours
*/
$group = CGroups::loadCurrent();
$next = CMbDT::date("+1 day", $date);
$sejour = new CSejour();
$where = array();
$where["entree"] = "< '{$next}'";
$where["sortie"] = "> '{$date}'";
$where["group_id"] = "= '{$group->_id}'";
$where["annule"] = "= '0'";
$order = array();
$order[] = "sortie";
$order[] = "entree";
/** @var CSejour[] $listSejours */
$count = $sejour->countList($where);
$listSejours = $sejour->loadList($where, $order);
foreach ($listSejours as $_sejour) {
$counts["sejours"]["total"]++;
if ($_sejour->facture) {
$counts["sejours"]["facturees"]++;
}
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("counts", $counts);
$smarty->assign("totalOp", $totalOp);
$smarty->display("current_dossiers/inc_current_dossiers.tpl");
示例7: array
if ($mode == "count" || $mode == "referenced") {
$join = array();
$join["patients"] = "patients.patient_id = sejour.patient_id";
$order = "nom, prenom";
$join["bilan_ssr"] = "bilan_ssr.sejour_id = sejour.sejour_id";
$join["technicien"] = "technicien.technicien_id = bilan_ssr.technicien_id";
$where = array();
$where["sejour.type"] = "= 'ssr'";
$where["sejour.entree"] = "<= '{$planning->date_max}'";
$where["sejour.sortie"] = ">= '{$planning->date_min}'";
$where["sejour.annule"] = "= '0'";
$where["technicien.kine_id"] = "= '{$kine_id}'";
if ($mode == "count") {
$counts["referenced"] = $sejour->countList($where, null, $join);
} else {
$sejours = $sejour->loadList($where, $order, null, null, $join);
}
}
// Sejours pour lesquels le kine est remplaçant
if ($mode == "count" || $mode == "replaced") {
$order = "nom, prenom";
$join = array();
$join["patients"] = "patients.patient_id = sejour.patient_id";
$join["replacement"] = "replacement.sejour_id = sejour.sejour_id";
$join["plageconge"] = "plageconge.plage_id = replacement.conge_id";
$where = array();
$where["sejour.type"] = "= 'ssr'";
$where["sejour.entree"] = "<= '{$planning->date_max}'";
$where["sejour.sortie"] = ">= '{$planning->date_min}'";
$where["sejour.annule"] = "= '0'";
$where["replacement.replacement_id"] = "IS NOT NULL";
示例8: foreach
if ($service_id == "NP") {
$ljoin["affectation"] = "sejour.sejour_id = affectation.sejour_id";
$where["affectation.affectation_id"] = "IS NULL";
$where["sejour.group_id"] = "= '{$group->_id}'";
} else {
$ljoin["affectation"] = "sejour.sejour_id = affectation.sejour_id";
$where["affectation.entree"] = "<= '{$dateTime_max}'";
$where["affectation.sortie"] = ">= '{$dateTime_min}'";
$where["affectation.service_id"] = " = '{$service_id}'";
}
}
if ($_present_only) {
$where["sejour.sortie_reelle"] = 'IS NULL';
}
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, $order_by, null, "sejour.sejour_id", $ljoin);
CMbObject::massLoadFwdRef($sejours, "patient_id");
CMbObject::massCountBackRefs($sejours, "operations");
foreach ($sejours as $_sejour) {
$_sejour->loadRefPatient()->loadRefLatestConstantes();
$_sejour->loadRefsOperations();
$last_op = $_sejour->_ref_last_operation;
$last_op->loadRefPlageOp();
$last_op->loadRefChir();
$last_op->loadExtCodesCCAM();
$affectations = $_sejour->loadRefsAffectations();
$_lits = CMbObject::massLoadFwdRef($affectations, "lit_id");
CMbObject::massLoadFwdRef($_lits, "chambre_id");
}
$sorter_affectation = CMbArray::pluck($sejours, "_ref_last_affectation", "_view");
$sorter_patient = CMbArray::pluck($sejours, "_ref_patient", "nom");
示例9: array
$where["rpu.box_id"] = CSQLDataSource::prepareIn(array_keys($lits));
}
if (!CAppUI::conf("dPurgences create_sejour_hospit")) {
$where[] = "rpu.mutation_sejour_id IS NULL";
}
if (!CAppUI::conf("dPurgences view_rpu_uhcd")) {
$where["sejour.uhcd"] = " = '0'";
}
$where_temp = $where;
if ($temp != "") {
$where_temp[] = $temp;
}
$sejours_chambre = array();
$sejour = new CSejour();
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where_temp, null, null, "sejour_id", $ljoin, "entree");
if (!CAppUI::conf("dPurgences view_rpu_uhcd")) {
$where["sejour.uhcd"] = " = '1'";
$sejours_uhcd = $sejour->loadList($where, null, null, "sejour_id", $ljoin, "entree");
foreach ($sejours_uhcd as $sejour_uhcd) {
$sejours[$sejour_uhcd->_id] = $sejour_uhcd;
}
}
foreach ($sejours as $sejour) {
$sejour->loadRefPatient();
$sejour->loadRefPraticien();
$sejour->loadRefCurrAffectation()->loadRefService();
if (!$sejour->loadRefRPU()->_id) {
$sejour->_ref_rpu = $sejour->loadUniqueBackRef("rpu_mute");
if (!$sejour->_ref_rpu) {
$sejour->_ref_rpu = new CRPU();
示例10: CSejour
$echg_hprim->object_id = $nda->object_id;
$echg_hprim->id_permanent = $nda->id400;
$echg_hprim->store();
$anc++;
continue;
}
// Sinon rattachement à un sejour existant
$sejour = new CSejour();
$where = array();
$where["patient_id"] = "= '{$hprimPatient->patient_id}'";
$date_min = CMbDT::date("-2 day", $_sejour->date_mouvement);
$date_max = CMbDT::date("+2 day", $_sejour->date_mouvement);
$where["entree"] = "BETWEEN '{$date_min}' AND '{$date_max}'";
$where["type"] = "!= 'consult'";
$where["annule"] = "= '0'";
$listSej = $sejour->loadList($where);
if (count($listSej) > 1) {
$moresej++;
continue;
}
if (!count($listSej)) {
continue;
}
$sejour = reset($listSej);
if ($sejour->_id) {
$nda->object_id = $sejour->_id;
$nda->last_update = CMbDT::dateTime();
$nda->store();
$_sejour->sejour_id = $sejour->_id;
$_sejour->store();
$echg_hprim->object_class = $nda->object_class;
示例11: CSejour
* @subpackage PlanningOp
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkAdmin();
$sejour = new CSejour();
$group = CGroups::loadCurrent();
// Supression de patients
$suppr = 0;
$error = 0;
$qte = CValue::get("qte", 1);
$date_min = CValue::get("date_min", CMbDT::date());
$date_min = $date_min ? $date_min : CMbDT::date();
$where = array("entree" => ">= '{$date_min} 00:00:00'", "group_id" => "= '{$group->_id}'");
$listSejours = $sejour->loadList($where, null, $qte);
foreach ($listSejours as $_sejour) {
CAppUI::setMsg($_sejour->_view, UI_MSG_OK);
if ($msg = $_sejour->purge()) {
CAppUI::setMsg($msg, UI_MSG_ALERT);
$error++;
continue;
}
CAppUI::setMsg("séjour supprimé", UI_MSG_OK);
$suppr++;
}
// Nombre de patients
$nb_sejours = $sejour->countList($where);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("resultsMsg", CAppUI::getMsg());
示例12: array
CSejour::massLoadNDA($sejours);
break;
case "A11":
$where = array();
if ($event_type == "register_outpatient") {
$where["type"] = "= 'urg'";
}
$sejours = $patient->loadRefsSejours($where);
CSejour::massLoadNDA($sejours);
break;
case "A12":
$leftjoin = array("affectation" => "affectation.sejour_id = sejour.sejour_id");
$where = array("patient_id" => "= '{$patient->_id}'", "entree_reelle" => "IS NOT NULL", "affectation_id" => "IS NOT NULL");
$sejour = new CSejour();
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, "entree DESC", null, null, $leftjoin);
$patient->_ref_sejours = $sejours;
CSejour::massLoadNDA($sejours);
CSejour::massLoadBackRefs($sejours, "affectations");
foreach ($sejours as $_sejour) {
$_sejour->_ref_affectations = $_sejour->_back["affectations"];
}
break;
case "A13":
$sejours = $patient->loadRefsSejours(array("sortie_reelle" => "IS NOT NULL"));
CSejour::massLoadNDA($sejours);
break;
case "A38":
$sejours = $patient->loadRefsSejours(array("sortie_reelle" => "IS NULL", "entree_reelle" => "IS NULL"));
CSejour::massLoadNDA($sejours);
break;
示例13: handle
//.........这里部分代码省略.........
}
if (empty($identifier_list["id_number"]) && (!empty($identifier_list["namespace_id"]) || !empty($identifier_list["universal_id"]))) {
$namespace_id = $identifier_list["namespace_id"];
$universal_id = $identifier_list["universal_id"];
$domain = new CDomain();
if ($namespace_id) {
$domain->namespace_id = $namespace_id;
}
if ($universal_id) {
$domain->OID = $universal_id;
}
if ($domain->namespace_id || $domain->OID) {
$domain->loadMatchingObject();
$where[] = $ds->prepare("id_sej_list.tag = %", $domain->tag);
}
}
}
foreach ($this->getRequestSejour($data["QPD"]) as $field => $value) {
if ($value == "") {
continue;
}
$value = preg_replace("/[^a-z\\*]/i", "_", $value);
$value = preg_replace("/\\*+/", "%", $value);
$where["sejour.{$field}"] = $ds->prepare("LIKE %", $value);
$request_admit = true;
}
if ($other_request = $this->getOtherRequestSejour($data["QPD"])) {
$where = array_merge($other_request, $where);
$request_admit = true;
}
$i = 1;
$domains = array();
foreach ($this->getQPD8s($data["QPD"]) as $_QPD8) {
// Requête sur un domaine particulier
$domains_returned_namespace_id = $_QPD8["domains_returned_namespace_id"];
// Requête sur un OID particulier
$domains_returned_universal_id = $_QPD8["domains_returned_universal_id"];
$domain = new CDomain();
if ($domains_returned_namespace_id) {
$domain->namespace_id = $domains_returned_namespace_id;
}
if ($domains_returned_universal_id) {
$domain->OID = $domains_returned_universal_id;
}
if ($domain->namespace_id || $domain->OID) {
$domain->loadMatchingObject();
}
$value = $domain->OID ? $domain->OID : $domain->tag;
// Cas où le domaine n'est pas retrouvé
if (!$domain->_id) {
return $exchange_hl7v2->setPDRAE($ack, null, $value);
}
$domains[] = $domain;
if ($domains_returned_namespace_id) {
$ljoin[20 + $i] = "id_sante400 AS id{$i} ON id{$i}.object_id = patients.patient_id";
$where[] = $ds->prepare("id{$i}.tag = %", $domain->tag);
$i++;
}
}
$quantity_limited_request = $this->getQuantityLimitedRequest($data["RCP"]);
$limit_quantity = !!$quantity_limited_request;
$quantity_limited_request = $quantity_limited_request ? $quantity_limited_request : 100;
$pointer = null;
if (isset($data["DSC"])) {
$pointer = $this->getContinuationPointer($data["DSC"]);
}
$objects = array();
if (!$request_admit) {
// Pointeur pour continuer
if ($pointer) {
$patient->_pointer = $pointer;
// is_numeric
$where["patients.patient_id"] = $ds->prepare(" > %", $pointer);
}
$order = "patients.patient_id ASC";
if (!empty($where)) {
$objects = $patient->loadList($where, $order, $quantity_limited_request, "patients.patient_id", $ljoin);
// If we have no next match, we won't have to add a DSC segment
if ($limit_quantity) {
$next_one = $patient->loadList($where, $order, "{$quantity_limited_request},1", "patients.patient_id", $ljoin);
if (count($next_one) == 0) {
$limit_quantity = false;
}
}
}
} else {
$ljoin[100] = "patients ON `patients`.`patient_id` = `sejour`.`patient_id`";
/** @var $sejour CSejour */
$sejour = new CSejour();
if (!empty($where)) {
$objects = $sejour->loadList($where, null, $quantity_limited_request, "sejour.sejour_id", $ljoin);
}
}
// Save information indicating that we are doing an incremental query
$last = end($objects);
if ($last && $limit_quantity) {
$last->_incremental_query = true;
}
return $exchange_hl7v2->setPDRAA($ack, $objects, null, $domains);
}
示例14: array
$where = array();
$where["lit_id"] = "= '{$lit_id}'";
$where["entree"] = "<= '{$date_max}'";
$where["sortie"] = ">= '{$date_min}'";
$affectation = new CAffectation();
$affectations = $affectation->loadList($where, "parent_affectation_id ASC");
// Ajout des prolongations anormales
// (séjours avec entrée réelle et sortie non confirmée et sortie < maintenant
$nb_days_prolongation = CAppUI::conf("dPhospi nb_days_prolongation");
if ($nb_days_prolongation) {
$sejour = new CSejour();
$max = CMbDT::dateTime();
$min = CMbDT::date("-{$nb_days_prolongation} days", $max) . " 00:00:00";
$where = array("entree_reelle" => "IS NOT NULL", "sortie_reelle" => "IS NULL", "sortie_prevue" => "BETWEEN '{$min}' AND '{$max}'", "sejour.confirme" => "IS NULL", "group_id" => "= '{$group_id}'");
/** @var CSejour[] $sejours_prolonges */
$sejours_prolonges = $sejour->loadList($where);
$affectations_prolong = array();
foreach ($sejours_prolonges as $_sejour) {
$aff = $_sejour->getCurrAffectation($_sejour->sortie);
if (!$aff->_id || $aff->lit_id != $lit_id) {
continue;
}
$aff->_is_prolong = true;
$affectations[$aff->_id] = $aff;
}
}
$sejours = CStoredObject::massLoadFwdRef($affectations, "sejour_id");
$patients = CStoredObject::massLoadFwdRef($sejours, "patient_id");
$praticiens = CStoredObject::massLoadFwdRef($sejours, "praticien_id");
CStoredObject::massLoadFwdRef($praticiens, "function_id");
CStoredObject::massLoadBackRefs($patients, "dossier_medical");
示例15: CSejour
// Chargement du patient
$patient = $consult->_ref_patient;
$patient->countBackRefs("consultations");
$patient->countBackRefs("sejours");
$patient->loadRefs();
$patient->loadRefsNotes();
$patient->loadRefPhotoIdentite();
$sejour = new CSejour();
$group_id = CGroups::loadCurrent()->_id;
$where = array();
$where["patient_id"] = "= '{$patient->_id}'";
if (CAppUI::conf("dPpatients CPatient multi_group") == "hidden") {
$where["sejour.group_id"] = "= '{$group_id}'";
}
$order = "entree ASC";
$patient->_ref_sejours = $sejour->loadList($where, $order);
$date_consult = $consult->_ref_plageconsult->date;
$ops_sans_dossier_anesth = array();
$ops_annulees = array();
// Chargement de ses séjours
foreach ($patient->_ref_sejours as $_key => $_sejour) {
if ($date_consult > $_sejour->entree_prevue && $date_consult > $_sejour->sortie_prevue) {
unset($patient->_ref_sejours[$_sejour->_id]);
continue;
}
$_sejour->loadRefsOperations();
$_sejour->loadRefsFwd();
foreach ($_sejour->_ref_operations as $_operation) {
$_operation->loadRefsFwd();
$_operation->_ref_chir->loadRefFunction()->loadRefGroup();
$day = CMbDT::daysRelative($consult->_ref_plageconsult->date, $_operation->_ref_plageop->date);