コード例 #1
0
ファイル: CRPU.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     // @todo: A supprimer du updateFormFields
     $sejour = $this->loadRefSejour();
     $this->_responsable_id = $sejour->praticien_id;
     $this->_entree = $sejour->_entree;
     $this->_DP = $sejour->DP;
     $this->_annule = $sejour->annule;
     $this->_UHCD = $sejour->UHCD;
     $patient =& $sejour->_ref_patient;
     $this->_patient_id = $patient->_id;
     $this->_cp = $patient->cp;
     $this->_ville = $patient->ville;
     $this->_naissance = $patient->naissance;
     $this->_sexe = $patient->sexe;
     $this->_view = "RPU du " . CMbDT::dateToLocale(CMbDT::date($this->_entree)) . " pour {$patient->_view}";
     // Calcul des valeurs de _mode_sortie
     if ($sejour->mode_sortie == "mutation") {
         $this->_mode_sortie = 6;
     }
     if ($sejour->mode_sortie == "transfert") {
         $this->_mode_sortie = 7;
     }
     if ($sejour->mode_sortie == "normal") {
         $this->_mode_sortie = 8;
     }
     if ($sejour->mode_sortie == "deces") {
         $this->_mode_sortie = 9;
     }
     $this->_service_id = $sejour->service_id;
     $this->_mode_entree = $sejour->mode_entree;
     $this->_mode_entree_id = $sejour->mode_entree_id;
     $this->_sortie = $sejour->sortie_reelle;
     $this->_provenance = $sejour->provenance;
     $this->_transport = $sejour->transport;
     $this->_destination = $sejour->destination;
     $this->_etablissement_sortie_id = $sejour->etablissement_sortie_id;
     $this->_etablissement_entree_id = $sejour->etablissement_entree_id;
     $this->_service_entree_id = $sejour->service_entree_id;
     $this->_service_sortie_id = $sejour->service_sortie_id;
     $this->_uf_soins_id = $sejour->uf_soins_id;
     // @todo: A supprimer du updateFormFields
     $this->loadRefConsult();
     if ($this->_ref_consult->_id) {
         $this->_ref_consult->countDocItems();
     }
     // Récupération du libellé de la circonstance si actif dans la configuration
     if (CAppUI::conf("dPurgences gerer_circonstance")) {
         $this->getCirconstance();
     }
 }
コード例 #2
0
ファイル: CSejour.class.php プロジェクト: fbone/mediboard4
 /**
  * Charge les consultations, en particulier l'ATU dans le cas UPATOU
  *
  * @param string $order order of the list
  *
  * @return CConsultation[]
  */
 function loadRefsConsultations($order = "date DESC, heure DESC")
 {
     $this->_ref_consultations = $this->loadBackRefs("consultations", $order, null, null, array("plageconsult" => "plageconsult.plageconsult_id = consultation.plageconsult_id"));
     $this->_ref_consult_atu = new CConsultation();
     foreach ($this->_ref_consultations as $_consult) {
         /** @var CConsultation $_consult */
         $praticien = $_consult->loadRefPraticien();
         $praticien->loadRefFunction();
         $_consult->canDo();
         if ($praticien->isUrgentiste() && ($this->countBackRefs("rpu") > 0 || !CAppUI::conf("dPurgences create_sejour_hospit"))) {
             $this->_ref_consult_atu = $_consult;
             $this->_ref_consult_atu->countDocItems();
         }
     }
     return $this->_ref_consultations;
 }