/** * @see parent::store() */ function store() { $this->completeField("patient_link_id"); if ($this->_id && $this->_id == $this->patient_link_id) { $this->patient_link_id = ""; } // Création d'un patient en mode cabinets distincts if (CAppUI::conf('dPpatients CPatient function_distinct') && !$this->_id) { $this->function_id = CMediusers::get()->function_id; } if ($this->fieldModified("naissance") || $this->fieldModified("sexe")) { // _guid is not valued yet !! DSHM::remKeys("alertes-*-CPatient-" . $this->_id); } // Si changement de sexe on essaie de retrouver la civilité if ($this->fieldModified("sexe") && !$this->fieldModified("civilite")) { $this->civilite = "guess"; } $this->_anonyme = $this->checkAnonymous(); if ($state = CPatientState::getState($this)) { $this->status = $state; } // Standard store if ($msg = parent::store()) { return $msg; } if ($this->_anonyme) { $this->nom = $this->_id; $this->store(); } CPatientState::storeState($this); // Vitale if (CModule::getActive("fse")) { $cv = CFseFactory::createCV(); if ($cv) { if ($msg = $cv->bindVitale($this)) { return $msg; } } } // Génération de l'IPP ? if ($this->_generate_IPP) { if ($msg = $this->generateIPP()) { return $msg; } } if ($this->_vitale_nir_certifie) { if ($msg = CINSPatient::createINSC($this)) { return $msg; } } return null; }
/** * @see parent::store() */ function store() { // Création d'un correspondant en mode cabinets distincts if (CAppUI::conf('dPpatients CPatient function_distinct') && !$this->_id) { $this->function_id = CMediusers::get()->function_id; } // sexe undefined if ($this->sexe == "u") { $this->guessSex(); } return parent::store(); }
/** * @see parent::store() */ function store() { if (!$this->_id && !$this->date_fin && !$this->date_debut) { $this->date_debut = CMbDT::date(); } // sexe undefined if ($this->sex == "u" && $this->prenom) { $this->guessSex(); } // Création d'un correspondant en mode cabinets distincts if (CAppUI::conf('dPpatients CPatient function_distinct') && !$this->_id) { $this->function_id = CMediusers::get()->function_id; } if ($this->_duplicate) { $this->nom .= " (Copy)"; $this->_id = null; $this->date_debut = CMbDT::date(); $this->date_fin = ""; $this->_duplicate = null; } return parent::store(); }
/** * @see parent::store() */ function store() { $this->updateSpecs(); if (!$this->_id) { $this->user_password_last_change = CMbDT::dateTime(); } if ($msg = $this->purgeConnections()) { return $msg; } return parent::store(); }