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


PHP COperation::completeField方法代码示例

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


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

示例1: addIntervention

 function addIntervention($elParent, COperation $operation, $referent = null, $light = false)
 {
     $identifiant = $this->addElement($elParent, "identifiant");
     $this->addElement($identifiant, "emetteur", $operation->_id);
     $last_idex = $operation->_ref_last_id400;
     if (isset($last_idex->_id)) {
         $this->addElement($identifiant, "recepteur", $last_idex->id400);
     }
     $sejour = $operation->loadRefSejour();
     if (!$operation->plageop_id) {
         $operation->completeField("date");
     }
     // Calcul du début de l'intervention
     $mbOpDate = CValue::first($operation->_ref_plageop->date, $operation->date);
     $time_operation = $operation->time_operation == "00:00:00" ? null : $operation->time_operation;
     $mbOpHeureDebut = CValue::first($operation->debut_op, $operation->entree_salle, $time_operation, $operation->horaire_voulu, $operation->_ref_plageop->debut);
     $mbOpDebut = CMbRange::forceInside($sejour->entree, $sejour->sortie, "{$mbOpDate} {$mbOpHeureDebut}");
     // Calcul de la fin de l'intervention
     $mbOpHeureFin = CValue::first($operation->fin_op, $operation->sortie_salle, CMbDT::addTime($operation->temp_operation, CMbDT::time($mbOpDebut)));
     $mbOpFin = CMbRange::forceInside($sejour->entree, $sejour->sortie, "{$mbOpDate} {$mbOpHeureFin}");
     $debut = $this->addElement($elParent, "debut");
     $this->addElement($debut, "date", CMbDT::date($mbOpDebut));
     $this->addElement($debut, "heure", CMbDT::time($mbOpDebut));
     $fin = $this->addElement($elParent, "fin");
     $this->addElement($fin, "date", CMbDT::date($mbOpFin));
     $this->addElement($fin, "heure", CMbDT::time($mbOpFin));
     if ($light) {
         // Ajout des participants
         $mbParticipants = array();
         foreach ($operation->_ref_actes_ccam as $acte_ccam) {
             $acte_ccam->loadRefExecutant();
             $mbParticipant = $acte_ccam->_ref_executant;
             $mbParticipants[$mbParticipant->user_id] = $mbParticipant;
         }
         $participants = $this->addElement($elParent, "participants");
         foreach ($mbParticipants as $mbParticipant) {
             $participant = $this->addElement($participants, "participant");
             $medecin = $this->addElement($participant, "medecin");
             $this->addProfessionnelSante($medecin, $mbParticipant);
         }
         // Libellé de l'opération
         $this->addTexte($elParent, "libelle", $operation->libelle, 80);
     } else {
         $this->addUniteFonctionnelle($elParent, $operation);
         // Uniquement le responsable de l’'intervention
         $participants = $this->addElement($elParent, "participants");
         $participant = $this->addElement($participants, "participant");
         $medecin = $this->addElement($participant, "medecin");
         $this->addProfessionnelSante($medecin, $operation->loadRefChir());
         // Libellé de l'opération
         $this->addTexte($elParent, "libelle", $operation->libelle, 4000);
         // Remarques sur l'opération
         $this->addTexte($elParent, "commentaire", CMbString::convertHTMLToXMLEntities("{$operation->materiel} - {$operation->rques}"), 4000);
         // Conventionnée ?
         $this->addElement($elParent, "convention", $operation->conventionne ? 1 : 0);
         // TypeAnesthésie : nomemclature externe (idex)
         if ($operation->type_anesth) {
             $tag_hprimxml = $this->_ref_receiver->_tag_hprimxml;
             $idexTypeAnesth = CIdSante400::getMatch("CTypeAnesth", $tag_hprimxml, null, $operation->type_anesth);
             $this->addElement($elParent, "typeAnesthesie", $idexTypeAnesth->id400);
         }
         // Indicateurs
         $indicateurs = $this->addElement($elParent, "indicateurs");
         $dossier_medical = new CDossierMedical();
         $dossier_medical->object_class = "CPatient";
         $dossier_medical->object_id = $operation->loadRefPatient()->_id;
         $dossier_medical->loadMatchingObject();
         $antecedents = $dossier_medical->loadRefsAntecedents();
         foreach ($antecedents as $_antecedent) {
             $rques = CMbString::htmlspecialchars($_antecedent->rques);
             $rques = CMbString::convertHTMLToXMLEntities($rques);
             $this->addCodeLibelle($indicateurs, "indicateur", $_antecedent->_id, $rques);
         }
         // Extemporané
         if ($operation->exam_extempo) {
             $this->addCodeLibelle($indicateurs, "indicateur", "EXT", "Extemporané");
         }
         // Recours / Durée USCPO
         $this->addElement($elParent, "recoursUscpo", $operation->duree_uscpo ? 1 : 0);
         $this->addElement($elParent, "dureeUscpo", $operation->duree_uscpo ? $operation->duree_uscpo : null);
         // Côté (droit|gauche|bilatéral|total|inconnu)
         // D - Droit
         // G - Gauche
         // B - Bilatéral
         // T - Total
         // I - Inconnu
         $cote = array("droit" => "D", "gauche" => "G", "bilatéral" => "B", "total" => "T", "inconnu" => "I", "haut" => "HT", "bas" => "BS");
         $this->addCodeLibelle($elParent, "cote", $cote[$operation->cote], CMbString::capitalize($operation->cote));
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:90,代码来源:CHPrimXMLDocument.class.php


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