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


PHP CPatient::loadIPP方法代码示例

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


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

示例1: CPatient

$firstName = CValue::get("firstName");
$naissance_day = CValue::get("naissance_day");
$naissance_month = CValue::get("naissance_month");
$naissance_year = CValue::get("naissance_year");
$useVitale = CValue::get("useVitale");
$covercard = CValue::get("covercard");
$callback = CValue::get("callback");
$modal = CValue::get("modal", 0);
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefPhotoIdentite();
$patient->countDocItems();
$patient->loadRefsCorrespondantsPatient();
$patient->countINS();
// Chargement de l'ipp
$patient->loadIPP();
if (CModule::getActive("fse")) {
    $cv = CFseFactory::createCV();
    if ($cv) {
        $cv->loadIdVitale($patient);
    }
}
if (!$modal) {
    // Save history
    $params = array("patient_id" => $patient_id, "name" => $name, "firstName" => $firstName, "naissance_day" => $naissance_day, "naissance_month" => $naissance_month, "naissance_year" => $naissance_year);
    CViewHistory::save($patient, $patient_id ? CViewHistory::TYPE_EDIT : CViewHistory::TYPE_NEW, $params);
}
if (!$patient_id) {
    $patient->nom = $name;
    $patient->prenom = $firstName;
    $patient->assure_nom = $name;
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_edit_patients.php

示例2: onBeforeMerge

 /**
  * @see parent::onBeforeMerge
  */
 function onBeforeMerge(CMbObject $mbObject)
 {
     if (!parent::onBeforeMerge($mbObject)) {
         return;
     }
     // Si pas en mode alternatif
     if (!CAppUI::conf("alternative_mode")) {
         throw new CMbException("no_alternative_mode");
     }
     $patient = $mbObject;
     $patient_elimine = new CPatient();
     $patient_elimine->load(reset($mbObject->_merging));
     // Si Client
     if (!CAppUI::conf('sip server')) {
         $mbObject->_fusion = array();
         foreach (CGroups::loadGroups() as $_group) {
             /** @var CInteropSender $sender */
             $sender = $mbObject->_eai_sender_guid ? CMbObject::loadFromGuid($mbObject->_eai_sender_guid) : null;
             if ($sender && $sender->group_id == $_group->_id) {
                 continue;
             }
             $patient->_IPP = null;
             $patient->loadIPP($_group->_id);
             $patient1_ipp = $patient->_IPP;
             $patient_elimine->_IPP = null;
             $patient_elimine->loadIPP($_group->_id);
             $patient2_ipp = $patient_elimine->_IPP;
             // Passage en trash des IPP des patients
             $tap_IPP = CPatient::getTagIPP($_group->_id);
             if (!$tap_IPP) {
                 continue;
             }
             $idexPatient = new CIdSante400();
             $idexPatient->tag = $tap_IPP;
             $idexPatient->object_class = "CPatient";
             $idexPatient->object_id = $patient->_id;
             $idexsPatient = $idexPatient->loadMatchingList();
             $idexPatientElimine = new CIdSante400();
             $idexPatientElimine->tag = $tap_IPP;
             $idexPatientElimine->object_class = "CPatient";
             $idexPatientElimine->object_id = $patient_elimine->_id;
             $idexsPatientElimine = $idexPatientElimine->loadMatchingList();
             $idexs = array_merge($idexsPatient, $idexsPatientElimine);
             $idexs_changed = array();
             if (count($idexs) > 1) {
                 foreach ($idexs as $_idex) {
                     // On continue pour ne pas mettre en trash l'IPP du patient que l'on garde
                     if ($_idex->id400 == $patient1_ipp) {
                         continue;
                     }
                     $old_tag = $_idex->tag;
                     $_idex->tag = CAppUI::conf('dPpatients CPatient tag_ipp_trash') . $tap_IPP;
                     $_idex->last_update = CMbDT::dateTime();
                     if (!($msg = $_idex->store())) {
                         if ($_idex->object_id == $patient_elimine->_id) {
                             $idexs_changed[$_idex->_id] = $old_tag;
                         }
                     }
                 }
             }
             if (!$patient1_ipp && !$patient2_ipp) {
                 continue;
             }
             $mbObject->_fusion[$_group->_id] = array("patientElimine" => $patient_elimine, "patient1_ipp" => $patient1_ipp, "patient2_ipp" => $patient2_ipp, "idexs_changed" => $idexs_changed);
         }
     }
     $this->sendFormatAction("onBeforeMerge", $mbObject);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:71,代码来源:CSipObjectHandler.class.php

示例3: getPersonIdentifiers

 /**
  * Get person identifiers
  *
  * @param CPatient      $patient Person
  * @param CGroups       $group   Group
  * @param CInteropActor $actor   Actor
  *
  * @return array
  */
 function getPersonIdentifiers(CPatient $patient, CGroups $group, CInteropActor $actor = null)
 {
     if (!$patient->_IPP) {
         $patient->loadIPP($group->_id);
     }
     $assigning_authority = $this->getAssigningAuthority("FINESS", $group->finess);
     if (CValue::read($actor->_configs, "build_PID_3_4") === "actor") {
         $assigning_authority = $this->getAssigningAuthority("actor", null, $actor);
     } elseif (CValue::read($actor->_configs, "build_PID_3_4") === "domain") {
         // Master domain
         $group_domain = new CGroupDomain();
         $group_domain->group_id = $group->_id;
         $group_domain->master = 1;
         $group_domain->object_class = "CPatient";
         $group_domain->loadMatchingObject();
         $domain = $group_domain->loadRefDomain();
         $assigning_authority = $this->getAssigningAuthority("domain", null, null, $domain);
     }
     $IPP = $patient->_IPP;
     if (!$patient->_IPP && !CValue::read($actor->_configs, "send_not_master_IPP")) {
         $IPP = "===IPP_MISSING===";
     }
     // Table - 0203
     // RI - Resource identifier
     // PI - Patient internal identifier
     // INS-C - Identifiant national de santé calculé
     $identifiers = array();
     if (CHL7v2Message::$build_mode == "simple") {
         if ($actor->_configs["send_own_identifier"]) {
             $identifiers[] = array($IPP, null, null, !$actor->_configs["send_assigning_authority"] ? null : $assigning_authority, "PI");
             $identifiers[] = array($patient->_id, null, null, !$actor->_configs["send_assigning_authority"] ? null : $this->getAssigningAuthority("mediboard"), "RI");
         } else {
             $identifiers[] = array(!$IPP ? 0 : $IPP);
         }
         return $identifiers;
     }
     if ($IPP) {
         $identifiers[] = array($IPP, null, null, empty($actor->_configs["send_assigning_authority"]) ? null : $assigning_authority, "PI");
     }
     // Ajout des identifiants des acteurs d'intégration
     $this->fillActorsIdentifiers($identifiers, $patient, $actor);
     // Ajout d'auutres identifiants
     $this->fillOtherIdentifiers($identifiers, $patient, $actor);
     return $identifiers;
 }
开发者ID:OpenXtrem,项目名称:mediboard_save,代码行数:54,代码来源:CHL7v2Segment.class.php

示例4: storeIPP

 /**
  * Recording IPP
  * 
  * @param CIdSante400    $IPP     Object id400
  * @param CPatient       $patient Patient
  * @param CInteropSender $sender  Sender
  * 
  * @return null|string null if successful otherwise returns and error message
  */
 static function storeIPP(CIdSante400 $IPP, CPatient $patient, CInteropSender $sender)
 {
     /* Gestion du numéroteur */
     $group = new CGroups();
     $group->load($sender->group_id);
     $group->loadConfigValues();
     // Purge de l'IPP existant sur le patient et on le remplace par le nouveau
     if ($sender->_configs && $sender->_configs["purge_idex_movements"]) {
         // On charge l'IPP courant du patient
         $patient->loadIPP($sender->group_id);
         $ref_IPP = $patient->_ref_IPP;
         if ($ref_IPP) {
             // Si l'IPP actuel est identique à celui qu'on reçoit on ne fait rien
             if ($ref_IPP->id400 == $IPP->id400) {
                 return;
             }
             // On passe l'IPP courant en trash
             $ref_IPP->tag = CAppUI::conf("dPpatients CPatient tag_ipp_trash") . $ref_IPP->tag;
             $ref_IPP->_eai_sender_guid = $sender->_guid;
             $ref_IPP->store();
             $patient->trashIPP($ref_IPP);
         }
         // On sauvegarde le nouveau
         $IPP->tag = $sender->_tag_patient;
         $IPP->object_class = "CPatient";
         $IPP->object_id = $patient->_id;
         $IPP->last_update = CMbDT::dateTime();
         $IPP->_eai_sender_guid = $sender->_guid;
         return $IPP->store();
     }
     // Génération de l'IPP ?
     /* @todo sip_idex_generator doit être remplacé par isIPPSupplier */
     if ($sender->_configs && !$group->_configs["sip_idex_generator"]) {
         if (!$IPP->id400) {
             return null;
         }
         if ($patient) {
             $IPP->object_id = $patient->_id;
         }
         $IPP->last_update = CMbDT::dateTime();
         $IPP->_eai_sender_guid = $sender->_guid;
         return $IPP->store();
     } else {
         $IPP_temp = CIdSante400::getMatch("CPatient", $sender->_tag_patient, null, $patient->_id);
         // Pas d'IPP passé
         if (!$IPP->id400) {
             if ($IPP_temp->_id) {
                 return null;
             }
             if (!CIncrementer::generateIdex($patient, $sender->_tag_patient, $sender->group_id)) {
                 return CAppUI::tr("CEAIPatient-error-generate-idex");
             }
             return null;
         } else {
             // Si j'ai déjà un identifiant
             if ($IPP_temp->_id) {
                 // On passe l'IPP courant en trash
                 $IPP_temp->tag = CAppUI::conf("dPpatients CPatient tag_ipp_trash") . $IPP_temp->tag;
                 $IPP_temp->_eai_sender_guid = $sender->_guid;
                 $IPP_temp->store();
             }
             $incrementer = $sender->loadRefGroup()->loadDomainSupplier("CPatient");
             if ($incrementer && $IPP->id400 < $incrementer->range_min || $IPP->id400 > $incrementer->range_max) {
                 return CAppUI::tr("CEAIPatient-idex-not-in-the-range");
             }
             $IPP->object_id = $patient->_id;
             $IPP->last_update = CMbDT::dateTime();
             $IPP->_eai_sender_guid = $sender->_guid;
             return $IPP->store();
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:81,代码来源:CEAIPatient.class.php


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