本文整理汇总了PHP中CSejour::loadRefGrossesse方法的典型用法代码示例。如果您正苦于以下问题:PHP CSejour::loadRefGrossesse方法的具体用法?PHP CSejour::loadRefGrossesse怎么用?PHP CSejour::loadRefGrossesse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSejour
的用法示例。
在下文中一共展示了CSejour::loadRefGrossesse方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: storeGrossesse
/**
* Enregistrement de la grossesse
*
* @param CSejour $newVenue Admit
*
* @return null|string|void
*/
function storeGrossesse(CSejour $newVenue)
{
$sender = $this->_ref_sender;
if (!$sender->_configs["create_grossesse"]) {
return null;
}
if ($newVenue->type_pec != "O") {
return null;
}
$grossesse = $newVenue->loadRefGrossesse();
if (!$grossesse->_id) {
$patient = $newVenue->loadRefPatient();
$grossesse = $patient->loadLastGrossesse();
if (!$grossesse->_id) {
$grossesse->parturiente_id = $newVenue->patient_id;
$grossesse->group_id = $newVenue->group_id;
$grossesse->terme_prevu = CMbDT::date($newVenue->sortie);
$grossesse->_eai_sender_guid = $sender->_guid;
if ($msg = $grossesse->store()) {
return $msg;
}
}
}
$newVenue->grossesse_id = $grossesse->_id;
// On ne check pas la cohérence des dates des consults/intervs
$newVenue->_skip_date_consistencies = true;
$newVenue->_eai_sender_guid = $sender->_guid;
if ($msg = $newVenue->store()) {
return $msg;
}
return null;
}
示例2: orderCtes
/**
* Ordonnancement par degré des constantes notées
*
* @return void
*/
function orderCtes()
{
if (!$this->_id) {
return null;
}
$this->_ref_cts_degre = array(1 => array(), 2 => array(), 3 => array(), 4 => array());
$this->_estimation_ccmu = 4;
$this->_ref_latest_constantes = CConstantesMedicales::getLatestFor($this->_patient_id, null, array(), $this->_ref_sejour, false);
$where = array();
$where["patient_id"] = " = '" . $this->_patient_id . "'";
$where["context_class"] = " = '" . $this->_ref_sejour->_class . "'";
$where["context_id"] = " = '" . $this->_ref_sejour->_id . "'";
$where["comment"] = " IS NOT NULL";
$constante = new CConstantesMedicales();
$constante->loadObject($where, "datetime ASC");
if ($constante->_id) {
$this->_ref_latest_constantes[0]->comment = $constante->comment;
}
$latest_constantes = $this->_ref_latest_constantes;
$echelle_tri = $this->loadRefEchelleTri();
$grossesse = $this->_ref_sejour->loadRefGrossesse();
$sa_grossesse = CModule::getActive("maternite") && $grossesse->terme_prevu ? $grossesse->_semaine_grossesse : $echelle_tri->enceinte == 1 ?: 0;
if ($glasgow = $latest_constantes[0]->glasgow) {
$degre = $glasgow <= 8 ? 1 : 4;
if ($glasgow >= 9 && $glasgow <= 13) {
$degre = 2;
} elseif ($glasgow == 14 && $glasgow == 15) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'glasgow';
}
if ($pouls = $latest_constantes[0]->pouls) {
$degre = $pouls < 40 || $pouls > 150 ? 1 : 4;
if ($pouls >= 40 && $pouls <= 50 || $pouls >= 130 && $pouls <= 150) {
$degre = 2;
} elseif ($pouls >= 51 && $pouls <= 129) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'pouls';
}
//Tensions
if ($latest_constantes[0]->ta_gauche) {
$this->orderTA("ta_gauche", $latest_constantes[0]->_ta_gauche_systole, $latest_constantes[0]->_ta_gauche_diastole);
}
if ($latest_constantes[0]->ta_droit) {
$this->orderTA("ta_droit", $latest_constantes[0]->_ta_droit_systole, $latest_constantes[0]->_ta_droit_diastole);
}
if ($latest_constantes[0]->ta) {
$this->orderTA("ta", $latest_constantes[0]->_ta_systole, $latest_constantes[0]->_ta_diastole);
}
if ($frequence = $latest_constantes[0]->frequence_respiratoire) {
$degre = $frequence > 35 || $frequence <= 8 ? 1 : 4;
if ($frequence >= 25 && $frequence <= 35 || $frequence >= 9 && $frequence <= 12) {
$degre = 2;
} elseif ($frequence >= 13 && $frequence <= 24) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'frequence_respiratoire';
}
if ($spo2 = $latest_constantes[0]->spo2) {
$degre = $spo2 < 90 ? 1 : 4;
if ($spo2 >= 90 && $spo2 <= 93) {
$degre = 2;
} elseif ($spo2 >= 94 && $spo2 <= 100) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'spo2';
}
if ($temp = $latest_constantes[0]->temperature) {
$degre = $temp < 32 ? 1 : 4;
if ($temp >= 32 && $temp <= 35 || $temp > 40) {
$degre = 2;
} elseif ($temp > 35 && $temp <= 40) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'temperature';
}
if ($glycemie = $latest_constantes[0]->glycemie) {
if ($glycemie < 4 || $glycemie >= 25) {
$degre = 2;
} elseif ($glycemie >= 4 && $glycemie < 25) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'glycemie';
}
if ($cetonemie = $latest_constantes[0]->cetonemie) {
if ($cetonemie >= 0.6) {
$degre = 2;
} elseif ($cetonemie < 0.6) {
$degre = 3;
}
$this->_ref_cts_degre[$degre][] = 'cetonemie';
}
$patient = $this->_ref_sejour->_ref_patient;
if ($latest_constantes[0]->peak_flow && $latest_constantes[0]->taille && $patient->_annees && $patient->sexe) {
//.........这里部分代码省略.........
示例3: range
$mins_duree = range(0, 59, $config["min_intervalle"]);
// Chargement des etablissements externes
$etab = new CEtabExterne();
$count_etab_externe = $etab->countList();
// Récupération des services
$service = new CService();
$where = array();
$where["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$where["cancelled"] = "= '0'";
$order = "nom";
$listServices = $service->loadListWithPerms(PERM_READ, $where, $order);
foreach ($listServices as $_service) {
$_service->loadRefUFSoins();
}
if (CModule::getActive("maternite")) {
$sejour->loadRefGrossesse();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sejours_collision", $patient->getSejoursCollisions());
$smarty->assign("urgInstalled", CModule::getInstalled("dPurgences"));
$smarty->assign("isPrescriptionInstalled", CModule::getActive("dPprescription"));
$smarty->assign("heure_sortie_ambu", $heure_sortie_ambu);
$smarty->assign("heure_sortie_autre", $heure_sortie_autre);
$smarty->assign("heure_entree_veille", $heure_entree_veille);
$smarty->assign("heure_entree_jour", $heure_entree_jour);
$smarty->assign("hours", $hours);
$smarty->assign("mins", $mins);
$smarty->assign("hours_duree", $hours_duree);
$smarty->assign("hours_urgence", $hours_urgence);
$smarty->assign("mins_duree", $mins_duree);
示例4: store
//.........这里部分代码省略.........
CAppUI::setMsg($msg, UI_MSG_ERROR);
}
} else {
$item_liaison->sejour_id = $sejour->_id;
$item_liaison->date = $filter_entree;
$item_liaison->quantite = 0;
$item_liaison->item_realise_id = $_liaison->item_prestation_id;
// Recherche d'une précédente liaison pour appliquer l'item souhaité s'il existe
$where["date"] = "<= '" . CMbDT::date($this->entree) . "'";
$ljoin["item_prestation"] = "item_prestation.item_prestation_id = item_liaison.item_souhait_id";
$_item_liaison_souhait = new CItemLiaison();
$_item_liaison_souhait->loadObject($where, "date DESC", null, $ljoin);
if ($_item_liaison_souhait->_id) {
$item_liaison->item_souhait_id = $_item_liaison_souhait->item_souhait_id;
$item_liaison->sous_item_id = $_item_liaison_souhait->sous_item_id;
}
if ($msg = $item_liaison->store()) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
}
}
// Dans tous les cas, il faut parcourir les liaisons existantes entre les dates de début et fin de l'affectation
$where["date"] = "BETWEEN '" . $filter_entree . "' AND '" . CMbDT::date($this->sortie) . "'";
$ljoin["item_prestation"] = "item_prestation.item_prestation_id = item_liaison.item_souhait_id\r\n OR item_prestation.item_prestation_id = item_liaison.item_realise_id";
$liaisons_existantes = $item_liaison->loadList($where, null, null, null, $ljoin);
foreach ($liaisons_existantes as $_liaison_existante) {
$_liaison_existante->item_realise_id = $_liaison->item_prestation_id;
if ($msg = $_liaison_existante->store()) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
}
}
}
}
if ($create_affectations) {
$grossesse = $this->_ref_sejour->loadRefGrossesse();
$naissances = $grossesse->loadRefsNaissances();
$sejours = CMbObject::massLoadFwdRef($naissances, "sejour_enfant_id");
foreach ($sejours as $_sejour) {
$_affectation = new CAffectation();
$_affectation->lit_id = $this->lit_id;
$_affectation->sejour_id = $_sejour->_id;
$_affectation->parent_affectation_id = $this->_id;
$_affectation->entree = CMbDT::dateTime();
$_affectation->sortie = $this->sortie;
if ($msg = $_affectation->store()) {
return $msg;
}
}
}
// Pas de problème de synchro pour les blocages de lits
if (!$this->sejour_id || $this->_no_synchro) {
return $msg;
}
// Modification de la date d'admission et de la durée de l'hospi
$this->load($this->_id);
if ($old->_id) {
$this->_ref_prev = $old->_ref_prev;
$this->_ref_next = $old->_ref_next;
} else {
$this->loadRefsAffectations();
}
$changeSejour = 0;
$changePrev = 0;
$changeNext = 0;
$prev = $this->_ref_prev;
$next = $this->_ref_next;
// Mise à jour vs l'entrée