Пример #1
0
    }
}
$initiales = array();
/** @var $_sejour CSejour */
foreach ($sejours as $_sejour) {
    $prescription = $_sejour->loadRefPrescriptionSejour();
    $prescription->loadRefsLinesMedByCat("1", "1", "", "0", "1");
    $prescription->loadRefsLinesElementByCat("1", "1", "", "", "", "", "0", "1");
    $prescription->loadRefsPrescriptionLineMixes("", "0", "1", "", "0", "1");
    $prescription->loadRefsLinesInscriptions();
    CStoredObject::massLoadBackRefs($prescription->_ref_prescription_lines, "prise_posologie", "moment_unitaire_id, prise_posologie_id");
    CStoredObject::massLoadBackRefs($prescription->_ref_prescription_lines_element, "prise_posologie", "moment_unitaire_id, prise_posologie_id");
    CPrescription::massLoadAdministrations($prescription, $dates);
    $prescription->calculAllPlanifSysteme();
    $prescription->calculPlanSoin($dates, 0, null, null, null, true);
    CPrescription::massCountPlanifications($prescription);
    $_sejour->loadRefCurrAffectation($now);
    if (!$service_id) {
        $_sejour->_ref_curr_affectation->loadRefService();
    }
    $patient = $_sejour->loadRefPatient();
    $patient->loadRefLatestConstantes(null, array("poids", "taille"));
    $_sejour->loadNDA();
    $_sejour->loadRefsOperations();
    $_sejour->loadJourOp($date);
    $_sejour->_ref_last_operation->loadRefPlageOp();
    $initiales[$prescription->_id] = array();
    foreach ($prescription->_ref_prescription_lines as $line) {
        $line->_quantity_by_date_moment = array();
        $line->_administrations_moment = array();
        $line->loadActiveDates();