當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。