/** * @see parent::updateFormFields() */ function updateFormFields() { parent::updateFormFields(); // Noms $anonyme = is_numeric($this->nom); $this->nom = self::applyModeIdentitoVigilance($this->nom, false, null, $anonyme); $this->nom_jeune_fille = self::applyModeIdentitoVigilance($this->nom_jeune_fille, false, null, $anonyme); $this->prenom = self::applyModeIdentitoVigilance($this->prenom, true, null, $anonyme); $this->_nom_naissance = $this->nom_jeune_fille ? $this->nom_jeune_fille : $this->nom; $this->_prenoms = array($this->prenom, $this->prenom_2, $this->prenom_3, $this->prenom_4); if ($this->libelle_exo) { $this->_art115 = preg_match("/pension militaire/i", $this->libelle_exo); } $relative = CMbDate::relative($this->naissance); if ($this->deces) { $relative = CMbDate::relative($this->naissance, $this->deces); } if ($relative["count"] < 0) { $relative["count"] = 0; } $this->evalAge(); $str = $relative["unit"] . ($relative["count"] > 1 ? "s" : "") . ($relative["unit"] == "year" ? "_old" : ""); $this->_age = $relative["count"] . " " . CAppUI::tr($str); $this->checkVIP(); $this->_civilite = CAppUI::tr("CPatient.civilite.{$this->civilite}"); if ($this->civilite === "enf") { $this->_civilite_long = CAppUI::tr("CPatient.civilite." . ($this->sexe === "m" ? "le_jeune" : "la_jeune")); } else { $this->_civilite_long = CAppUI::tr("CPatient.civilite.{$this->civilite}-long"); } $this->_assure_civilite = CAppUI::tr("CPatient.civilite.{$this->assure_civilite}"); if ($this->assure_civilite === "enf") { $this->_assure_civilite_long = CAppUI::tr("CPatient.civilite." . ($this->assure_sexe === "m" ? "le_jeune" : "la_jeune")); } else { $this->_assure_civilite_long = CAppUI::tr("CPatient.civilite.{$this->assure_civilite}-long"); } $nom_naissance = $this->nom_jeune_fille && $this->nom_jeune_fille != $this->nom ? " ({$this->nom_jeune_fille})" : ""; $this->_view = "{$this->_civilite} {$this->nom}{$nom_naissance} {$this->prenom}"; $this->_longview = "{$this->_civilite_long} {$this->nom}{$nom_naissance} {$this->prenom}"; if (CAppUI::conf("dPpatients CPatient manage_identity_status", CGroups::loadCurrent())) { $this->_view .= $this->status ? " [{$this->status}.]" : ""; $this->_longview .= $this->status ? " [{$this->status}.]" : ""; } $this->_view .= $this->vip ? " [Conf.]" : ""; $this->_view .= $this->deces ? " [Décès.]" : ""; $this->_longview .= $this->vip ? " [Conf.]" : ""; $this->_longview .= $this->deces ? " [Décès.]" : ""; // Navigation fields //$this->_dossier_cabinet_url = self::$dossier_cabinet_prefix[CAppUI::pref("DossierCabinet")] . $this->_id; $this->_dossier_cabinet_url = self::$dossier_cabinet_prefix["dPpatients"] . $this->_id; if ($this->pays_insee) { $this->pays = CPaysInsee::getNomFR($this->pays_insee); } if ($this->csp) { $this->_csp_view = $this->getCSPName(); } $this->mapPerson(); }