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


PHP COperation::completeLabelFields方法代码示例

本文整理汇总了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;
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:66,代码来源:CSejour.class.php


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