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


PHP CPatient::load方法代码示例

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


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

示例1: build

 /**
  * Build A37 event
  *
  * @param CPatient $patient Person
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($patient)
 {
     parent::build($patient);
     // Patient Identification
     $this->addPID($patient);
     /* @toto old ? */
     $patient_link = new CPatient();
     $patient_link->load($patient->_old->patient_link_id);
     // Patient link Identification
     $this->addPID($patient_link);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:20,代码来源:CHL7v2EventADTA37.class.php

示例2: build

 /**
  * Build A44 event
  *
  * @param CSejour $sejour Admit
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($sejour)
 {
     parent::build($sejour);
     $patient = $sejour->_ref_patient;
     // Patient Identification
     $this->addPID($patient, $sejour);
     // Patient Additional Demographic
     $this->addPD1($patient);
     $old_patient = new CPatient();
     $old_patient->load($sejour->_old->patient_id);
     // Merge Patient Information
     $this->addMRG($old_patient);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CHL7v2EventADTA44.class.php

示例3: array

 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkAdmin();
$idex = new CIdSante400();
$idex->object_class = "CPatient";
$idex->tag = CAppUI::conf("dPpatients CPatient tag_conflict_ipp") . CAppUI::conf("dPpatients CPatient tag_ipp");
/** @var CIdSante400[] $ipp_conflicts */
$ipp_conflicts = $idex->loadMatchingList();
$conflicts = array();
foreach ($ipp_conflicts as $_conflict) {
    $patient_conflict = new CPatient();
    $patient_conflict->load($_conflict->object_id);
    $patient_conflict->loadIPP();
    $IPP = new CIdSante400();
    $IPP->object_class = "CPatient";
    $IPP->tag = CAppUI::conf("dPpatients CPatient tag_ipp");
    $IPP->id400 = $_conflict->id400;
    $IPP->loadMatchingObject();
    $patient = new CPatient();
    $patient->load($IPP->object_id);
    $patient->loadIPP();
    $conflicts[] = array("patient" => $patient, "patient_conflict" => $patient_conflict);
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("conflicts", $conflicts);
$smarty->display("inc_ipp_conflicts.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_ipp_conflicts.php

示例4: handle

 /**
  * Handle event
  *
  * @param CHL7Acknowledgment $ack        Acknowledgement
  * @param CPatient           $newPatient Person
  * @param array              $data       Nodes data
  *
  * @return null|string
  */
 function handle(CHL7Acknowledgment $ack, CPatient $newPatient, $data)
 {
     // Traitement du message des erreurs
     $comment = $warning = "";
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $exchange_hl7v2->_ref_sender->loadConfigValues();
     $sender = $exchange_hl7v2->_ref_sender;
     foreach ($data["merge"] as $_data_merge) {
         $data = $_data_merge;
         $mbPatient = new CPatient();
         $mbPatientElimine = new CPatient();
         $patientPI = CValue::read($data['personIdentifiers'], "PI");
         $patientRI = CValue::read($data['personIdentifiers'], "RI");
         $patientEliminePI = CValue::read($data['personElimineIdentifiers'], "PI");
         $patientElimineRI = CValue::read($data['personElimineIdentifiers'], "RI");
         // Acquittement d'erreur : identifiants RI et PI non fournis
         if (!$patientRI && !$patientPI || !$patientElimineRI && !$patientEliminePI) {
             return $exchange_hl7v2->setAckAR($ack, "E100", null, $newPatient);
         }
         $idexPatient = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
         if ($mbPatient->load($patientRI)) {
             if ($idexPatient->object_id && $mbPatient->_id != $idexPatient->object_id) {
                 $comment = "L'identifiant source fait référence au patient : {$idexPatient->object_id}";
                 $comment .= " et l'identifiant cible au patient : {$mbPatient->_id}.";
                 return $exchange_hl7v2->setAckAR($ack, "E130", $comment, $newPatient);
             }
         }
         if (!$mbPatient->_id) {
             $mbPatient->load($idexPatient->object_id);
         }
         $idexPatientElimine = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientEliminePI);
         if ($mbPatientElimine->load($patientElimineRI)) {
             if ($idexPatientElimine->object_id && $mbPatientElimine->_id != $idexPatientElimine->object_id) {
                 $comment = "L'identifiant source fait référence au patient : {$idexPatientElimine->object_id}";
                 $comment .= "et l'identifiant cible au patient : {$mbPatientElimine->_id}.";
                 return $exchange_hl7v2->setAckAR($ack, "E131", $comment, $newPatient);
             }
         }
         if (!$mbPatientElimine->_id) {
             $mbPatientElimine->load($idexPatientElimine->object_id);
         }
         if (!$mbPatient->_id || !$mbPatientElimine->_id) {
             $comment = !$mbPatient->_id ? "Le patient {$mbPatient->_id} est inconnu dans Mediboard." : "Le patient {$mbPatientElimine->_id} est inconnu dans Mediboard.";
             return $exchange_hl7v2->setAckAR($ack, "E120", $comment, $newPatient);
         }
         // Passage en trash de l'IPP du patient a éliminer
         $newPatient->trashIPP($idexPatientElimine);
         if ($mbPatient->_id == $mbPatientElimine->_id) {
             return $exchange_hl7v2->setAckAA($ack, "I104", null, $newPatient);
         }
         $patientsElimine_array = array($mbPatientElimine);
         $first_patient_id = $mbPatient->_id;
         $checkMerge = $mbPatient->checkMerge($patientsElimine_array);
         // Erreur sur le check du merge
         if ($checkMerge) {
             $comment = "La fusion de ces deux patients n'est pas possible à cause des problèmes suivants : {$checkMerge}";
             return $exchange_hl7v2->setAckAR($ack, "E121", $comment, $newPatient);
         }
         $mbPatientElimine_id = $mbPatientElimine->_id;
         /** @todo mergePlainFields resets the _id */
         $mbPatient->_id = $first_patient_id;
         // Notifier les autres destinataires
         $mbPatient->_eai_sender_guid = $sender->_guid;
         $mbPatient->_merging = CMbArray::pluck($patientsElimine_array, "_id");
         if ($msg = $mbPatient->merge($patientsElimine_array)) {
             return $exchange_hl7v2->setAckAR($ack, "E103", $msg, $mbPatient);
         }
         $mbPatient->_mbPatientElimine_id = $mbPatientElimine_id;
         $comment = CEAIPatient::getComment($mbPatient, $mbPatientElimine);
     }
     return $exchange_hl7v2->setAckAA($ack, "I103", $comment, $mbPatient);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:81,代码来源:CHL7v2MergePersons.class.php

示例5: 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

示例6: elseif

        } elseif ($dialog) {
            $this->redirectStore .= "&name=" . $this->_obj->nom . "&firstname=" . $this->_obj->prenom;
        }
    }
}
$do = new CDoPatientMerge();
$patient1_id = CValue::post("patient1_id");
$patient2_id = CValue::post("patient2_id");
$base_object_id = CValue::post("_base_object_id");
// Erreur sur les ID du patient
$patient1 = new CPatient();
if (!$patient1->load($patient1_id)) {
    $do->errorRedirect("Patient 1 n'existe pas ou plus");
}
$patient2 = new CPatient();
if (!$patient2->load($patient2_id)) {
    $do->errorRedirect("Patient 2 n'existe pas ou plus");
}
if (intval(CValue::post("del"))) {
    $do->errorRedirect("Fusion en mode suppression impossible");
}
$patients = array($patient1, $patient2);
if ($base_object_id) {
    $do->_obj->load($base_object_id);
    foreach ($patients as $key => $patient) {
        if ($base_object_id == $patient->_id) {
            unset($patients[$key]);
            unset($_POST["_merging"][$base_object_id]);
        }
    }
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:do_patients_fusion.php

示例7: CPatient

/**
 * $Id: vw_idx_patients.php 26857 2015-01-21 14:44:41Z rhum1 $
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 26857 $
 */
CCanDo::checkRead();
$mediuser = CMediusers::get();
// Chargement du patient sélectionné
$patient_id = CValue::getOrSession("patient_id");
$patient = new CPatient();
if ($new = CValue::get("new")) {
    $patient->load(null);
    CValue::setSession("patient_id", null);
    CValue::setSession("selClass", null);
    CValue::setSession("selKey", null);
} else {
    $patient->load($patient_id);
}
$patient_nom = trim(CValue::getOrSession("nom"));
$patient_prenom = trim(CValue::getOrSession("prenom"));
$patient_ville = CValue::get("ville");
$patient_cp = CValue::get("cp");
$patient_day = CValue::getOrSession("Date_Day");
$patient_month = CValue::getOrSession("Date_Month");
$patient_year = CValue::getOrSession("Date_Year");
$patient_naissance = "{$patient_year}-{$patient_month}-{$patient_day}";
$patient_ipp = CValue::get("patient_ipp");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_idx_patients.php

示例8: foreach

         $request_b->addTable("patients");
         $request_b->addOrder("patients.nom ASC");
     }
     $request_b->addLJoin($ljoin);
     $request_b->addRJoin($rjoinMix);
     $request_b->addWhere($where);
     $request_b->addWhere($whereMix);
     if (!$export) {
         $request_b->setLimit("{$start},30");
     }
     $results = array_merge($results, $ds->loadList($request_b->makeSelect()));
 }
 foreach ($results as $_result) {
     $_patient_id = $_result["patient_id"];
     $pat = new CPatient();
     $pat->load($_patient_id);
     // Recherche sur un antécédent
     if (isset($_result["antecedent_id"])) {
         $_atcd = new CAntecedent();
         $_atcd->load($_result["antecedent_id"]);
         $pat->_ref_antecedent = $_atcd;
     } else {
         // On affiche tous les antécédents du patient
         $dossier_medical = $pat->loadRefDossierMedical(false);
         $pat->_refs_antecedents = $dossier_medical->loadRefsAntecedents();
         $pat->_refs_allergies = $dossier_medical->loadRefsAllergies();
         $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"]);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_recherche_dossier_clinique.php

示例9: CMediusers

$chir_id = CAppUI::conf("dPcabinet keepchir") ? CValue::getOrSession("chir_id") : CValue::get("chir_id");
// Nouvelle consultation
if (!$consultation_id) {
    if ($plageconsult_id) {
        // On a fourni une plage de consultation
        $plageConsult->load($plageconsult_id);
    } else {
        if ($chir_id) {
            $chir = new CMediusers();
            $chir->load($chir_id);
        }
    }
    // assign patient if defined in get
    if ($pat_id = CValue::get("pat_id")) {
        // On a fourni l'id du patient
        $pat->load($pat_id);
    }
    if ($date_planning) {
        // On a fourni une date
        $consult->_date = $date_planning;
    }
    if ($heure) {
        // On a fourni une heure
        $consult->heure = $heure;
        $consult->plageconsult_id = $plageconsult_id;
        $chir->load($plageConsult->chir_id);
    }
    // grossesse
    if (!$consult->grossesse_id && $grossesse_id) {
        $consult->grossesse_id = $grossesse_id;
    }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:edit_planning.php

示例10: CPatient

 /**
  * Handle event A45 - move visit information - visit number
  *
  * @param CHL7Acknowledgment $ack        Acknowledgment
  * @param CPatient           $newPatient Person
  * @param array              $data       Datas
  *
  * @return string
  */
 function handleA45(CHL7Acknowledgment $ack, CPatient $newPatient, $data)
 {
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $sender = $exchange_hl7v2->_ref_sender;
     // On considère que l'on a qu'un changement à faire
     if (count($data["merge"]) > 1) {
         return $exchange_hl7v2->setAckAR($ack, "E701", null, $newPatient);
     }
     $merge = CValue::read($data["merge"], 0);
     $keep_patient = new CPatient();
     $patientPI = CValue::read($data['personIdentifiers'], "PI");
     // Acquittement d'erreur : identifiants RI et PI non fournis
     if (!$patientPI) {
         return $exchange_hl7v2->setAckAR($ack, "E100", null, $newPatient);
     }
     // Chargement du patient
     $idexPatient = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
     $keep_patient->load($idexPatient->object_id);
     if (!$keep_patient->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E702", null, $keep_patient);
     }
     // MRG-1 Ancien numéro du patient
     // Chargement du séjour pour ce patient
     $MRG_1 = $this->queryTextNode("MRG.1/CX.1", $merge["MRG"]);
     $idex = new CIdSante400();
     $idex->object_class = "CPatient";
     $idex->id400 = $MRG_1;
     $idex->tag = $sender->_tag_patient;
     /** @var CPatient $patient_removing */
     $patient_removing = $idex->getMbObject();
     if (!$patient_removing || !$patient_removing->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E703", null, $newPatient);
     }
     // MRG-5 Numéro de dossier
     // Chargement du dossier par le numéro de séjour
     $MRG_5 = $this->queryTextNode("MRG.5/CX.1", $merge["MRG"]);
     $idex = new CIdSante400();
     $idex->object_class = "CSejour";
     $idex->id400 = $MRG_5;
     $idex->tag = $sender->_tag_sejour;
     /** @var CSejour $venue */
     $venue = $idex->getMbObject();
     if (!$venue || !$venue->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E704", null, $newPatient);
     }
     // Si le patient du séjour retrouvé est différent de celui que l'on doit "supprimer"
     if ($venue->patient_id != $patient_removing->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E705", null, $venue);
     }
     // Réattribution du patient_id sur le séjour
     // Impossibilité dans Mediboard de modifier le patient d'un séjour ayant une entrée réelle
     if (CAppUI::conf("dPplanningOp CSejour patient_id") == 2 && $venue->entree_reelle) {
         return $exchange_hl7v2->setAckAR($ack, "E706", null, $venue);
     }
     $venue->patient_id = $keep_patient->_id;
     // Notifier les autres destinataires autre que le sender
     $venue->_eai_sender_guid = $sender->_guid;
     if ($msg = $venue->store()) {
         return $exchange_hl7v2->setAckAR($ack, "E707", $msg, $venue);
     }
     $comment = CEAISejour::getComment($venue);
     return $exchange_hl7v2->setAckAA($ack, "I700", $comment, $venue);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:72,代码来源:CHL7v2MoveAccountInformation.class.php

示例11: CNaissance

 $naissance = new CNaissance();
 $naissance->load($naissance_id);
 $naissance->rang = $rang;
 $naissance->hors_etab = $hors_etab;
 $naissance->num_naissance = $num_naissance;
 $naissance->fausse_couche = $fausse_couche;
 $naissance->rques = $rques;
 if (!$naissance->date_time && $date_time) {
     $validation_naissance = true;
     $naissance->operation_id = $operation_id;
 }
 $naissance->date_time = $date_time;
 storeObject($naissance);
 $sejour = $naissance->loadRefSejourEnfant();
 $patient = new CPatient();
 $patient->load($sejour->patient_id);
 $patient->nom = $nom;
 $patient->prenom = $prenom;
 $patient->nom = $nom;
 $patient->sexe = $sexe;
 $patient->naissance = $date_naissance;
 storeObject($patient);
 $sejour_enfant = new CSejour();
 $sejour_enfant->load($naissance->sejour_enfant_id);
 $sejour_enfant->praticien_id = $praticien_id;
 $sejour_enfant->_naissance = true;
 storeObject($sejour_enfant);
 // Effectuer l'admission si nécessaire (si issu d'un dossier provisoire)
 if ($validation_naissance) {
     // On passe la date de naissance du bébé au jour courant
     $patient->naissance = CMbDT::date();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_create_naissance_aed.php

示例12: fusionPatient

 /**
  * Fusion and recording a patient with an IPP in the system
  *
  * @param CHPrimXMLAcquittementsPatients $dom_acq    Acquittement
  * @param CPatient                       $newPatient Patient
  * @param array                          $data       Datas
  *
  * @return string acquittement 
  **/
 function fusionPatient(CHPrimXMLAcquittementsPatients $dom_acq, CPatient $newPatient, $data)
 {
     $echg_hprim = $this->_ref_echange_hprim;
     $commentaire = $avertissement = "";
     $codes = array();
     $sender = $echg_hprim->_ref_sender;
     $sender->loadConfigValues();
     $this->_ref_sender = $sender;
     // Si CIP
     if (!CAppUI::conf('sip server')) {
         $mbPatientElimine = new CPatient();
         $mbPatient = new CPatient();
         $sender = $echg_hprim->_ref_sender;
         // Acquittement d'erreur : identifiants source et cible non fournis pour le patient / patientElimine
         if (!$data['idSourcePatient'] && !$data['idCiblePatient'] && !$data['idSourcePatientElimine'] && !$data['idCiblePatientElimine']) {
             return $echg_hprim->setAckError($dom_acq, "E005", $commentaire, $newPatient);
         }
         $idexPatient = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $data['idSourcePatient']);
         if ($mbPatient->load($data['idCiblePatient'])) {
             if ($mbPatient->_id != $idexPatient->object_id) {
                 $commentaire = "L'identifiant source fait référence au patient : {$idexPatient->object_id} et l'identifiant cible";
                 $commentaire .= "au patient : {$mbPatient->_id}.";
                 return $echg_hprim->setAckError($dom_acq, "E004", $commentaire, $newPatient);
             }
         }
         if (!$mbPatient->_id) {
             $mbPatient->load($idexPatient->object_id);
         }
         $idexPatientElimine = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $data['idSourcePatientElimine']);
         if ($mbPatientElimine->load($data['idCiblePatientElimine'])) {
             if ($mbPatientElimine->_id != $idexPatientElimine->object_id) {
                 $commentaire = "L'identifiant source fait référence au patient : {$idexPatientElimine->object_id} et l'identifiant cible";
                 $commentaire .= "au patient : {$mbPatientElimine->_id}.";
                 return $echg_hprim->setAckError($dom_acq, "E041", $commentaire, $newPatient);
             }
         }
         if (!$mbPatientElimine->_id) {
             $mbPatientElimine->load($idexPatientElimine->object_id);
         }
         if (!$mbPatient->_id || !$mbPatientElimine->_id) {
             $commentaire = !$mbPatient->_id ? "Le patient {$mbPatient->_id} est inconnu dans Mediboard." : "Le patient {$mbPatientElimine->_id} est inconnu dans Mediboard.";
             return $echg_hprim->setAckError($dom_acq, "E012", $commentaire, $newPatient);
         }
         // Passage en trash de l'IPP du patient a éliminer
         $idexPatientElimine->tag = CAppUI::conf('dPpatients CPatient tag_ipp_trash') . $sender->_tag_patient;
         $idexPatientElimine->store();
         $avertissement = null;
         $patientsElimine_array = array($mbPatientElimine);
         $first_patient_id = $mbPatient->_id;
         $checkMerge = $mbPatient->checkMerge($patientsElimine_array);
         // Erreur sur le check du merge
         if ($checkMerge) {
             $commentaire = "La fusion de ces deux patients n'est pas possible à cause des problèmes suivants : {$checkMerge}";
             return $echg_hprim->setAckError($dom_acq, "E010", $commentaire, $newPatient);
         }
         $mbPatientElimine->_id;
         /** @todo mergePlainFields resets the _id */
         $mbPatient->_id = $first_patient_id;
         // Notifier les autres destinataires
         $mbPatient->_eai_sender_guid = $sender->_guid;
         $mbPatient->_merging = CMbArray::pluck($patientsElimine_array, "_id");
         $msg = $mbPatient->merge($patientsElimine_array);
         $commentaire = CEAIPatient::getComment($newPatient, $mbPatientElimine);
         $codes = array($msg ? "A010" : "I010");
         if ($msg) {
             $avertissement = $msg . " ";
         }
     }
     return $echg_hprim->setAck($dom_acq, $codes, $avertissement, $commentaire, $newPatient);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:79,代码来源:CHPrimXMLFusionPatient.class.php

示例13: mergePatient

 /**
  * merge the patient
  *
  * @param String   $identifier identifier
  * @param String   $tag        tag
  * @param CPatient $patient    patient
  *
  * @return null|CHPrimSanteError
  */
 function mergePatient($identifier, $tag, CPatient $patient)
 {
     $idex = CIdSante400::getMatch("CPatient", $tag, $identifier["identifier"]);
     if (!$idex->_id) {
         return new CHPrimSanteError($this->_ref_exchange_hpr, "P", "02", array("P", $this->loop, $this->identifier_patient), "8.3.1");
     }
     $idex2 = CIdSante400::getMatch("CPatient", $tag, $identifier["identifier_merge"]);
     if (!$idex2->_id) {
         return new CHPrimSanteError($this->_ref_exchange_hpr, "P", "02", array("P", $this->loop, $this->identifier_patient), "8.3.2");
     }
     $patient->load($idex->object_id);
     $patient2 = new CPatient();
     $patient2->load($idex2->object_id);
     $patientsElimine_array = array($patient2);
     $first_patient_id = $patient->_id;
     // Erreur sur le check du merge
     if ($checkMerge = $patient->checkMerge($patientsElimine_array)) {
         return new CHPrimSanteError($this->_ref_exchange_hpr, "P", "12", array("P", $this->loop, $this->identifier_patient), "8.3.3", $checkMerge);
     }
     $mbPatientElimine_id = $patient2->_id;
     /** @todo mergePlainFields resets the _id */
     $patient->_id = $first_patient_id;
     // Notifier les autres destinataires
     $patient->_eai_sender_guid = $this->_ref_sender->_guid;
     $patient->_merging = CMbArray::pluck($patientsElimine_array, "_id");
     if ($msg = $patient->merge($patientsElimine_array)) {
         return new CHPrimSanteError($this->_ref_exchange_hpr, "P", "12", array("P", $this->loop, $this->identifier_patient), "8.3.3", $msg);
     }
     $patient->_mbPatientElimine_id = $mbPatientElimine_id;
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:40,代码来源:CHPrimSanteRecordADM.class.php

示例14: onAfterStore

 /**
  * Trigger after event store
  *
  * @param CMbObject $mbObject Object
  *
  * @return void
  */
 function onAfterStore(CMbObject $mbObject)
 {
     if (!$this->isHandled($mbObject)) {
         return false;
     }
     /** @var CInteropReceiver $receiver */
     $receiver = $mbObject->_receiver;
     $receiver->getInternationalizationCode($this->transaction);
     $code = null;
     // Création/MAJ d'un correspondant patient
     if ($mbObject instanceof CCorrespondantPatient) {
         if (!$mbObject->patient_id) {
             return;
         }
         $mbObject = $mbObject->loadRefPatient();
         $mbObject->_receiver = $receiver;
         $code = "A31";
     } elseif ($mbObject instanceof CIdSante400) {
         $idex = $mbObject;
         // Concerne pas les patients / Pas en mode modification
         if ($idex->object_class != "CPatient" || !$idex->_old->_id) {
             return;
         }
         // Pas un tag IPP
         if ($idex->tag != CPatient::getTagIPP()) {
             return;
         }
         // Vraiment une modif de l'idex ?
         if ($idex->id400 == $idex->_old->id400) {
             return;
         }
         $code = "A47";
         $patient = new CPatient();
         $patient->load($idex->object_id);
         $patient->_receiver = $receiver;
         $patient->_patient_elimine = clone $patient;
         // Affecte le nouvel IPP au patient
         $patient->_IPP = $idex->id400;
         // Affecte l'ancien IPP au "patient éliminé"
         $patient->_patient_elimine->_IPP = $idex->_old->id400;
         if (!$this->isMessageSupported($this->transaction, $this->message, $code, $receiver)) {
             return;
         }
         $this->sendITI($this->profil, $this->transaction, $this->message, $code, $patient);
         return;
     } else {
         if ($mbObject->_naissance) {
             return;
         }
         switch ($mbObject->_ref_current_log->type) {
             case "create":
                 $code = "A28";
                 break;
             case "store":
                 // Patient lié
                 if ($mbObject->fieldModified("patient_link_id")) {
                     $code = "A24";
                     break;
                 }
                 // Annulation de la liaison avec le patient lié
                 if ($mbObject->_old->patient_link_id && !$mbObject->patient_link_id) {
                     $code = "A37";
                     break;
                 }
                 if ($receiver->_configs["send_patient_with_visit"]) {
                     /** @var CPatient $mbObject */
                     $sejour = $mbObject->loadRefsSejours(array("entree_reelle" => "IS NOT NULL"));
                     if (count($sejour) < 1) {
                         $code = null;
                         break;
                     }
                 }
                 if ($receiver->_configs["send_patient_with_current_admit"]) {
                     // On charge seulement le séjour courant pour le patient
                     $sejours = $mbObject->getCurrSejour(null, $receiver->group_id);
                     if (!$sejours) {
                         break;
                     }
                     $sejour = reset($sejours);
                     if (!$sejour->_id) {
                         break;
                     }
                     $mbObject->_ref_sejour = $sejour;
                 }
                 // Dans tous les autres cas il s'agit d'une modification
                 $code = $receiver->_configs["send_update_patient_information"] == "A08" ? "A08" : "A31";
                 break;
             default:
                 $code = null;
         }
     }
     if (!$code) {
         return;
//.........这里部分代码省略.........
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:101,代码来源:CITI30DelegatedHandler.class.php

示例15: explode

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$objects_id = CValue::post('objects_id');
if (!is_array($objects_id)) {
    $objects_id = explode("-", $objects_id);
}
if (count($objects_id) != 2) {
    CAppUI::stepAjax("Trop d'objet pour réaliser une association", UI_MSG_ERROR);
}
if (class_exists("CPatient") && count($objects_id)) {
    $patient1 = new CPatient();
    $patient2 = new CPatient();
    if (!$patient1->load($objects_id[0]) || !$patient2->load($objects_id[1])) {
        CAppUI::stepAjax("Chargement impossible du patient", UI_MSG_ERROR);
    }
    $patient1->_doubloon_ids = array($patient2->_id);
    if ($msg = $patient1->store()) {
        CAppUI::stepAjax("Association du patient impossible : {$msg}", UI_MSG_ERROR);
    }
    CAppUI::stepAjax("{$patient1->_view} associé avec {$patient2->_view}");
}
CApp::rip();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_link.php


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