$patientMatch->patient_id = $patient_id; if (CAppUI::conf('dPpatients CPatient function_distinct')) { $function_id = CMediusers::get()->function_id; $patientMatch->function_id = $function_id; } $patientMatch->nom = $nom; $patientMatch->nom_jeune_fille = $nom_jeune_fille; $patientMatch->prenom = $prenom; $patientMatch->prenom_2 = $prenom_2; $patientMatch->prenom_3 = $prenom_3; $patientMatch->prenom_4 = $prenom_4; $patientMatch->naissance = $naissance; $doubloon = implode("|", $patientMatch->getDoubloonIds()); $siblings = null; if (!$doubloon) { $siblings = $patientMatch->getSiblings(); } //Test pour l'ouverture de la modal if ($json_result) { $result = false; if (!$similar || $siblings || $doubloon && $old_patient->status != "DPOT") { $result = true; } CApp::json($result); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("similar", $similar); $smarty->assign("old_patient", $old_patient); $smarty->assign("doubloon", $doubloon); $smarty->assign("siblings", $siblings);