예제 #1
0
 public function testKsortByArray()
 {
     $array = array("key1" => "val1", "key2" => "val2", "key3" => "val3");
     $order = array("key3", "key1", "key2");
     $res = array("key3" => "val3", "key1" => "val1", "key2" => "val2");
     $this->assertEquals($res, $this->stub->ksortByArray($array, $order));
 }
    if ($_prescription->_ref_lines_elt_for_plan) {
        foreach ($_prescription->_ref_lines_elt_for_plan as $_elements_by_chap) {
            foreach ($_elements_by_chap as $elements_cat) {
                foreach ($elements_cat as $_element) {
                    $nb_lines_element += count($_element);
                }
            }
        }
    }
    $bed = $_prescription->_ref_object->_ref_curr_affectation->_ref_lit;
    $bedroom_name = $bed->_ref_chambre->nom . $bed->nom . $_prescription->_ref_object->_ref_curr_affectation->_id;
    $prescriptions_order[$bedroom_name] = $key;
}
// Tri par numéro de chambre
ksort($prescriptions_order);
$prescriptions = CMbArray::ksortByArray($prescriptions, $prescriptions_order);
// Chargement des categories pour chaque chapitre
$categories = CCategoryPrescription::loadCategoriesByChap();
$smarty = new CSmartyDP();
$smarty->assign("lines", $lines);
$smarty->assign("patients", $patients);
$smarty->assign("tabHours", $tabHours);
$smarty->assign("prescriptions", $prescriptions);
$smarty->assign("categories", $categories);
$smarty->assign("tabHours", $tabHours);
$smarty->assign("composition_dossier", $composition_dossier);
$smarty->assign("bornes_composition_dossier", $bornes_composition_dossier);
$smarty->assign("count_composition_dossier", $count_composition_dossier);
$smarty->assign("operations", array());
$smarty->assign("nb_decalage", $nb_decalage);
$smarty->assign("mode_dossier", $mode_dossier);