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


PHP COperation::loadObject方法代码示例

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


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

示例1: getMinDate

 static function getMinDate()
 {
     $op = new COperation();
     $op->loadObject(array('date' => ' IS NOT NULL'), "date ASC");
     return max($op->date, "2000-01-01");
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:6,代码来源:CDailySalleMiner.class.php

示例2: getObject

 /**
  * Return a object concern praticien and a patient in date
  *
  * @param Date   $date         Date
  * @param String $praticien_id Praticien id
  * @param String $patient_id   Patient id
  *
  * @return CConsultation|COperation|null
  */
 function getObject($date, $praticien_id, $patient_id)
 {
     $intervention = new COperation();
     $where = array("plagesop.date" => "= '{$date}'", "operations.chir_id" => "= '{$praticien_id}'", "sejour.patient_id" => "= '{$patient_id}'");
     $leftjoin = array("plagesop" => "operations.plageop_id = plagesop.plageop_id", "sejour" => "operations.sejour_id = sejour.sejour_id");
     $intervention->loadObject($where, "plagesop.debut DESC", null, $leftjoin);
     $object = $intervention;
     if (!$object->_id) {
         $consultation = new CConsultation();
         $where = array("plageconsult.date" => "= '{$date}'", "plageconsult.chir_id" => "= '{$praticien_id}'", "consultation.patient_id" => "= '{$patient_id}'");
         $leftjoin = array("plageconsult" => "consultation.plageconsult_id = plageconsult.plageconsult_id");
         $consultation->loadObject($where, "consultation.heure DESC", null, $leftjoin);
         $object = $consultation;
         if (!$object->_id) {
             return null;
         }
     }
     return $object;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:28,代码来源:CHPrimXMLEvenementsServeurActes.class.php

示例3: getObjectWithDate

 /**
  * Return the object for attach the document
  *
  * @param String   $date         date
  * @param CPatient $patient      patient
  * @param String   $praticien_id praticien id
  * @param CSejour  $sejour       sejour
  *
  * @return CConsultation|COperation|CSejour
  */
 function getObjectWithDate($date, $patient, $praticien_id, $sejour)
 {
     //Recherche de la consutlation dans le séjour
     $date = CMbDT::date($date);
     $date_before = CMbDT::date("- 2 DAY", $date);
     $consultation = new CConsultation();
     $where = array("patient_id" => "= '{$patient->_id}'", "annule" => "= '0'", "plageconsult.date" => "BETWEEN '{$date_before}' AND '{$date}'", "plageconsult.chir_id" => "= '{$praticien_id}'", "sejour_id" => "= '{$sejour->_id}'");
     $leftjoin = array("plageconsult" => "consultation.plageconsult_id = plageconsult.plageconsult_id");
     $consultation->loadObject($where, "plageconsult.date DESC", null, $leftjoin);
     //Recherche d'une consultation qui pourrait correspondre
     if (!$consultation->_id) {
         unset($where["sejour_id"]);
         $consultation->loadObject($where, "plageconsult.date DESC", null, $leftjoin);
     }
     //Consultation trouvé dans un des deux cas
     if ($consultation->_id) {
         return $consultation;
     }
     //Recherche d'une opération dans le séjour
     $where = array("sejour.patient_id" => "= '{$patient->_id}'", "plagesop.date" => "BETWEEN '{$date_before}' AND '{$date}'", "operations.annulee" => "= '0'", "sejour.sejour_id" => "= '{$sejour->_id}'");
     if ($praticien_id) {
         $where["operations.chir_id"] = "= '{$praticien_id}'";
     }
     $leftjoin = array("plagesop" => "operations.plageop_id = plagesop.plageop_id", "sejour" => "operations.sejour_id = sejour.sejour_id");
     $operation = new COperation();
     $operation->loadObject($where, "plagesop.date DESC", null, $leftjoin);
     if ($operation->_id) {
         return $operation;
     }
     /*if (!$sejour) {
           $where = array(
             "patient_id" => "= '$patient->_id'",
             "annule"     => "= '0'",
           );
           $sejours = CSejour::loadListForDate($date, $where, null, 1);
           $sejour = reset($sejours);
     
           if (!$sejour) {
             return null;
           }
         }*/
     return $sejour;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:53,代码来源:CHL7v2RecordObservationResultSet.class.php


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