/** * Get ROL segment * * @param DOMNode $node Node * @param CPatient $newPatient Person * * @return void */ function getROL(DOMNode $node, CPatient $newPatient) { $sender = $this->_ref_sender; $ROL_4 = $this->queryNodes("ROL.4", $node)->item(0); switch ($this->queryTextNode("ROL.3/CE.1", $node)) { // Médecin traitant case "ODRP": $newPatient->medecin_traitant = $this->getMedecin($ROL_4); break; case "RT": $correspondant = new CCorrespondant(); $correspondant->patient_id = $newPatient->_id; $correspondant->medecin_id = $this->getMedecin($ROL_4); if (!$correspondant->loadMatchingObjectEsc()) { // Notifier les autres destinataires autre que le sender $correspondant->_eai_sender_guid = $sender->_guid; $correspondant->store(); } break; default: } }