/** * $Id$ * * @package Mediboard * @subpackage Patients * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $today = date("d/m/Y"); $patient_id = CValue::get("patient_id"); // Création du patient $patient = new CPatient(); $patient->load($patient_id); $patient->updateNomPaysInsee(); $patient->loadRefsSejours(); foreach ($patient->_ref_sejours as $sejour) { $sejour->loadRefPraticien(); $sejour->loadRefsOperations(); $sejour->loadNDA(); foreach ($sejour->_ref_operations as $operation) { $operation->loadRefPlageOp(); $operation->loadRefChir(); } } $patient->loadRefsConsultations(); foreach ($patient->_ref_consultations as $consultation) { $consultation->loadRefPlageConsult(); } $patient->loadRefsCorrespondants();
/** * Add birthplace * * @param DOMNode $elParent Parent element * @param CPatient $patient Patient * * @return void */ function addBirthPlace(DOMNode $elParent, CPatient $patient) { if (!$patient->cp_naissance && !$patient->_pays_naissance_insee && !$patient->lieu_naissance) { return; } $dom = $this->dom; $birthplace = $dom->addElement($elParent, "birthPlace"); $dom->addAttribute($birthplace, "classCode", "BIRTHPL"); $patient->updateNomPaysInsee(); $addr = $dom->addElement($birthplace, "addr"); $dom->addElement($addr, "postalCode", $patient->cp_naissance); $dom->addElement($addr, "city", $patient->lieu_naissance); $dom->addElement($addr, "country", $patient->_pays_naissance_insee); }