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


PHP CSejour::load方法代码示例

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


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

示例1: loadRefSejour

 /**
  * Charge le séjour associé
  *
  * @return CSejour
  */
 function loadRefSejour()
 {
     $this->_ref_sejour = new CSejour();
     $this->_ref_sejour->load($this->sejour_id);
     $this->_ref_sejour->loadRefsFwd();
     return $this->_ref_sejour;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:12,代码来源:CFicheAutonomie.class.php

示例2: CRPU

    }
    CAppUI::setMsg("{$action} {$txt}", UI_MSG_OK);
}
//récupération de l'identifiant du séjour à fusionner
$sejour_id_merge = CValue::post("sejour_id_merge");
// Récupération du rpu
$rpu_id = CValue::post("rpu_id");
$rpu = new CRPU();
$rpu->load($rpu_id);
$sejour = $rpu->loadRefSejour();
$sejour_rpu = $sejour;
$properties_sejour = $sejour->getProperties();
//Cas d'une collision ou d'un rattachement d'un séjour
if ($sejour_id_merge) {
    $sejour_merge = new CSejour();
    $sejour_merge->load($sejour_id_merge);
    $sejour_merge->entree_reelle = $sejour->entree_reelle;
    $sejour_merge->mode_entree_id = $sejour->mode_entree_id;
    $sejour_merge->mode_entree = $sejour->mode_entree;
    $sejour_merge->provenance = $sejour->provenance;
    $msg = $sejour_merge->merge(array($sejour));
    viewMsg($msg, "Fusion");
    $sejour = $sejour_merge;
    $rpu->sejour_id = $sejour_merge->_id;
}
// Creation d'un séjour reliquat
if (!CAppUI::conf("dPurgences create_sejour_hospit")) {
    // Clonage
    $sejour_rpu = new CSejour();
    foreach ($properties_sejour as $name => $value) {
        $sejour_rpu->{$name} = $value;
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:do_transfert_aed.php

示例3: CSejour

            if (isset($_POST["sc_venue_id"])) {
                $mbSejour->_NDA = $_POST["sc_venue_id"];
            }
            if (isset($_POST["cmca_uf_code"])) {
                $object->code_uf = $_POST["cmca_uf_code"];
            }
            if (isset($_POST["cmca_uf_libelle"])) {
                $object->libelle_uf = $_POST["cmca_uf_libelle"];
            }
        }
        break;
    case "CSejour":
        $object = new CSejour();
        // Chargement du séjour et génération du document
        $sejour_id = CValue::post("mb_sejour_id", CValue::getOrSession("object_id"));
        if ($object->load($sejour_id)) {
            $object->loadRefs();
            $object->loadRefDossierMedical();
            $object->loadNDA();
            $NDA = $object->_NDA;
            $object->_ref_patient->loadIPP();
            $IPP = $object->_ref_patient->_IPP;
            if (isset($_POST["sc_patient_id"])) {
                $object->_ref_patient->_IPP = $_POST["sc_patient_id"];
            }
            if (isset($_POST["sc_venue_id"])) {
                $object->_NDA = $_POST["sc_venue_id"];
            }
        }
        break;
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:export_actes_pmsi.php

示例4: admitFound

 /**
  * Admit ?
  *
  * @param CSejour $mbVenue Admit
  * @param array   $data    Datas
  *
  * @return bool
  */
 function admitFound(CSejour $mbVenue, $data)
 {
     $sender = $this->_ref_sender;
     $idSourceVenue = CValue::read($data, "idSourceVenue");
     $idCibleVenue = CValue::read($data, "idCibleVenue");
     $NDA = new CIdSante400();
     if ($idSourceVenue) {
         $NDA = CIdSante400::getMatch("CSejour", $sender->_tag_sejour, $idSourceVenue);
     }
     if ($NDA->_id) {
         $mbVenue->load($NDA->object_id);
         return true;
     }
     if ($mbVenue->load($idCibleVenue)) {
         return true;
     }
     return false;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:CHPrimXMLEvenementsPatients.class.php

示例5: CSejour

<?php

/* $Id $ */
/**
 * @package Mediboard
 * @subpackage hl7
 * @version $Revision:$
 * @author SARL OpenXtrem
 * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 */
CCanDo::checkAdmin();
$action = CValue::post("action", "modify");
$sejour = new CSejour();
switch ($action) {
    case "modify":
        while (!$sejour->load(rand(1, 5000))) {
        }
        // randomize libelle
        $sejour->libelle = $sejour->libelle ? $sejour->libelle : "un libelle pour le mettre dans l'ordre";
        $libelle = str_split($sejour->libelle);
        shuffle($libelle);
        $sejour->libelle = implode("", $libelle);
        break;
    case "create":
        //$sejour->sample();
        $sejour->group_id = 1;
        $sejour->praticien_id = 73;
        $sejour->patient_id = rand(1, 5000);
        $sejour->entree_prevue = CMbDT::dateTime();
        $sejour->sortie_prevue = CMbDT::dateTime("+1 day");
        //$patient->updateFormFields();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_trigger_sejour_modification.php

示例6: CSejour

//$canModule = $module->canDo();
//$canModule->needsEdit();
$prat_id = CValue::post("_prat_id");
$patient_id = CValue::post("patient_id");
$_operation_id = CValue::post("_operation_id");
$_datetime = CValue::post("_datetime");
$callback = CValue::post("callback");
$type = CValue::post("type");
$_in_suivi = CValue::post("_in_suivi", 0);
$grossesse_id = CValue::post("grossesse_id");
$uf_soins_id = CValue::post("_uf_soins_id");
if (!$_datetime || $_datetime == "now") {
    $_datetime = CMbDT::dateTime();
}
$sejour = new CSejour();
$sejour->load(CValue::post("sejour_id"));
// Cas des urgences
if ($sejour->type === "urg" && !$_in_suivi) {
    if ($_datetime < $sejour->entree || $_datetime > $sejour->sortie) {
        CAppUI::setMsg("La prise en charge doit être dans les bornes du séjour", UI_MSG_ERROR);
        CAppUI::redirect("m=dPurgences");
    }
    $sejour->loadRefsConsultations();
    if ($sejour->_ref_consult_atu->_id) {
        CAppUI::setMsg("Patient déjà pris en charge par un praticien", UI_MSG_ERROR);
        CAppUI::redirect("m=dPurgences");
    }
    // Changement de praticien pour le sejour
    if (CAppUI::conf("dPurgences pec_change_prat")) {
        $sejour->praticien_id = $prat_id;
        if ($msg = $sejour->store()) {
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:do_consult_now.php

示例7: CPrescriptionLineMedicament

     $pat->_ext_codes_cim = $dossier_medical->_ext_codes_cim;
 }
 if (isset($_result["prescription_line_medicament_id"])) {
     $line = new CPrescriptionLineMedicament();
     $line->load($_result["prescription_line_medicament_id"]);
     $pat->_distant_line = $line;
 } else {
     if (isset($_result["prescription_line_mix_item_id"])) {
         $line = new CPrescriptionLineMixItem();
         $line->load($_result["prescription_line_mix_item_id"]);
         $pat->_distant_line = $line;
     }
 }
 if ($sejour_filled) {
     $sejour = new CSejour();
     $sejour->load($_result["sejour_id"]);
     $pat->_distant_object = $sejour;
     $pat->_age_epoque = intval(CMbDT::daysRelative($pat->naissance, $sejour->entree) / 365);
 } else {
     if ($consult_filled) {
         $consult = new CConsultation();
         $consult->load($_result["consultation_id"]);
         $pat->_distant_object = $consult;
         $consult->loadRefPlageConsult();
         $pat->_age_epoque = intval(CMbDT::daysRelative($pat->naissance, $consult->_ref_plageconsult->date) / 365);
     } else {
         if ($interv_filled) {
             $interv = new COperation();
             $interv->load($_result["operation_id"]);
             $interv->loadRefPlageOp();
             $pat->_distant_object = $interv;
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_recherche_dossier_clinique.php

示例8: CConsultation

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Urgences
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$consult_id = CValue::get("consult_id");
$sejour_id = CValue::get("sejour_id");
$consult = new CConsultation();
$consult->load($consult_id);
$sejour = new CSejour();
$sejour->load($sejour_id)->loadRefPatient()->loadRefPhotoIdentite();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("consult", $consult);
$smarty->assign("sejour", $sejour);
$smarty->display("inc_rpu_docitems.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:ajax_show_doc_items.php

示例9: fusionVenue

 /**
  * Fusion and recording a stay with an num_dos in the system
  * 
  * @param CHPrimXMLAcquittementsPatients $dom_acq    Acquittement
  * @param CPatient                       $newPatient Patient
  * @param array                          $data       Datas
  *
  * @return string acquittement 
  **/
 function fusionVenue(CHPrimXMLAcquittementsPatients $dom_acq, CPatient $newPatient, $data)
 {
     $echg_hprim = $this->_ref_echange_hprim;
     $sender = $echg_hprim->_ref_sender;
     $sender->loadConfigValues();
     $this->_ref_sender = $sender;
     // Traitement du patient
     $domEnregistrementPatient = new CHPrimXMLEnregistrementPatient();
     $domEnregistrementPatient->_ref_echange_hprim = $echg_hprim;
     $msgAcq = $domEnregistrementPatient->enregistrementPatient($dom_acq, $newPatient, $data);
     if ($echg_hprim->statut_acquittement != "OK") {
         return $msgAcq;
     }
     $dom_acq = new CHPrimXMLAcquittementsPatients();
     $dom_acq->_identifiant_acquitte = $data['identifiantMessage'];
     $dom_acq->_sous_type_evt = $this->sous_type;
     $dom_acq->_ref_echange_hprim = $echg_hprim;
     $commentaire = $avertissement = "";
     $codes = array();
     $mbVenue = new CSejour();
     $mbVenueEliminee = new CSejour();
     $newVenue = new CSejour();
     // Si CIP
     if (!CAppUI::conf('smp server')) {
         // Acquittement d'erreur : identifiants source et cible non fournis pour le venue / venueEliminee
         if (!$data['idSourceVenue'] && !$data['idCibleVenue'] && !$data['idSourceVenueEliminee'] && !$data['idCibleVenueEliminee']) {
             return $dom_acq->generateAcquittementsError("E100", $commentaire, $newVenue);
         }
         $etatVenue = CHPrimXMLEvenementsPatients::getEtatVenue($data['venue']);
         $etatVenueEliminee = CHPrimXMLEvenementsPatients::getEtatVenue($data['venueEliminee']);
         $tag = $etatVenue == "préadmission" ? CAppUI::conf('dPplanningOp CSejour tag_dossier_pa') . $sender->_tag_sejour : $sender->_tag_sejour;
         $idexVenue = CIdSante400::getMatch("CSejour", $tag, $data['idSourceVenue']);
         if ($mbVenue->load($data['idCibleVenue'])) {
             // Pas de test dans le cas ou la fusion correspond à un changement de numéro de dossier
             if ($etatVenue == "préadmission" || $etatVenueEliminee != "préadmission") {
                 if ($idexVenue->object_id && $mbVenue->_id != $idexVenue->object_id) {
                     $commentaire = "L'identifiant source fait référence au séjour : {$idexVenue->object_id} ";
                     $commentaire .= "et l'identifiant cible au séjour : {$mbVenue->_id}.";
                     return $dom_acq->generateAcquittementsError("E104", $commentaire, $newVenue);
                 }
             }
         }
         if (!$mbVenue->_id) {
             $mbVenue->_id = $idexVenue->object_id;
         }
         $tag = $etatVenue == "préadmission" ? CAppUI::conf('dPplanningOp CSejour tag_dossier_pa') . $sender->_tag_sejour : $sender->_tag_sejour;
         $idexVenueEliminee = CIdSante400::getMatch("CSejour", $tag, $data['idSourceVenueEliminee']);
         if ($mbVenueEliminee->load($data['idCibleVenueEliminee'])) {
             if ($idexVenueEliminee->object_id && $mbVenueEliminee->_id != $idexVenueEliminee->object_id) {
                 $commentaire = "L'identifiant source fait référence au séjour : {$idexVenueEliminee->object_id} ";
                 $commentaire .= "et l'identifiant cible au séjour : {$mbVenueEliminee->_id}.";
                 return $dom_acq->generateAcquittementsError("E141", $commentaire, $mbVenueEliminee);
             }
         }
         if (!$mbVenueEliminee->_id) {
             $mbVenueEliminee->_id = $idexVenueEliminee->object_id;
         }
         $messages = array();
         $avertissement = null;
         // Cas 0 : Aucun séjour
         if (!$mbVenue->_id && !$mbVenueEliminee->_id) {
             $newVenue->patient_id = $newPatient->_id;
             $newVenue->group_id = CGroups::loadCurrent()->_id;
             $messages = $this->mapAndStoreVenue($newVenue, $data, $etatVenueEliminee, $idexVenue, $idexVenueEliminee);
         } else {
             if ($mbVenue->_id || $mbVenueEliminee->_id) {
                 // Suppression de l'identifiant du séjour trouvé
                 if ($mbVenue->_id) {
                     $newVenue->load($mbVenue->_id);
                     $messages['msgNumDosVenue'] = $idexVenue->delete();
                 } else {
                     if ($mbVenueEliminee->_id) {
                         $newVenue->load($mbVenueEliminee->_id);
                         $messages['msgNumDosVenueEliminee'] = $idexVenueEliminee->delete();
                     }
                 }
                 // Cas 0
                 $messages = $this->mapAndStoreVenue($newVenue, $data, $etatVenueEliminee, $idexVenue, $idexVenueEliminee);
                 $commentaire = "Séjour modifié : {$newVenue->_id}.";
             } else {
                 if ($mbVenue->_id && $mbVenueEliminee->_id) {
                     // Suppression des identifiants des séjours trouvés
                     $messages['msgNumDosVenue'] = $idexVenue->delete();
                     $messages['msgNumDosVenueEliminee'] = $idexVenueEliminee->delete();
                     // Transfert des backsref
                     $mbVenueEliminee->transferBackRefsFrom($mbVenue);
                     // Suppression de la venue a éliminer
                     $mbVenueEliminee->delete();
                     // Cas 0
                     $newVenue->load($mbVenue->_id);
                     $messages = $this->mapAndStoreVenue($newVenue, $data, $etatVenueEliminee, $idexVenue, $idexVenueEliminee);
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:CHPrimXMLFusionVenue.class.php

示例10: handle

 /**
  * Handle receive order message
  *
  * @param CHL7v2ReceiveOrderMessageResponse $ack     Acknowledgment
  * @param CPatient                          $patient Person
  * @param array                             $data    Data
  *
  * @return string|void
  */
 function handle(CHL7v2ReceiveOrderMessageResponse $ack, CPatient $patient, $data)
 {
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $sender = $exchange_hl7v2->_ref_sender;
     $sender->loadConfigValues();
     $this->_ref_sender = $sender;
     $patientPI = CValue::read($data['personIdentifiers'], "PI");
     if (!$patientPI) {
         return $exchange_hl7v2->setORRError($ack, "E007");
     }
     $IPP = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
     // Patient non retrouvé par son IPP
     if (!$IPP->_id) {
         return $exchange_hl7v2->setORRError($ack, "E105");
     }
     $patient->load($IPP->object_id);
     $venueAN = $this->getVenueAN($sender, $data);
     $NDA = CIdSante400::getMatch("CSejour", $sender->_tag_sejour, $venueAN);
     // Séjour non retrouvé par son NDA
     if (!$NDA->_id) {
         return $exchange_hl7v2->setORRError($ack, "E205");
     }
     $sejour = new CSejour();
     $sejour->load($NDA->object_id);
     // Common order - ORC
     $orc = $data["ORC"];
     $obr = $data["OBR"];
     $event_request = $this->getEventRequest($orc);
     $consultation = new CConsultation();
     $placer_id = $this->getPlacerNumber($orc);
     $filler_id = $this->getFillerNumber($orc);
     switch ($event_request) {
         // new order
         case "SN":
             $datetime = $this->getDate($orc);
             $orc12 = $this->getDoctorNode($orc, $data);
             $mediuser = new CMediusers();
             $medisuer_id = $this->getDoctor($orc12, $mediuser);
             if (!$medisuer_id) {
                 return $exchange_hl7v2->setORRError($ack, "E801");
             }
             $consultation->createByDatetime($datetime, $medisuer_id, $patient->_id);
             if (!$consultation->_id) {
                 return $exchange_hl7v2->setORRError($ack, "E802");
             }
             $idex = new CIdSante400();
             $idex->id400 = $filler_id;
             $idex->tag = $sender->_tag_consultation;
             $idex->setObject($consultation);
             $idex->store();
             break;
             //Modification
         //Modification
         case "SC":
             $consultation->load($placer_id);
             $status_code = $this->getStatusCode($orc);
             switch ($status_code) {
                 case "CM":
                     $status = CConsultation::TERMINE;
                     break;
                 case "OD":
                     $status = CConsultation::PLANIFIE;
                     break;
                 case "IP":
                     $status = CConsultation::EN_COURS;
                     break;
                 default:
                     return $exchange_hl7v2->setORRError($ack, "E803");
             }
             $consultation->chrono = $status;
             if ($msg = $consultation->store()) {
                 return $exchange_hl7v2->setORRError($ack, "E804", $msg);
             }
             $obr4 = $this->getExamen("OBR.4", $obr, $data);
             //Identifiant de l'élément de prescription
             $examen_id = $this->getExamenID($obr4);
             $examen_name = $this->getExamenName($obr4);
             //todo gérer avec l'élément de prescription
             break;
             // cancel order request
         // cancel order request
         case "OC":
             $consultation->annule = "1";
             if ($msg = $consultation->store()) {
                 return $exchange_hl7v2->setORRError($ack, "E804", $msg);
             }
             $idex = CIdSante400::getMatchFor($consultation, $sender->_tag_consultation);
             $idex->id400 = "trash_{$idex->id400}";
             if ($msg = $idex->store()) {
                 return $exchange_hl7v2->setORRError($ack, "E805", $msg);
             }
//.........这里部分代码省略.........
开发者ID:fbone,项目名称:mediboard4,代码行数:101,代码来源:CHL7v2ReceiveOrderMessage.class.php

示例11: CSejour

 // Cas des séances collectives
 if ($evenement->seance_collective_id) {
     CAppUI::displayMsg("Impossible de dupliquer des événements qui sont dans des seances collectives", "CEvenementSSR-msg-create");
     continue;
 }
 // Autres rééducateurs
 global $can;
 $user = CAppUI::$user;
 $therapeute = $evenement->loadRefTherapeute();
 if ($therapeute->function_id != $user->function_id && !$can->admin) {
     CAppUI::displayMsg("Impossible de dupliquer les événements d'un rééducateur d'une autre spécialié", "CEvenementSSR-msg-create");
     continue;
 }
 // Chargements préparatoire au transferts automatiques de rééducateurs
 $sejour = new CSejour();
 $sejour->load($evenement->sejour_id);
 $bilan = $sejour->loadRefBilanSSR();
 $referant = $bilan->loadRefKineReferent();
 $_day = CMbDT::date($evenement->debut);
 $therapeute_id = $evenement->therapeute_id;
 // Transfert kiné référent => kiné remplaçant si disponible
 if ($therapeute_id == $referant->_id) {
     $conge = new CPlageConge();
     $conge->loadFor($therapeute_id, $_day);
     // Référent en congés
     if ($conge->_id) {
         $replacement = new CReplacement();
         $replacement->conge_id = $conge->_id;
         $replacement->sejour_id = $sejour->_id;
         $replacement->loadMatchingObject();
         if ($replacement->_id) {
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_duplicate_evenements_aed.php

示例12: array

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Urgences
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
if (null == ($sip_barcode = CValue::get("sip_barcode"))) {
    return;
}
$values = array();
if (!preg_match("/SID([\\d]+)/i", $sip_barcode, $values)) {
    CAppUI::stepAjax("Le numéro saisi '%s' ne correspond pas à un idenfitiant de séjour", UI_MSG_WARNING, $sip_barcode);
    return;
}
$sejour = new CSejour();
$sejour->load($values[1]);
if (!$sejour->_id) {
    CAppUI::stepAjax("Le séjour dont l'idenfitiant est '%s' n'existe pas", UI_MSG_WARNING, $sejour->_id);
    return;
}
$sejour->loadRefRPU();
if ($sejour->type != "urg" && !$sejour->_ref_rpu->_id) {
    CAppUI::stepAjax("Le séjour trouvé '%s' n'est pas un séjour d'urgences", UI_MSG_WARNING, $sejour->_view);
    return;
}
CAppUI::redirect("m=dPurgences&tab=vw_aed_rpu&sejour_id={$sejour->_id}");
开发者ID:fbone,项目名称:mediboard4,代码行数:30,代码来源:redirect_barcode.php

示例13: CSejour

$crequest->addLJoinClause("rpu", "`sejour`.`sejour_id` = `rpu`.`sejour_id`");
$crequest->addWhereClause("sejour.entree", "> '{$date}'");
$crequest->addGroup(array("`sejour_id`"));
$crequest->addHaving(array("COUNT(`sejour`.`sejour_id`)>1"));
$sejour = new CSejour();
$ds = $sejour->getDS();
$list_id_sejour = $ds->loadList($crequest->makeSelect());
usort($list_id_sejour, function ($a, $b) {
    return -strnatcmp($a["sortie"], $b["sortie"]);
});
$list_sejour = array();
$patients = array();
$guesses = array();
foreach ($list_id_sejour as $_id_sejour) {
    $sejour = new CSejour();
    $sejour->load($_id_sejour["sejour_id"]);
    $sejour->loadBackRefs("rpu");
    $sejour->loadRefPatient();
    $sejour->loadNDA();
    if (!isset($patients[$sejour->patient_id])) {
        $patients["{$sejour->patient_id}"] = $sejour->_ref_patient;
    }
    $patients["{$sejour->patient_id}"]->_ref_sejours[$sejour->_id] = $sejour;
}
$mergeables_count = 0;
foreach ($patients as $patient_id => $patient) {
    $patient->loadIPP();
    $guess = array();
    $nicer = array();
    $guess["mergeable"] = isset($guesses[$patient_id]) ? true : false;
    // Sibling patients
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_doublon_rpu.php

示例14: array

            if (!$_exchange->_id) {
                CAppUI::stepAjax("CExchangeAny-msg-delete", UI_MSG_ALERT);
            }
            CAppUI::stepAjax("CExchangeDataFormat-reprocessed");
        }
        break;
    case "detect_collision":
        $collisions = array();
        foreach ($exchanges as $_exchange) {
            if ($_exchange instanceof CExchangeHL7v2) {
                $hl7_message = new CHL7v2Message();
                $hl7_message->parse($_exchange->_message);
                $xml = $hl7_message->toXML(null, false);
                $PV1 = $xml->queryNode("PV1");
                $PV2 = $xml->queryNode("PV2");
                $sejour = new CSejour();
                $sejour->load($_exchange->object_id);
                $sejour_hl7 = new CSejour();
                $sejour_hl7->entree_prevue = $xml->queryTextNode("PV2.8/TS.1", $PV2);
                $sejour_hl7->entree_reelle = $xml->queryTextNode("PV1.44/TS.1", $PV1);
                $sejour_hl7->sortie_prevue = $xml->queryTextNode("PV2.9/TS.1", $PV2);
                $sejour_hl7->sortie_reelle = $xml->queryTextNode("PV1.45/TS.1", $PV1);
                $collisions[] = array("hl7" => $sejour_hl7, "mb" => $sejour);
            }
        }
        $smarty->assign("collisions", $collisions);
        $smarty->display("inc_detect_collisions.tpl");
        break;
    default:
}
CAppUI::js("next{$tool}()");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_tools.php

示例15: CSejour

}
$lit_id = CValue::post("lit_id");
$service_sortie_id = CValue::post("service_sortie_id");
$mode_sortie = CValue::post("mode_sortie");
$type = CValue::post("type");
$entree_preparee_trigger = CValue::post("_entree_preparee_trigger");
$sejour_id = CValue::post("sejour_id");
$create_affectation = CAppUI::conf("urgences create_affectation");
$sejour = new CSejour();
$sejour->load($sejour_id);
$rpu = $sejour->loadRefRPU();
if ($rpu && $rpu->mutation_sejour_id) {
    $sejour_id = $sejour->_ref_rpu->mutation_sejour_id;
}
$sejour_hospit = new CSejour();
$sejour_hospit->load($sejour_id);
$curr_affectation_hospit = $sejour_hospit->loadRefCurrAffectation();
// Pour un séjour ayant comme mode de sortie urgence:
if ($create_affectation && $mode_sortie == "mutation" && $rpu && $rpu->_id && ($lit_id && $curr_affectation_hospit->lit_id != $lit_id || $service_sortie_id && $curr_affectation_hospit->service_id != $service_sortie_id)) {
    // Création de l'affectation d'hospitalisation
    $affectation_hospit = new CAffectation();
    $affectation_hospit->entree = CMbDT::dateTime();
    $affectation_hospit->lit_id = $lit_id;
    $affectation_hospit->service_id = $service_sortie_id;
    // Mutation en provenance des urgences
    $affectation_hospit->_mutation_urg = true;
    $sejour_hospit->forceAffectation($affectation_hospit);
}
// Lancement des formulaires automatiques sur le champ entrée préparée
if ($sejour->_id && $entree_preparee_trigger && CModule::getActive("forms")) {
    $ex_class_events = CExClassEvent::getForObject($sejour, "preparation_entree_auto", "required");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:do_sejour_aed.php


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