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


PHP CMbArray::get方法代码示例

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


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

示例1: getSymbolChar

 /**
  * Get an HTML representation of the symbol char
  *
  * @return string The HTML symbol char
  */
 function getSymbolChar()
 {
     $this->completeField("symbol", "show_points", "display");
     if (!$this->show_points && $this->display != "points") {
         return null;
     }
     return CMbArray::get(self::$_symbol_chars, $this->symbol);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:13,代码来源:CSupervisionGraphAxis.class.php

示例2: getNameClass

 /**
  * Retourne le nom de la classe
  *
  * @return mixed|string
  */
 function getNameClass()
 {
     $name = get_class($this);
     $name = substr($name, 4);
     if (get_class($this) === "CCDA_base_cs") {
         $name = CMbArray::get(explode("_", $name), 1);
     }
     return $name;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:14,代码来源:CCDA_Datatype_Voc.class.php

示例3: getSpecWithClassName

 /**
  * Returns a spec object for an object's field from a class name
  *
  * @param string $class The class name
  * @param string $field The field name
  * @param string $prop  The prop string serializing the spec object options
  *
  * @throws Exception
  * @return CMbFieldSpec
  */
 static function getSpecWithClassName($class, $field, $prop)
 {
     $spec_class = "CMbFieldSpec";
     // Get Spec type
     $first_space = strpos($prop, " ");
     $spec_type = $first_space === false ? $prop : substr($prop, 0, $first_space);
     // Get spec class
     if ($spec_type && null == ($spec_class = CMbArray::get(self::$classes, $spec_type))) {
         throw new Exception("Invalid spec '{$prop}' for field '{$class}::{$field}'");
     }
     return new $spec_class($class, $field, $prop);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CMbFieldSpecFact.class.php

示例4: build

 /**
  * Build event
  *
  * @param CMbObject $object Object
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     // Récupération de la version HL7 en fonction du receiver et de la transaction
     $this->version = CAppUI::conf("hl7 default_version");
     if ($version = CMbArray::get($this->_receiver->_configs, $this->transaction . "_HL7_version")) {
         $this->version = $version;
     }
     // Génération de l'échange
     $this->generateExchange();
     $terminator = $this->getSegmentTerminator($this->_receiver->_configs["ER7_segment_terminator"]);
     // Création du message HL7
     $message = new CHL7v2Message($this->version);
     $message->segmentTerminator = $terminator;
     $message->name = $this->msg_codes;
     $this->message = $message;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:28,代码来源:CHL7v2Event.class.php

示例5: build

 /**
  * @see parent::build
  */
 function build(CHPrimSanteEvent $event)
 {
     parent::build($event);
     $patient = $this->patient;
     $sejour = $this->sejour;
     $actor = isset($event->_sender->_id) ? $event->_sender : $event->_receiver;
     $group = $actor->loadRefGroup();
     $patient->loadIPP($group->_id);
     // P-1: type segment - P(par défaut) (ST)
     // P-2: rang segment - (NM)
     $data[] = "1";
     // P-3: Patient ID (SPEC) (optional)
     $data[] = array(array($patient->_IPP, $patient->_patient_elimine ? $patient->_patient_elimine->_IPP : null, $patient->_patient_elimine ? "FU" : null));
     // P-4: Patient ID (ST) (optional)
     $data[] = null;
     // P-5: sejour ID (ST) (optional)
     $data[] = null;
     // P-6: Nom patient (PN) (optional)
     $data[] = array(array($patient->_p_last_name, $patient->_p_first_name, $patient->prenom_2, $patient->civilite));
     // P-7: Nom de naissance (ST) (optional)
     $data[] = $patient->_p_maiden_name;
     // P-8: Date de naissance (TS) (optional)
     $data[] = $patient->_p_birth_date;
     // P-9: Sexe (ID) (optional)
     $data[] = CMbString::upper($patient->sexe);
     // P-10: race (forbidden)
     $data[] = null;
     $address = explode("\n", $patient->_p_street_address, 1);
     // P-11: adresse (AD) (optional)
     $data[] = array(array(CMbArray::get($address, 0), str_replace("\n", " ", CMbArray::get($address, 1)), $patient->_p_city, null, $patient->_p_postal_code, $patient->pays_insee));
     // P-12: INS (version 2.3) (optional)
     $data[] = null;
     // P-13: téléphone (TN) (optional) (repeatable)
     $data[] = array($patient->_p_phone_number, $patient->_p_mobile_phone_number);
     // P-14: Médecins (CNA) (optional) (repeatable)
     $data[] = null;
     // P-15: Traitement local 1 (ST) (optional)
     $data[] = null;
     // P-16: Traitement local 2 (ST) (optional)
     $data[] = null;
     // P-17: Taille (CQ) (optional)
     $data[] = null;
     // P-18: Poids (CQ) (optional)
     $data[] = null;
     // P-19: Diagnostic (CE) (optional) (repeatable)
     $data[] = null;
     // P-20: Traitement (ST) (optional) (repeatable)
     $data[] = null;
     // P-21: Régime (ST) (optional)
     $data[] = null;
     // P-22: Commentaire 1 (ST) (optional)
     $data[] = null;
     // P-23: Commentaire 2 (ST) (optional)
     $data[] = null;
     // P-24: Date de mouvement (TS) (optional) (repeatable)
     $data[] = null;
     // P-25: Statut de l'admission (ID) (optional)
     $data[] = null;
     // P-26: Localisation (SPEC) (optional)
     $data[] = null;
     // P-27: classification diagnostic (CE) (optional)
     $data[] = null;
     // P-28: Religion (forbidden)
     $data[] = null;
     // P-29: Situation maritale (ID) (optional)
     $data[] = $this->getMaritalStatus($patient->situation_famille);
     // P-30: Précauton à prendre (ID) (optional)
     $data[] = null;
     // P-31: Langue (ST) (optional)
     $data[] = null;
     // P-32: Statut de confidentialité (ID) (optional)
     $data[] = null;
     // P-33: Date de dernière modification (TS) (optional)
     $data[] = null;
     // P-34: Date de décès (TS) (optional)
     $data[] = null;
     $this->fill($data);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:81,代码来源:CHPrimSanteSegmentP.class.php

示例6: COUNT

    if ($filter->_other_function_id) {
        // Other (consultations)
        $query = "CREATE TEMPORARY TABLE consultation_other\n      SELECT \n        consultation_prime.praticien_id, \n        consultation_prime.patient_id,\n        consultation_prime.consultation_id AS consult1_id, \n        consult_date AS consult1_date, \n        consultation.consultation_id AS consult2_id, \n        plageconsult.date AS consult2_date\n      FROM consultation_prime\n      LEFT JOIN consultation ON consultation.patient_id = consultation_prime.patient_id \n      LEFT JOIN plageconsult ON plageconsult.plageconsult_id = consultation.plageconsult_id\n      LEFT JOIN users_mediboard ON users_mediboard.user_id = plageconsult.chir_id\n      WHERE users_mediboard.function_id = '{$filter->_other_function_id}'\n      AND plageconsult.date BETWEEN '{$filter->_date_min}' AND '{$filter->_date_max}'\n      GROUP BY consult1_id;";
        $ds->exec($query);
        // Other (consultations) counts
        $query = "SELECT praticien_id, COUNT(*)\n      FROM consultation_other\n      GROUP BY praticien_id;";
        $others_counts = $ds->loadHashList($query);
    } else {
        $others_counts = array();
    }
}
// Praticiens
$praticiens = $mediuser->loadPraticiens(PERM_READ, $filter->_function_id);
// Stats by praticiens
$stats = array();
foreach ($praticiens as $prat_id => $_praticien) {
    if (!isset($consultations_counts[$_praticien->_id]) && !isset($sejours_counts[$_praticien->_id]) && !isset($patients_counts[$_praticien->_id]) && !isset($others_counts[$_praticien->_id])) {
        unset($praticiens[$prat_id]);
        continue;
    }
    // Counts
    $counts = array("consultations" => CMbArray::get($consultations_counts, $_praticien->_id), "sejours" => CMbArray::get($sejours_counts, $_praticien->_id), "patients" => CMbArray::get($patients_counts, $_praticien->_id), "others" => CMbArray::get($others_counts, $_praticien->_id));
    // Percents
    $percents = array("consultations" => $counts["consultations"] ? 1 : null, "sejours" => $counts["consultations"] ? $counts["sejours"] / $counts["consultations"] : null, "patients" => $counts["consultations"] ? $counts["patients"] / $counts["consultations"] : null, "others" => $counts["consultations"] ? $counts["others"] / $counts["consultations"] : null);
    $stats[$_praticien->_id] = array("counts" => $counts, "percents" => $percents);
}
$smarty = new CSmartyDP();
$smarty->assign("filter", $filter);
$smarty->assign("praticiens", $praticiens);
$smarty->assign("stats", $stats);
$smarty->display("inc_stats_nb_consults.tpl");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_stats_nb_consults.php

示例7: getGT1

 /**
  * Récupération du segment GT1
  *
  * @param DOMNode $node     Node
  * @param CSejour $newVenue Admit
  *
  * @return void
  */
 function getGT1(DOMNode $node, CSejour $newVenue)
 {
     if (!$newVenue->_id) {
         return;
     }
     $patient = $newVenue->_ref_patient;
     if (!$patient->_id) {
         return;
     }
     $GT1_2 = $this->queryTextNode("GT1.2/CX.1", $node);
     $GT1_3 = $this->queryNode("GT1.3", $node);
     $nom = $this->queryTextNode("XPN.1/FN.1", $GT1_3);
     $prenom = $this->queryTextNode("XPN.2", $GT1_3);
     if ($prenom == "") {
         $prenom = null;
     }
     $GT1_5 = $this->queryNode("GT1.5", $node);
     $adresse = $this->queryTextNode("XAD.1/SAD.1", $GT1_5);
     $ville = $this->queryTextNode("XAD.3", $GT1_5);
     $cp = $this->queryTextNode("XAD.5", $GT1_5);
     $GT1_6 = $this->queryNodes("GT1.6", $node);
     $tel = null;
     $ean = null;
     $ean_base = null;
     foreach ($GT1_6 as $_GT1_6) {
         if (!$tel) {
             $tel = $this->queryTextNode("XTN.12", $_GT1_6);
         }
         if (!$tel) {
             $tel = $this->queryTextNode("XTN.1", $_GT1_6);
         }
         $XTN_4 = $this->queryTextNode("XTN.4", $_GT1_6);
         // EAN base => Ean Dest
         if (preg_match('/^Ean Dest=(\\d+)$/', $XTN_4, $matches) === 1) {
             $ean_base = CMbArray::get($matches, 1);
         }
         // EAN => Code Ean
         if (preg_match('/^Code Ean=(\\d+)$/', $XTN_4, $matches) === 1) {
             $ean = CMbArray::get($matches, 1);
         }
     }
     $GT1_13 = $this->queryTextNode("GT1.13", $node);
     $GT1_14 = $this->queryTextNode("GT1.14", $node);
     $corres_patient = new CCorrespondantPatient();
     $where = array();
     $where["patient_id"] = " = '{$patient->_id}'";
     if ($nom) {
         $where["nom"] = " = '{$nom}'";
     }
     if ($prenom) {
         $where["prenom"] = " = '{$prenom}'";
     }
     $where["relation"] = " = 'assurance'";
     $now = CMbDT::date();
     $next = CMbDT::date("+ 1 DAY");
     $where["date_debut"] = " <= '{$now}' AND IFNULL(date_fin, '{$next}') >= '{$now}'";
     $corres_patient->loadObject($where);
     if (!$corres_patient->_id) {
         $corres_patient->patient_id = $patient->_id;
         $corres_patient->nom = $nom;
         $corres_patient->relation = "assurance";
     }
     $corres_patient->prenom = $prenom;
     $corres_patient->adresse = $adresse;
     $corres_patient->cp = $cp;
     $corres_patient->ville = $ville;
     $corres_patient->tel = $tel;
     $corres_patient->ean = $ean;
     $corres_patient->ean_base = $ean_base;
     if ($ean) {
         $where = array("patient_id" => "IS NULL", "relation" => "= 'assurance'", "ean" => "= '{$ean}'");
         $assurance = new CCorrespondantPatient();
         $assurance->loadObject($where);
         $corres_patient->type_pec = $assurance->type_pec;
     }
     if ($GT1_13) {
         $corres_patient->date_debut = CMbDT::date($GT1_13);
     }
     if ($GT1_14) {
         $corres_patient->date_fin = CMbDT::date($GT1_14);
     }
     $sender = $this->_ref_sender;
     // Notifier les autres destinataires autre que le sender
     $corres_patient->_eai_sender_guid = $sender->_guid;
     if ($msg = $corres_patient->store()) {
         $corres_patient->repair();
         $corres_patient->_eai_sender_guid = $sender->_guid;
         $corres_patient->store();
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:98,代码来源:CHL7v2RecordAdmit.class.php

示例8: getAssure

 /**
  * Récupération de l'assuré
  *
  * @param DOMNode  $node      Node
  * @param CPatient $mbPatient Patient
  *
  * @return CPatient
  */
 static function getAssure(DOMNode $node, CPatient $mbPatient)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $immatriculation = $xpath->queryTextNode("hprim:immatriculation", $node);
     $mbPatient->matricule = $immatriculation;
     $mbPatient->assure_matricule = $immatriculation;
     $personne = $xpath->queryUniqueNode("hprim:personne", $node);
     if (!$personne) {
         return $mbPatient;
     }
     $sexe = $xpath->queryAttributNode("hprim:personne", $node, "sexe");
     $sexeConversion = array("M" => "m", "F" => "f");
     $mbPatient->assure_sexe = $sexeConversion[$sexe];
     $mbPatient->assure_nom = $xpath->queryTextNode("hprim:nomUsuel", $personne);
     $prenoms = $xpath->getMultipleTextNodes("hprim:prenoms/*", $personne);
     $mbPatient->assure_prenom = CMbArray::get($prenoms, 0);
     $mbPatient->assure_prenom_2 = CMbArray::get($prenoms, 1);
     $mbPatient->assure_prenom_3 = CMbArray::get($prenoms, 2);
     $mbPatient->assure_naissance = $xpath->queryTextNode("hprim:naissance", $personne);
     $elementDateNaissance = $xpath->queryUniqueNode("hprim:dateNaissance", $personne);
     $mbPatient->assure_naissance = $xpath->queryTextNode("hprim:date", $elementDateNaissance);
     $mbPatient->rang_beneficiaire = $xpath->queryTextNode("hprim:lienAssure", $node);
     $mbPatient->qual_beneficiaire = CValue::read(CPatient::$rangToQualBenef, $mbPatient->rang_beneficiaire);
     return $mbPatient;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:33,代码来源:CHPrimXMLEvenementsPatients.class.php

示例9: storeNPA

 /**
  * Recording NPA
  *
  * @param String         $NPA    NPA
  * @param CSejour        $sejour Sejour
  * @param CInteropSender $sender Sender
  *
  * @return null|string
  */
 static function storeNPA($NPA, CSejour $sejour, CInteropSender $sender)
 {
     if (!$NPA) {
         return null;
     }
     // L'expéditeur gère les NPA
     $manage_npa = CMbArray::get($sender->_configs, "manage_npa");
     if (!$manage_npa) {
         return null;
     }
     //Récupération du tag pour les NPA
     $tag = CSejour::getTagNPA($sender->group_id);
     if (!$tag) {
         return null;
     }
     $idex_NPA = CIdSante400::getMatch("CSejour", $tag, null, $sejour->_id);
     $idex_NPA->object_id = $sejour->_id;
     $idex_NPA->last_update = CMbDT::dateTime();
     $idex_NPA->_eai_sender_guid = $sender->_guid;
     $idex_NPA->id400 = $NPA;
     return $idex_NPA->store();
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:CEAISejour.class.php

示例10: getPatientState

 /**
  * Get the patient state
  *
  * @param DOMNode  $node       Node
  * @param CPatient $newPatient Patient
  *
  * @return void
  */
 function getPatientState(DOMNode $node, CPatient $newPatient)
 {
     if ($states = $this->queryNodes("PID.32", $node)) {
         $list_state = array();
         foreach ($states as $_state) {
             $list_state[] = $this->queryTextNode(".", $_state);
         }
         $state = CMbArray::extract($list_state, 0);
         if (!$state) {
             return;
         }
         if ($state == "CACH") {
             $newPatient->vip = true;
             $status = CMbArray::get($list_state, 1);
             if ($status) {
                 $state = $status;
             }
         } else {
             if (in_array("CACH", $list_state)) {
                 $newPatient->vip = true;
             }
         }
         $newPatient->_status_no_guess = true;
         $newPatient->status = $state;
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:34,代码来源:CHL7v2RecordPerson.class.php

示例11: getFormHtmlElement

 /**
  * @see parent::getFormHtmlElement()
  */
 function getFormHtmlElement($object, $params, $value, $className)
 {
     $field = CMbString::htmlSpecialChars($this->fieldName);
     $locales = $this->_locales;
     $typeEnum = CMbArray::extract($params, "typeEnum", $this->typeEnum ? $this->typeEnum : "checkbox");
     $separator = CMbArray::extract($params, "separator", $this->vertical ? "<br />" : null);
     $cycle = CMbArray::extract($params, "cycle", 1);
     $alphabet = CMbArray::extract($params, "alphabet", false);
     $size = CMbArray::extract($params, "size", 0);
     $onchange = CMbArray::get($params, "onchange");
     $form = CMbArray::extract($params, "form");
     // needs to be extracted
     $readonly = CMbArray::extract($params, "readonly") == 1;
     $extra = CMbArray::makeXmlAttributes($params);
     $className = CMbString::htmlSpecialChars(trim("{$className} {$this->prop}"));
     if ($alphabet) {
         asort($locales);
     }
     $uid = uniqid();
     $value_array = $this->getListValues($value);
     switch ($typeEnum) {
         case "select":
             if ($readonly) {
                 $readonly = "readonly";
             }
             $sHtml = "<script type=\"text/javascript\">\n          Main.add(function(){\n            var select = \$\$('select[data-select_set={$uid}]')[0],\n                element = select.previous(),\n                tokenField = new TokenField(element, {" . ($onchange ? "onChange: function(){ {$onchange} }.bind(element)" : "") . "});\n\n            select.observe('change', function(event){\n              tokenField.setValues(\$A(select.options).filter(function(o){return o.selected}).pluck('value'));\n\n              element.fire('ui:change');\n            });\n          });\n        </script>";
             $sHtml .= "<input type=\"hidden\" name=\"{$field}\" value=\"{$value}\" class=\"{$className}\" {$extra} />\n";
             $sHtml .= "<select class=\"{$className}\" multiple=\"multiple\" size=\"{$size}\" data-select_set=\"{$uid}\" {$extra} {$readonly}>";
             foreach ($locales as $key => $item) {
                 if (!empty($value_array) && in_array($key, $value_array)) {
                     $selected = " selected=\"selected\"";
                 } else {
                     $selected = "";
                 }
                 $sHtml .= "\n<option value=\"{$key}\" {$selected}>{$item}</option>";
             }
             $sHtml .= "\n</select>";
             break;
         default:
         case "checkbox":
             $sHtml = "<span id=\"set-container-{$uid}\">\n";
             $sHtml .= "<input type=\"hidden\" name=\"{$field}\" value=\"{$value}\" class=\"{$className}\" {$extra} />\n";
             $sHtml .= "<script type=\"text/javascript\">\n          Main.add(function(){\n            var cont = \$('set-container-{$uid}'),\n                element = cont.down('input[type=hidden]'),\n                tokenField = new TokenField(element, {" . ($onchange ? "onChange: function(){ {$onchange} }.bind(element)" : "") . "});\n\n            cont.select('input[type=checkbox]').invoke('observe', 'click', function(event){\n              var elt = Event.element(event);\n              tokenField.toggle(elt.value, elt.checked);\n\n              element.fire('ui:change');\n            });\n          });\n        </script>";
             $compteur = 0;
             if ($readonly) {
                 $readonly = "disabled";
             }
             foreach ($locales as $key => $item) {
                 $selected = "";
                 if (!empty($value_array) && in_array($key, $value_array)) {
                     $selected = " checked=\"checked\"";
                 }
                 $sHtml .= "\n<label>\n              <input type=\"checkbox\" name=\"_{$field}_{$key}\" value=\"{$key}\" class=\"set-checkbox token{$uid}\" {$selected} {$readonly}  />\n              {$item}\n            </label> ";
                 $compteur++;
                 $modulo = $compteur % $cycle;
                 if ($separator != null && $modulo == 0 && $compteur < count($locales)) {
                     $sHtml .= $separator;
                 }
             }
             $sHtml .= "</span>\n";
     }
     return $sHtml;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:66,代码来源:CSetSpec.class.php

示例12: getPersonne

 /**
  * Return person
  *
  * @param DOMNode   $node       Node
  * @param CMbObject $mbPersonne Person
  *
  * @return CMbObject|CMediusers|CPatient
  */
 static function getPersonne(DOMNode $node, CMbObject $mbPersonne)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $civilite = $xpath->queryAttributNode("hprim:civiliteHprim", $node, "valeur");
     $civiliteHprimConversion = array("mme" => "mme", "mlle" => "mlle", "mr" => "m", "dr" => "dr", "pr" => "pr", "bb" => "enf", "enf" => "enf");
     $nom = $xpath->queryTextNode("hprim:nomUsuel", $node);
     $prenoms = $xpath->getMultipleTextNodes("hprim:prenoms/*", $node);
     $adresses = $xpath->queryUniqueNode("hprim:adresses", $node);
     $adresse = $xpath->queryUniqueNode("hprim:adresse", $adresses);
     $ligne = $xpath->getMultipleTextNodes("hprim:ligne", $adresse, true);
     $ville = $xpath->queryTextNode("hprim:ville", $adresse);
     $cp = $xpath->queryTextNode("hprim:codePostal", $adresse);
     if ($cp) {
         $cp = preg_replace("/[^0-9]/", "", $cp);
     }
     $telephones = $xpath->getMultipleTextNodes("hprim:telephones/*", $node);
     $email = $xpath->getFirstTextNode("hprim:emails/*", $node);
     if ($mbPersonne instanceof CPatient) {
         if ($civilite) {
             $mbPersonne->civilite = $civiliteHprimConversion[$civilite];
         } else {
             if ($mbPersonne->civilite == null) {
                 $mbPersonne->civilite = "guess";
             }
         }
         $mbPersonne->nom = $nom;
         $mbPersonne->nom_jeune_fille = $xpath->queryTextNode("hprim:nomNaissance", $node);
         $mbPersonne->prenom = CMbArray::get($prenoms, 0);
         $mbPersonne->prenom_2 = CMbArray::get($prenoms, 1);
         $mbPersonne->prenom_3 = CMbArray::get($prenoms, 2);
         $mbPersonne->adresse = $ligne;
         $mbPersonne->ville = $ville;
         $mbPersonne->pays_insee = $xpath->queryTextNode("hprim:pays", $adresse);
         $pays = new CPaysInsee();
         $pays->numerique = $mbPersonne->pays_insee;
         $pays->loadMatchingObject();
         $mbPersonne->pays = $pays->nom_fr;
         $mbPersonne->cp = $cp;
         $tel1 = $tel2 = null;
         if (isset($telephones[0])) {
             $tel1 = $telephones[0];
         }
         if (isset($telephones[1])) {
             $tel2 = $telephones[1];
         }
         $mbPersonne->tel = $tel1 != $mbPersonne->tel2 && strlen($tel1) <= 10 ? $tel1 : null;
         $mbPersonne->tel2 = $tel2 != $mbPersonne->tel && strlen($tel2) <= 10 ? $tel2 : null;
         if (strlen($tel1) > 10) {
             $mbPersonne->tel_autre = $tel1;
         }
         if (strlen($tel2) > 10) {
             $mbPersonne->tel_autre = $tel2;
         }
         $mbPersonne->email = $email;
     } elseif ($mbPersonne instanceof CMediusers) {
         $mbPersonne->_user_last_name = $nom;
         $mbPersonne->_user_first_name = CMbArray::get($prenoms, 0);
         $mbPersonne->_user_email = $email;
         $mbPersonne->_user_phone = CMbArray::get($telephones, 0);
         $mbPersonne->_user_adresse = $ligne;
         $mbPersonne->_user_cp = $cp;
         $mbPersonne->_user_ville = $ville;
     }
     return $mbPersonne;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:73,代码来源:CHPrimXMLEvenements.class.php

示例13: handleA44

 /**
  * Handle event A44 - move account information - patient account number
  *
  * @param CHL7Acknowledgment $ack        Acknowledgment
  * @param CPatient           $newPatient Person
  * @param array              $data       Datas
  *
  * @return string
  */
 function handleA44(CHL7Acknowledgment $ack, CPatient $newPatient, $data)
 {
     // Traitement du message des erreurs
     $comment = "";
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $sender = $exchange_hl7v2->_ref_sender;
     // Impossibilité dans Mediboard de modifier le patient d'un séjour
     if (CAppUI::conf("dPplanningOp CSejour patient_id") == 0) {
         return $exchange_hl7v2->setAckAR($ack, "E700", null, $newPatient);
     }
     // On considère que l'on a qu'un changement à faire
     if (count($data["merge"]) > 1) {
         return $exchange_hl7v2->setAckAR($ack, "E701", null, $newPatient);
     }
     $data = CMbArray::get($data["merge"], 0);
     $venue = new CSejour();
     $mbPatient = new CPatient();
     $mbPatientChange = new CPatient();
     $patientPI = CValue::read($data['personIdentifiers'], "PI");
     $patientRI = CValue::read($data['personIdentifiers'], "RI");
     $patientChangePI = CValue::read($data['personChangeIdentifiers'], "PI");
     $patientChangeRI = CValue::read($data['personChangeIdentifiers'], "RI");
     // Acquittement d'erreur : identifiants RI et PI non fournis
     if (!$patientRI && !$patientPI || !$patientChangeRI && !$patientChangePI) {
         return $exchange_hl7v2->setAckAR($ack, "E100", null, $newPatient);
     }
     $idexPatient = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
     if ($mbPatient->load($patientRI)) {
         if ($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, "E601", $comment, $newPatient);
         }
     }
     if (!$mbPatient->_id) {
         $mbPatient->load($idexPatient->object_id);
     }
     $idexPatientChange = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientChangePI);
     if ($mbPatientChange->load($patientChangeRI)) {
         if ($mbPatientChange->_id != $idexPatientChange->object_id) {
             $comment = "L'identifiant source fait référence au patient : {$idexPatientChange->object_id}";
             $comment .= "et l'identifiant cible au patient : {$mbPatientChange->_id}.";
             return $exchange_hl7v2->setAckAR($ack, "E602", $comment, $newPatient);
         }
     }
     if (!$mbPatientChange->_id) {
         $mbPatientChange->load($idexPatientChange->object_id);
     }
     if (!$mbPatient->_id || !$mbPatientChange->_id) {
         $comment = !$mbPatient->_id ? "Le patient {$mbPatient->_id} est inconnu dans Mediboard." : "Le patient {$mbPatientChange->_id} est inconnu dans Mediboard.";
         return $exchange_hl7v2->setAckAR($ack, "E603", $comment, $newPatient);
     }
     $venueAN = $this->getVenueAN($sender, $data);
     $NDA = CIdSante400::getMatch("CSejour", $sender->_tag_sejour, $venueAN);
     if (!$venueAN && !$NDA->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E604", $comment, $mbPatient);
     }
     $venue->load($NDA->object_id);
     // 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, "E605", null, $venue);
     }
     if ($venue->patient_id != $mbPatientChange->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E606", null, $venue);
     }
     $venue->patient_id = $mbPatient->_id;
     if ($msg = $venue->store()) {
         return $exchange_hl7v2->setAckAR($ack, "E607", $msg, $venue);
     }
     $comment = CEAISejour::getComment($venue);
     return $exchange_hl7v2->setAckAA($ack, "I600", $comment, $venue);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:81,代码来源:CHL7v2MoveAccountInformation.class.php

示例14: storePatient

 /**
  * store the patient
  *
  * @param String[] $identifier identifier
  * @param CPatient $patient    patient
  * @param DOMNode  $node       node
  *
  * @return null|CHPrimSanteError
  */
 function storePatient($identifier, $patient, $node)
 {
     $sender = $this->_ref_sender;
     if ($identifier["merge"] === "FU") {
         return $this->mergePatient($identifier, $sender->_tag_patient, $patient);
     }
     //@todo voir pour nouveau né
     /**
      * H2.3C: Si le patient est un nouveau né, les champs 8.3 et 8.5 peuvent contenir les numéros permanent et
      * dossier administratif de la mère. Dans ce cas, afin de distinguer (en plus des nom et prénom) le nouveau né de sa mère,
      * et pour permettre une meilleure gestion des admissions, il faut renseigner le sous-champ 8.5.2, dans les contextes ADM et ORM.
      */
     $person = $this->getNamePerson($node);
     $patient->nom_jeune_fille = $person["family_name"];
     $patient->nom = $person["name"];
     $patient->prenom = $person["firstname"];
     $patient->prenom_2 = $person["secondname"];
     $patient->civilite = CMbString::lower($person["civilite"]);
     $patient->naissance = $this->getBirthdate($node);
     $patient->sexe = CMbString::lower($this->getSexPerson($node));
     $address = $this->getAddress($node);
     $address["street"] .= $address["comp"] ? "\n{$address["comp"]}" : null;
     $patient->adresse = $address["street"];
     $patient->ville = $address["city"];
     $patient->pays = $address["country"];
     $patient->cp = $address["postal"];
     $phone = $this->getPhone($node);
     $patient->tel = CMbArray::get($phone, 0);
     $patient->tel2 = CMbArray::get($phone, 1);
     $patient->situation_famille = $this->getMaritalStatus($node);
     $patient->deces = $this->getDeathDate($node);
     $patient->repair();
     if ($msg = $patient->store()) {
         return new CHPrimSanteError($this->_ref_exchange_hpr, "P", "08", array("P", $this->loop, $this->identifier_patient), "8.3", $msg);
     }
     /*$ins = $this->getINS($node);
     
         foreach ($ins as $_ins) {
           $ins_patient           = new CINSPatient();
           $ins_patient->ins      = $_ins["ins"];
           $ins_patient->type     = substr($_ins["type"], -1);
           $ins_patient->date     = $_ins["date"];
           $ins_patient->provider = $sender->nom;
     
           if ($msg = $ins_patient->store()) {
             return new CHPrimSanteError($this->_ref_exchange_hpr, "P", "11", array("P", $this->loop, $this->identifier_patient), "8.12", $msg);
           }
         }*/
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:59,代码来源:CHPrimSanteRecordADM.class.php

示例15: toXML

 /**
  * Transforme la classe en document XML
  *
  * @param null $nameParent String
  * @param null $namespace  String
  *
  * @return CCDADomDocument
  */
 function toXML($nameParent = null, $namespace = null)
 {
     $dom = new CCDADomDocument();
     //on affecte le nom de la classe comme noeud racine
     $name = $this->getNameClass();
     /**
      * Si le nom parent est spécifié, on utilisera ce nom pour le noeud racine
      */
     if (!empty($nameParent)) {
         $name = $nameParent;
     }
     //on créé le nom racine
     $baseXML = $dom->addElement($dom, $name, null, $namespace);
     //on récupère les specifications définie dans les props
     $spec = $this->getSpecs();
     //On parcours les specs
     foreach ($spec as $key => $value) {
         //on récupère une instance d'une classe stocké dans la variable
         /** @var CCDA_Datatype $classInstance */
         $classInstance = $this->{$key};
         //on effectue différente action selon ce qui est définir dans la prop XML
         switch ($value["xml"]) {
             case "attribute":
                 //On vérifie la présence d'une instance
                 if (empty($classInstance)) {
                     continue;
                 }
                 if ($key === "identifier") {
                     $key = "ID";
                 }
                 //On créé l'attribut
                 $dom->addAttribute($baseXML, $key, $classInstance->getData());
                 break;
             case "data":
                 //on insert la donnée avant tous les éléments
                 $dom->insertTextFirst($baseXML, $this->getData());
                 break;
             case "element":
                 //on vérifie l'existence d'une instance
                 if (empty($classInstance)) {
                     continue;
                 }
                 //on vérifie si l'instance est un tableau
                 if (is_array($classInstance)) {
                     //on parcours les différentes instance
                     /** @var CCDA_Datatype[] $classInstance */
                     foreach ($classInstance as $_class) {
                         //on récupère le code xml de l'instance en spécifiant le nom du noeud racine
                         $xmlClass = $_class->toXML($key, $namespace);
                         //on ajoute à notre document notre instance
                         $dom->importDOMDocument($baseXML, $xmlClass);
                     }
                 } else {
                     //on récupère le code xml de l'instance en spécifiant le nom du noeud racine
                     $xmlClass = $classInstance->toXML($key, $namespace);
                     //on ajoute à notre document notre instance
                     $dom->importDOMDocument($baseXML, $xmlClass);
                 }
                 break;
         }
         //si la propriété abstract est spécifié
         if (CMbArray::get($value, "abstract")) {
             //on vérifie l'existence d'une instance
             if (empty($classInstance)) {
                 continue;
             }
             //on cherche le noeud XML dans notre document
             $xpath = new CMbXPath($dom);
             if (!empty($namespace)) {
                 $xpath->registerNamespace("cda", $namespace);
                 $nodeKey = $xpath->queryUniqueNode("//cda:" . $key);
             } else {
                 $nodeKey = $xpath->queryUniqueNode("//" . $key);
             }
             if (is_array($classInstance)) {
                 foreach ($classInstance as $_class) {
                     /**
                      * on spécifie le type de l'élément (on cast)
                      */
                     $dom->castElement($nodeKey, $_class->getNameClass());
                 }
             } else {
                 /**
                  * on spécifie le type de l'élément (on cast)
                  */
                 $dom->castElement($nodeKey, $classInstance->getNameClass());
             }
         }
     }
     return $dom;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:99,代码来源:CCDAClasseBase.class.php


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