Ejemplo n.º 1
0
 */
CCanDo::checkEdit();
$patient_id = CValue::getOrSession("patient_id");
$name = CValue::get("name");
$firstName = CValue::get("firstName");
$naissance_day = CValue::get("naissance_day");
$naissance_month = CValue::get("naissance_month");
$naissance_year = CValue::get("naissance_year");
$useVitale = CValue::get("useVitale");
$covercard = CValue::get("covercard");
$callback = CValue::get("callback");
$modal = CValue::get("modal", 0);
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefPhotoIdentite();
$patient->countDocItems();
$patient->loadRefsCorrespondantsPatient();
$patient->countINS();
// Chargement de l'ipp
$patient->loadIPP();
if (CModule::getActive("fse")) {
    $cv = CFseFactory::createCV();
    if ($cv) {
        $cv->loadIdVitale($patient);
    }
}
if (!$modal) {
    // Save history
    $params = array("patient_id" => $patient_id, "name" => $name, "firstName" => $firstName, "naissance_day" => $naissance_day, "naissance_month" => $naissance_month, "naissance_year" => $naissance_year);
    CViewHistory::save($patient, $patient_id ? CViewHistory::TYPE_EDIT : CViewHistory::TYPE_NEW, $params);
}