예제 #1
0
                                }
                                if (!isset($postes_by_date[$_date][$_hour])) {
                                    continue;
                                }
                                $key = $postes_by_date[$_date][$_hour];
                                @($line->_administrations_moment[$_key][$key["day"]][$key["moment"]]['quantite'] += $_administrations_by_hour['quantite']);
                                @($line->_administrations_moment[$_key][$key["day"]][$key["moment"]]['quantite_planifiee'] += $_administrations_by_hour['quantite_planifiee']);
                            }
                        }
                    }
                }
            }
        }
    }
    if ($mode_lite) {
        CPrescription::massLoadLastAdministration($prescription);
    }
}
// Dédoublonne les initiales
foreach ($initiales as $prescription_id => $_initiales) {
    foreach ($_initiales as $_date => $_initiales_by_date) {
        foreach ($_initiales_by_date as $_hour => $_initiales_by_hour) {
            $initiales[$prescription_id][$_date][$_hour] = array_unique($_initiales_by_hour);
        }
    }
}
$current_moment = isset($postes_by_date[$now_date]) && isset($postes_by_date[$now_date][CMbDT::transform(null, CMbDT::time(), "%H")]) ? $postes_by_date[$now_date][CMbDT::transform(null, CMbDT::time(), "%H")]["moment"] : "";
// Chargement des cis à risque
$where = array();
$where["risque"] = " = '1'";
$risques_cis = CProduitLivretTherapeutique::getCISList($where);