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


PHP CConsultation::store方法代码示例

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


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

示例1: CConsultation

<?php

/**
 * $Id$
 * 
 * @package    Mediboard
 * @subpackage dPcabinet
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$consultation_id = CValue::post("consultation_id");
$plageconsult_id = CValue::post("plageconsult_id");
$heure = CValue::post("heure");
$consult = new CConsultation();
$consult->load($consultation_id);
$new_consult = new CConsultation();
$new_consult->plageconsult_id = $plageconsult_id;
$new_consult->heure = $heure;
$new_consult->chrono = CConsultation::PLANIFIE;
$new_consult->patient_id = $consult->patient_id;
$new_consult->categorie_id = $consult->categorie_id;
$msg = $new_consult->store();
if ($msg) {
    CAppUI::setMsg($msg, UI_MSG_ERROR);
} else {
    CAppUI::setMsg(CAppUI::tr("CConsultation-msg-create"), UI_MSG_OK);
}
echo CAppUI::getMsg();
CApp::rip();
开发者ID:fbone,项目名称:mediboard4,代码行数:30,代码来源:do_copy_consultation_aed.php

示例2: max

        if ($plageAfter->_id) {
            $plageBefore->fin = $plageAfter->debut;
        } else {
            $plageBefore->fin = max($plageBefore->fin, $hour_next);
        }
        $plage =& $plageBefore;
    } elseif ($plageAfter->_id) {
        $plageAfter->debut = min($plageAfter->debut, $hour_now);
        $plage =& $plageAfter;
    } else {
        $plage->chir_id = $prat_id;
        $plage->date = $day_now;
        $plage->freq = "00:" . CPlageconsult::$minutes_interval . ":00";
        $plage->debut = $hour_now;
        $plage->fin = $hour_next;
        $plage->libelle = "automatique";
    }
    $plage->updateFormFields();
    if ($msg = $plage->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
    }
}
$consult->plageconsult_id = $plage->_id;
if ($msg = $consult->store()) {
    CAppUI::setMsg($msg, UI_MSG_ERROR);
}
if ($current_m == "dPurgences") {
    CAppUI::redirect("m=dPurgences&tab=edit_consultation&selConsult={$consult->_id}&ajax={$ajax}");
} else {
    CAppUI::redirect("m=dPcabinet&tab=edit_consultation&selConsult={$consult->_id}&ajax={$ajax}");
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_change_prat_pec.php

示例3: store

 /**
  * @see parent::store()
  */
 function store()
 {
     $this->completeField("pour_compte_id", "chir_id");
     $change_pour_compte = $this->fieldModified("pour_compte_id");
     if ($msg = parent::store()) {
         return $msg;
     }
     if ($change_pour_compte) {
         $consults = $this->loadRefsConsultations();
         foreach ($consults as $_consult) {
             $facture = $_consult->loadRefFacture();
             $facture->praticien_id = $this->pour_compte_id ? $this->pour_compte_id : $this->chir_id;
             $facture->store();
         }
     }
     // pause
     if ($this->_update_pause && $this->_pause && $this->_pause_repeat_time) {
         $consult = new CConsultation();
         $where = array();
         $where["plageconsult_id"] = " = '{$this->_id}' ";
         $where["patient_id"] = " IS NULL";
         $consult->loadObject($where);
         $consult->plageconsult_id = $this->_id;
         $consult->heure = $this->_pause;
         $consult->duree = $this->_pause_repeat_time;
         $consult->chrono = 16;
         $consult->_hour = null;
         $consult->_min = null;
         if ($msg = $consult->store()) {
             CAppUI::stepAjax($msg, UI_MSG_WARNING);
         }
     }
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:37,代码来源:CPlageconsult.class.php

示例4: store

 /**
  * @see parent::store()
  */
 function store()
 {
     // Création du RPU en l'associant à un séjour existant
     if (!$this->_id && $this->sejour_id) {
         $sejour = $this->loadRefSejour();
         // Si y'a un RPU déjà existant on alerte d'une erreur
         if ($sejour->countBackRefs("rpu")) {
             return CAppUI::tr("CRPU-already-exists");
         }
     }
     // Création du RPU ET du séjour associé
     if (!$this->_id && !$this->sejour_id) {
         $sejour = new CSejour();
         $sejour->patient_id = $this->_patient_id;
         $sejour->type = "urg";
         $sejour->entree_reelle = $this->_entree;
         $sejour->group_id = CGroups::loadCurrent()->_id;
         $sortie_prevue = CAppUI::conf("dPurgences sortie_prevue") == "h24" ? CMbDT::dateTime("+1 DAY", $this->_entree) : CMbDT::date(null, $this->_entree) . " 23:59:59";
         $sejour->sortie_prevue = $this->_sortie ? $this->_sortie : $sortie_prevue;
         // En cas de ressemblance à quelques heures près (cas des urgences), on a affaire au même séjour
         $siblings = $sejour->getSiblings(CAppUI::conf("dPurgences sibling_hours"), $sejour->type);
         if (count($siblings)) {
             $sibling = reset($siblings);
             $this->sejour_id = $sibling->_id;
             $sejour = $this->loadRefSejour();
             // Si y'a un RPU déjà existant on alerte d'une erreur
             if ($sejour->countBackRefs("rpu")) {
                 return CAppUI::tr("CRPU-already-exists");
             }
             $sejour->service_id = $this->_service_id;
             $sejour->etablissement_entree_id = $this->_etablissement_entree_id;
             $sejour->service_entree_id = $this->_service_entree_id;
             $sejour->mode_entree = $this->_mode_entree;
             $sejour->mode_entree_id = $this->_mode_entree_id;
             $sejour->provenance = $this->_provenance;
             $sejour->destination = $this->_destination;
             $sejour->transport = $this->_transport;
             $sejour->UHCD = $this->_UHCD;
             $sejour->uf_soins_id = $this->_uf_soins_id;
         }
     }
     // Changement suivant le mode d'entrée
     switch ($this->_mode_entree) {
         case 6:
             $this->_etablissement_entree_id = "";
             break;
         case 7:
             $this->_service_entree_id = "";
             break;
         case 8:
             $this->_service_entree_id = "";
             $this->_etablissement_entree_id = "";
             break;
         default:
     }
     // Bind Sejour
     if ($msg = $this->bindSejour()) {
         return $msg;
     }
     // Synchronisation AT
     $this->loadRefConsult();
     if ($this->_ref_consult->_id) {
         //Evite les check dans le cas des fusions lors du store de la consult
         $this->_ref_consult->_forwardRefMerging = $this->_forwardRefMerging;
         if ($this->_validation && CAppUI::conf("dPurgences valid_cotation_sortie_reelle")) {
             $this->_ref_consult->valide = "1";
         }
         if ($this->fieldModified("date_at") && !$this->_date_at) {
             $this->_date_at = true;
             $this->_ref_consult->date_at = $this->date_at;
         }
         if ($msg = $this->_ref_consult->store()) {
             return $msg;
         }
     }
     if ($this->fieldModified("code_diag") && $this->code_diag) {
         $this->loadRefMotif();
         $this->diag_infirmier = $this->_ref_motif->_ref_chapitre->nom;
         $this->diag_infirmier .= "\n" . $this->code_diag . ": " . $this->_ref_motif->nom;
         $this->diag_infirmier .= "\n Degrés d'urgence entre " . $this->_ref_motif->degre_min . " et " . $this->_ref_motif->degre_max;
         $this->ccmu = "";
     }
     // Bind affectation
     if (CAppUI::conf("dPurgences create_affectation")) {
         if ($msg = $this->storeAffectation()) {
             return $msg;
         }
     }
     if ($this->fieldModified("code_diag") && $this->_old->code_diag != $this->code_diag) {
         foreach ($this->loadRefsReponses() as $_reponse) {
             if ($msg = $_reponse->delete()) {
                 return $msg;
             }
         }
         if ($this->code_diag) {
             foreach ($this->loadRefMotif()->loadRefsQuestions() as $_question) {
                 $reponse = new CMotifReponse();
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:CRPU.class.php

示例5: makeConsult

 static function makeConsult($patient_id, $chir_id, $date, $store = true, $time = null)
 {
     $consult = new CConsultation();
     $date = CMbDT::date($date);
     $plage = new CPlageconsult();
     $where = array("plageconsult.chir_id" => "= '{$chir_id}'", "plageconsult.date" => "= '{$date}'");
     $plage->loadObject($where);
     if (!$plage->_id) {
         $plage->date = $date;
         $plage->chir_id = $chir_id;
         $plage->debut = "09:00:00";
         $plage->fin = "19:00:00";
         $plage->freq = "00:30:00";
         $plage->libelle = "Importation";
         if ($msg = $plage->store()) {
             return $msg;
         }
     }
     $consult->patient_id = $patient_id;
     $consult->plageconsult_id = $plage->_id;
     $consult->heure = $time ? $time : "09:00:00";
     $consult->chrono = $date < CMbDT::date() ? CConsultation::TERMINE : CConsultation::PLANIFIE;
     if ($store) {
         if ($msg = $consult->store()) {
             return $msg;
         }
         if (!$consult->_id) {
             CAppUI::setMsg("Consultation non trouvée et non importée : {$patient_id} / {$chir_id} / {$date}", UI_MSG_WARNING);
             return false;
         }
     }
     return $consult;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:33,代码来源:CExternalDBImport.class.php


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