<?php /** * $Id$ * * @category CDA * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ $list_person = CValue::get("listPerson"); $list_person = json_decode(stripslashes($list_person)); foreach ($list_person as $_person) { $birthDate = $_person->date; $firstName = CINSPatient::formatString($_person->prenom); if (!$_person->nirCertifie) { $_person->insc = "Impossible de calculer"; continue; } list($nir, $nirKey) = explode(" ", $_person->nirCertifie); $_person->insc = CINSPatient::calculInsc($nir, $nirKey, $firstName, $birthDate); } $smarty = new CSmartyDP(); $smarty->assign("list_person", $list_person); $smarty->display("ins/inc_test_insc_manuel.tpl");
<?php /** * $Id$ * * @category CDA * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ $csv = new CCSVFile("modules/dPpatients/resources/insc/Echantillon_de_test_INSC.csv", CCSVFile::PROFILE_EXCEL); $csv->jumpLine(2); $resultat = array("correct" => 0, "incorrect" => 0, "total" => 0); while ($line = $csv->readLine()) { list($firstName, $birthDate, $nir, $nirKey, $insc_csv, $insc_csv_Key, ) = $line; $firstName = CINSPatient::formatString($firstName); $insc = CINSPatient::calculInsc($nir, $nirKey, $firstName, $birthDate); if ($insc === $insc_csv . $insc_csv_Key) { $resultat["correct"]++; } else { $resultat["incorrect"]++; } $resultat["total"]++; } $smarty = new CSmartyDP(); $smarty->assign("result", $resultat); $smarty->display("ins/inc_test_insc_auto.tpl");