本文整理汇总了PHP中COperation::completeLabelFields方法的典型用法代码示例。如果您正苦于以下问题:PHP COperation::completeLabelFields方法的具体用法?PHP COperation::completeLabelFields怎么用?PHP COperation::completeLabelFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperation
的用法示例。
在下文中一共展示了COperation::completeLabelFields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: completeLabelFields
/**
* @see parent::completeLabelFields()
*/
function completeLabelFields(&$fields, $params)
{
if (!isset($this->_from_op)) {
$this->loadRefLastOperation()->_from_sejour = 1;
$this->_ref_last_operation->completeLabelFields($fields, $params);
}
$this->loadRefPatient()->completeLabelFields($fields, $params);
$this->loadRefPraticien();
$this->loadNDA();
$this->loadNRA();
$now = CMbDT::dateTime();
$affectation = $this->getCurrAffectation($this->entree > $now ? $this->entree : null);
$affectation->loadView();
$affectation->loadRefService();
$souhaits = array();
if (CAppUI::conf("dPhospi prestations systeme_prestations", CGroups::loadCurrent()) == "expert") {
/** @var CItemLiaison[] $items_liaisons */
$items_liaisons = $this->loadBackRefs("items_liaisons", "date");
CStoredObject::massLoadFwdRef($items_liaisons, "item_souhait_id");
CStoredObject::massLoadFwdRef($items_liaisons, "sous_item_id");
foreach ($items_liaisons as $_liaison) {
$item_souhait = $_liaison->loadRefItem();
if ($item_souhait->object_class == "CPrestationPonctuelle") {
continue;
}
$sous_item = $_liaison->loadRefSousItem();
$nom = $item_souhait;
if ($sous_item->_id) {
$nom = $sous_item->nom;
}
$souhaits[] = $nom;
}
}
$meds_dispenses = array();
if (isset($params["debut_dispensation"]) && isset($params["fin_dispensation"])) {
$from = $params["debut_dispensation"];
$to = $params["fin_dispensation"];
$delivery = new CProductDelivery();
$where = array("date_dispensation" => "BETWEEN '{$from}' AND '{$to}'", "sejour_id" => "= '{$this->_id}'");
$deliveries = $delivery->loadList($where);
$stocks = CStoredObject::massLoadFwdRef($deliveries, "stock_id");
$products = CStoredObject::massLoadFwdRef($stocks, "product_id");
/** @var CProduct $_product */
foreach ($products as $_product) {
$meds_dispenses[] = $_product->code . " " . $_product->name;
}
}
$fields_sejour = array("DATE ENT" => CMbDT::dateToLocale(CMbDT::date($this->entree)), "HEURE ENT" => CMbDT::transform($this->entree, null, "%H:%M"), "DATE SORTIE" => CMbDT::dateToLocale(CMbDT::date($this->sortie)), "HEURE SORTIE" => CMbDT::transform($this->sortie, null, "%H:%M"), "PRAT RESPONSABLE" => $this->_ref_praticien->_view, "NDOS" => $this->_NDA, "NRA" => $this->_ref_NRA ? $this->_ref_NRA->id400 : "", "CODE BARRE NDOS" => "@BARCODE_" . $this->_NDA . "@", "CHAMBRE COURANTE" => $affectation->_view, "SERVICE COURANT" => $affectation->_ref_service->_view, "MEDICAMENTS DISPENSES" => implode("\n", $meds_dispenses));
if (CAppUI::conf("dPhospi prestations systeme_prestations", CGroups::loadCurrent()) == "expert") {
$fields_sejour["PRESTATIONS SOUHAITEES"] = implode(" - ", $souhaits);
}
$fields = array_merge($fields, $fields_sejour);
if (CAppUI::conf("ref_pays") == 2) {
$fields["NATURE SEJOUR"] = $this->getFormattedValue("_type_sejour");
$fields["MODE TRT"] = $this->loadRefChargePriceIndicator()->code;
$this->loadRefsFactureEtablissement();
if ($this->_ref_last_facture) {
$this->_ref_last_facture->loadRefAssurance();
$fields["ASSUR MALADIE"] = $this->_ref_last_facture->_ref_assurance_maladie->nom;
$fields["ASSUR ACCIDENT"] = $this->_ref_last_facture->_ref_assurance_accident->nom;
}
}
}