/**
  * Get contents XML
  *
  * @return array
  */
 function getContentsXML()
 {
     $data = array();
     $xpath = new CHPrimXPath($this);
     $evenementsServeurEtatsPatient = $xpath->queryUniqueNode("/hprim:evenementsServeurEtatsPatient");
     $data['patient'] = $xpath->queryUniqueNode("hprim:patient", $evenementsServeurEtatsPatient);
     $data['idSourcePatient'] = $this->getIdSource($data['patient']);
     $data['idCiblePatient'] = $this->getIdCible($data['patient']);
     $data['venue'] = $xpath->queryUniqueNode("hprim:venue", $evenementsServeurEtatsPatient);
     $data['idSourceVenue'] = $this->getIdSource($data['venue']);
     $data['idCibleVenue'] = $this->getIdCible($data['venue']);
     return $data;
 }
 /**
  * @see parent::getContentsXML()
  */
 function getContentsXML()
 {
     $xpath = new CHPrimXPath($this);
     $query = "/hprim:evenementsPatients/hprim:evenementPatient";
     $evenementPatient = $xpath->queryUniqueNode($query);
     $enregistrementPatient = $xpath->queryUniqueNode("hprim:enregistrementPatient", $evenementPatient);
     $data['action'] = $this->getActionEvenement("hprim:enregistrementPatient", $evenementPatient);
     $data['patient'] = $xpath->queryUniqueNode("hprim:patient", $enregistrementPatient);
     $data['idSourcePatient'] = $this->getIdSource($data['patient']);
     $data['idCiblePatient'] = $this->getIdCible($data['patient']);
     $data["numeroSante"] = $xpath->queryUniqueNode("hprim:numeroIdentifiantSante", $enregistrementPatient);
     return $data;
 }
 /**
  * @see parent::getContentsXML()
  */
 function getContentsXML()
 {
     $xpath = new CHPrimXPath($this);
     $query = "/hprim:evenementsPatients/hprim:evenementPatient";
     $evenementPatient = $xpath->queryUniqueNode($query);
     $venuePatient = $xpath->queryUniqueNode("hprim:venuePatient", $evenementPatient);
     $data['action'] = $this->getActionEvenement("hprim:venuePatient", $evenementPatient);
     $data['patient'] = $xpath->queryUniqueNode("hprim:patient", $venuePatient);
     $data['venue'] = $xpath->queryUniqueNode("hprim:venue", $venuePatient);
     $data['idSourcePatient'] = $this->getIdSource($data['patient']);
     $data['idCiblePatient'] = $this->getIdCible($data['patient']);
     $data['idSourceVenue'] = $this->getIdSource($data['venue']);
     $data['idCibleVenue'] = $this->getIdCible($data['venue']);
     return $data;
 }
 /**
  * Get contents XML
  *
  * @return array
  */
 function getContentsXML()
 {
     $data = array();
     $xpath = new CHPrimXPath($this);
     $evenementsServeurActes = $xpath->queryUniqueNode("/hprim:evenementsServeurActes");
     $evenementServeurIntervention = $xpath->queryUniqueNode("/hprim:evenementsServeurActes/hprim:evenementServeurIntervention");
     $data['action'] = $this->getActionEvenement("hprim:evenementServeurIntervention ", $evenementsServeurActes);
     $data['patient'] = $xpath->queryUniqueNode("hprim:patient", $evenementServeurIntervention);
     $data['idSourcePatient'] = $this->getIdSource($data['patient']);
     $data['idCiblePatient'] = $this->getIdCible($data['patient']);
     $data['venue'] = $xpath->queryUniqueNode("hprim:venue", $evenementServeurIntervention);
     $data['idSourceVenue'] = $this->getIdSource($data['venue']);
     $data['idCibleVenue'] = $this->getIdCible($data['venue']);
     $data['intervention'] = $xpath->queryUniqueNode("hprim:intervention", $evenementServeurIntervention);
     $data['idSourceIntervention'] = $this->getIdSource($data['intervention'], false);
     $data['idCibleIntervention'] = $this->getIdCible($data['intervention'], false);
     return $data;
 }
 /**
  * Get content XML
  *
  * @return array
  */
 function getContentsXML()
 {
     $xpath = new CHPrimXPath($this);
     $query = "/hprim:evenementsPatients/hprim:evenementPatient";
     $evenementPatient = $xpath->queryUniqueNode($query);
     $mouvementPatient = $xpath->queryUniqueNode("hprim:mouvementPatient", $evenementPatient);
     $data['action'] = $this->getActionEvenement("hprim:mouvementPatient", $evenementPatient);
     $data['patient'] = $xpath->queryUniqueNode("hprim:patient", $mouvementPatient);
     $data['idSourcePatient'] = $this->getIdSource($data['patient']);
     $data['idCiblePatient'] = $this->getIdCible($data['patient']);
     $data['venue'] = $xpath->queryUniqueNode("hprim:venue", $mouvementPatient);
     $data['idSourceVenue'] = $this->getIdSource($data['venue']);
     $data['idCibleVenue'] = $this->getIdCible($data['venue']);
     $data['priseEnCharge'] = $xpath->queryUniqueNode("hprim:priseEnCharge", $mouvementPatient);
     $data['mouvements'] = $xpath->queryUniqueNode("hprim:mouvements", $mouvementPatient);
     $data['voletMedical'] = $xpath->queryUniqueNode("hprim:voletMedical", $mouvementPatient);
     $data['dossierResume'] = $xpath->queryUniqueNode("hprim:dossierResume", $mouvementPatient);
     return $data;
 }
 /**
  * Get content XML
  *
  * @return array
  */
 function getContentsXML()
 {
     $data = array();
     $xpath = new CHPrimXPath($this);
     $evenementServeurActe = $xpath->queryUniqueNode("/hprim:evenementsServeurActes/hprim:evenementServeurActe");
     $data['patient'] = $xpath->queryUniqueNode("hprim:patient", $evenementServeurActe);
     //@todo ajouter une configuration pour intervertir le source et le cible
     $data['idSourcePatient'] = $this->getIdCible($data['patient']);
     $data['idCiblePatient'] = $this->getIdSource($data['patient']);
     $data['venue'] = $xpath->queryUniqueNode("hprim:venue", $evenementServeurActe);
     //@todo ajouter une configuration pour intervertir le source et le cible
     $data['idSourceVenue'] = $this->getIdCible($data['venue']);
     $data['idCibleVenue'] = $this->getIdSource($data['venue']);
     $data['intervention'] = $xpath->queryUniqueNode("hprim:intervention", $evenementServeurActe);
     $data['idSourceIntervention'] = $this->getIdSource($data['intervention'], false);
     $data['idCibleIntervention'] = $this->getIdCible($data['intervention'], false);
     $data['actesCCAM'] = $xpath->queryUniqueNode("hprim:actesCCAM", $evenementServeurActe);
     $data['actesNGAP'] = $xpath->queryUniqueNode("hprim:actesNGAP", $evenementServeurActe);
     return $data;
 }
 /**
  * Récupération des éléments Reponses de l'acquittement
  *
  * @return array
  */
 function getAcquittementReponsesServeurActivitePmsi()
 {
     $xpath = new CHPrimXPath($this);
     $statut = $xpath->queryAttributNode("/hprim:a{$this->acquittement}/hprim:enteteMessage", null, "statut");
     $query = "/hprim:{$this->evenement}/hprim:enteteMessageAcquittement";
     $enteteMessageAcquittement = $xpath->queryUniqueNode($query);
     $observations = array();
     if ($statut == "ok") {
         $d = array();
         $observations[] =& $d;
         $observation = $xpath->queryUniqueNode("hprim:observation", $enteteMessageAcquittement);
         $d['code'] = chunk_split($xpath->queryTextNode("hprim:code", $observation, "", false), 4, ' ');
         $d['libelle'] = $xpath->queryTextNode("hprim:libelle", $observation, "", false);
         $d['commentaire'] = $xpath->queryTextNode("hprim:commentaire", $observation, "", false);
     } else {
         $query = "/hprim:{$this->evenements}/hprim:reponses/*";
         $reponses = $xpath->query($query);
         foreach ($reponses as $_reponse) {
             $d = array();
             $observation = $xpath->queryUniqueNode("hprim:observations/hprim:observation", $_reponse);
             $d['code'] = chunk_split($xpath->queryTextNode("hprim:code", $observation, "", false), 4, ' ');
             $d['libelle'] = $xpath->queryTextNode("hprim:libelle", $observation, "", false);
             $d['commentaire'] = $xpath->queryTextNode("hprim:commentaire", $observation, "", false);
             $observations[] = $d;
         }
     }
     return $observations;
 }
 /**
  * Sauvegarde des INSC
  *
  * @param CPatient $patient Patient
  * @param DOMNode  $node    Elément NumeroIdentifiantSante
  *
  * @return void
  */
 function storeINSC(CPatient $patient, DOMNode $node)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $list_insc = $xpath->query("insC", $node);
     $insc = new CINSPatient();
     $insc->type = "C";
     $insc->patient_id = $patient->_id;
     foreach ($list_insc as $_insc) {
         $ins = $xpath->queryTextNode("valeur", $_insc);
         $date = $xpath->queryTextNode("dateEffet", $_insc);
         if (!$ins) {
             continue;
         }
         $insc->ins_patient_id = null;
         $insc->date = null;
         $insc->provider = null;
         $insc->ins = $ins;
         $insc->loadMatchingObject();
         if ($insc->date < $date) {
             $insc->date = $date;
             $insc->provider = $this->_ref_sender->nom;
         }
         $insc->store();
     }
 }
 /**
  * Récupération des observations de l'acquittement patient
  *
  * @return array
  */
 function getAcquittementObservationPatients()
 {
     $xpath = new CHPrimXPath($this);
     $statut = $xpath->queryAttributNode("/hprim:acquittementsPatients/hprim:enteteMessageAcquittement", null, "statut");
     $query = "/hprim:acquittementsPatients/hprim:enteteMessageAcquittement";
     $enteteMessageAcquittement = $xpath->queryUniqueNode($query);
     $observations = array();
     if ($statut == "OK") {
         $d = array();
         $observations[] =& $d;
         $observation = $xpath->queryUniqueNode("hprim:observation", $enteteMessageAcquittement);
         $d['code'] = chunk_split($xpath->queryTextNode("hprim:code", $observation, "", false), 4, ' ');
         $d['libelle'] = $xpath->queryTextNode("hprim:libelle", $observation, "", false);
         $d['commentaire'] = $xpath->queryTextNode("hprim:commentaire", $observation, "", false);
     } else {
         $query = "/hprim:acquittementsPatients/hprim:erreursAvertissements/*";
         $erreursAvertissements = $xpath->query($query);
         foreach ($erreursAvertissements as $erreurAvertissement) {
             $d = array();
             $observation = $xpath->queryUniqueNode("hprim:observations/hprim:observation", $erreurAvertissement);
             $d['code'] = chunk_split($xpath->queryTextNode("hprim:code", $observation, "", false), 4, ' ');
             $d['libelle'] = $xpath->queryTextNode("hprim:libelle", $observation, "", false);
             $d['commentaire'] = $xpath->queryTextNode("hprim:commentaire", $observation, "", false);
             $observations[] = $d;
         }
     }
     return $observations;
 }
 /**
  * Mapp the montant node
  *
  * @param DOMNode $node Node
  *
  * @return array
  */
 function getMontant($node)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $data = array();
     $montant = $xpath->queryUniqueNode("hprim:montant", $node);
     $data["montantTotal"] = $xpath->queryTextNode("montantTotal", $montant);
     $data["numeroForfaitTechnique"] = $xpath->queryTextNode("numeroForfaitTechnique", $montant);
     $data["numeroAgrementAppareil"] = $xpath->queryTextNode("numeroAgrementAppareil", $montant);
     $data["montantDepassement"] = $xpath->queryTextNode("montantDepassement", $montant);
     return $data;
 }
Exemplo n.º 11
0
 /**
  * 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;
 }
Exemplo n.º 12
0
 function getTypeEvenementPatient()
 {
     $xpath = new CHPrimXPath($this);
     $evenementPatient = $xpath->query("/hprim:evenementsPatients/hprim:evenementPatient/*");
     $type = null;
     $evenements = CHPrimXMLEventPatient::$evenements;
     foreach ($evenementPatient as $_evenementPatient) {
         if (array_key_exists($_evenementPatient->tagName, $evenements)) {
             $type = $_evenementPatient->tagName;
         }
     }
     return $type;
 }