Ejemplo n.º 1
0
$cr = new CCompteRendu();
$cr->_page_format = "A4";
$cr->_orientation = "portrait";
// use template for header and footer
$template_header = new CTemplateManager();
$context->fillTemplate($template_header);
$header = CCompteRendu::getSpecialModel($user, "CPatient", "[ENTETE MOZAIC]");
if ($header->_id) {
    $header->loadContent();
    $template_header->renderDocument($header->_source);
} else {
    $template_header->document = "<p style=\"text-align:center;\">" . $context->_view . "</p>";
}
$template_footer = new CTemplateManager();
$context->fillTemplate($template_footer);
$footer = CCompteRendu::getSpecialModel($user, "CPatient", "[PIED DE PAGE MOZAIC]");
if ($footer->_id) {
    $footer->loadContent();
    $template_footer->renderDocument($footer->_source);
} else {
    $template_footer->document = "<p style=\"text-align:center;\">" . CMbDT::dateToLocale(CMbDT::dateTime()) . "</p>";
}
// main body
$_dispo = explode("_", $dispo);
$_dispos = explode("x", $_dispo[1]);
$cols = $_dispos[0];
$lines = $_dispos[1];
$content = "<html>\n<head>\n<style>\n  body {border:0;margin:0; position:relative;}\n  #header, #footer {position:absolute; top: 0; width:100%; overflow: hidden;}\n  #footer {top:25cm;}\n  #body {height:23cm; width:100%; border-collapse: collapse; table-layout: fixed; position: absolute; top: 2cm;}\n  #images {position:relative; width: 100%; height:100%;}\n  #body div.col {\n    position: absolute;\n    overflow: hidden;\n    line-height: 100%;\n    max-width: 100%;\n    text-align: center;\n    vertical-align: middle!important;\n  }\n\n  #images img {\n  box-shadow: 0 0 5px #b8b8b8;\n  }\n\n  #body p {\n    position:absolute;\n    bottom:0;\n    left:0;\n    width:100%;\n    text-align: center;\n  }\n\n  #body p span {\n    background-color:white;\n    border:solid 1px #6e6e6e;\n    padding:3px;\n  }\n\n  .droppable {\n    padding:4px;\n  }\n\n  #body img {max-width:100%; max-height: 100%;}\n  .nb_line_1 {height:100%;}\n  .nb_line_2 {height:50%;}\n  .nb_line_3 {height:33%;}\n\n  .nb_col_1 {width:100%;}\n  .nb_col_2 {width:50%;}\n  .nb_col_3 {width:33%;}\n\n  .line_1 {top:0;}\n  .nb_line_2.line_2 {top:50%;}\n  .nb_line_3.line_2 {top:33%;}\n  .nb_line_3.line_3 {top:66%;}\n\n  .col_1 {left:0;}\n  .nb_col_2.col_2 {left:50%;}\n  .nb_col_3.col_2 {left:33%;}\n  .nb_col_3.col_3 {left:66%;}\n\n</style>\n</head>\n<body>\n<div id=\"header\">{$template_header->document}</div>\n<div id=\"body\"><div id=\"images\">";
for ($a = 1; $a <= $lines; $a++) {
    for ($b = 1; $b <= $cols; $b++) {
        $content .= "\n    <div class=\"col nb_col_{$cols} nb_line_{$lines} col_{$b} line_{$a}\">";
Ejemplo n.º 2
0
    // Si le modèle est redéfini, on l'utilise
    $model = CCompteRendu::getSpecialModel($sejour->_ref_praticien, "COperation", "[FICHE DHE]");
    if ($model->_id) {
        CCompteRendu::streamDocForObject($model, $sejour, "CDomPDFConverter");
    }
}
if ($operation_id = CValue::get("operation_id")) {
    $operation->load($operation_id);
    $operation->loadRefsFwd();
    $sejour = $operation->_ref_sejour;
    $operation->_ref_sejour->loadRefsFwd();
    $operation->_ref_sejour->loadNDA();
    $patient =& $operation->_ref_sejour->_ref_patient;
    $patient->loadRefs();
    // Si le modèle est redéfini, on l'utilise
    $model = CCompteRendu::getSpecialModel($sejour->_ref_praticien, "COperation", "[FICHE DHE]");
    if ($model->_id) {
        CCompteRendu::streamDocForObject($model, $operation, "CDomPDFConverter");
    }
}
$today = CMbDT::date();
$group = CGroups::loadCurrent();
$group->loadConfigValues();
$simple_DHE = $group->_configs['dPplanningOp_COperation_DHE_mode_simple'];
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("operation", $operation);
$smarty->assign("sejour", $sejour);
$smarty->assign("today", $today);
$smarty->assign("simple_DHE", $simple_DHE);
$smarty->display("view_planning.tpl");
Ejemplo n.º 3
0
    $onSubmit = "return onSubmitFormAjax(this,\r\n    window.refreshFicheAnesth ||\r\n    function(){\r\n      window.opener.chooseAnesthCallback.defer(); window.close();\r\n    }\r\n  )";
    $smarty = new CSmartyDP("modules/dPcabinet");
    $smarty->assign("selOp", $selOp);
    $smarty->assign("patient", $patient);
    $smarty->assign("listAnesths", $listAnesths);
    $smarty->assign("onSubmit", $onSubmit);
    $smarty->assign("create_dossier_anesth", $create_dossier_anesth);
    $smarty->display("inc_choose_dossier_anesth.tpl");
    return;
}
$dossier_anesth->loadRefsDocs();
$consult = $dossier_anesth->loadRefConsultation();
$consult->loadRefPlageConsult();
if ($pdf) {
    // Si le modèle est redéfini, on l'utilise
    $model = CCompteRendu::getSpecialModel($consult->_ref_chir, "CConsultAnesth", "[FICHE ANESTH]");
    if ($model->_id) {
        CCompteRendu::streamDocForObject($model, $dossier_anesth, $model->factory);
    }
}
$consult->loadRefsFwd();
$consult->loadRefsDossiersAnesth();
$consult->loadRefsExamsComp();
$consult->loadRefsExamNyha();
$consult->loadRefsExamPossum();
$dossier_anesth->loadRefs();
$dossier_anesth->_ref_sejour->loadRefDossierMedical();
$other_intervs = array();
$pos_curr_interv = 0;
foreach ($consult->loadRefsDossiersAnesth() as $_dossier_anesth) {
    if ($_dossier_anesth->operation_id) {
Ejemplo n.º 4
0
$facture->loadRefsReglements();
$template_header = new CTemplateManager();
$template_footer = new CTemplateManager();
$header_height = $footer_height = 100;
$titre = $facture_class == "CFactureCabinet" ? "[ENTETE FACTURE CABINET]" : "[ENTETE FACTURE ETAB]";
$header = CCompteRendu::getSpecialModel($facture->_ref_praticien, $facture_class, $titre);
if ($header->_id) {
    $header->loadContent();
    $facture->fillTemplate($template_header);
    $template_header->renderDocument($header->_source);
    if ($header->height) {
        $header_height = $header->height;
    }
}
$titre = $facture_class == "CFactureCabinet" ? "[PIED DE PAGE FACT CABINET]" : "[PIED DE PAGE FACT ETAB]";
$footer = CCompteRendu::getSpecialModel($facture->_ref_praticien, $facture_class, $titre);
if ($footer->_id) {
    $footer->loadContent();
    $facture->fillTemplate($template_footer);
    $template_footer->renderDocument($footer->_source);
    if ($footer->height) {
        $footer_height = $footer->height;
    }
}
$style = file_get_contents("style/mediboard/tables.css");
$smarty = new CSmartyDP();
$smarty->assign("style", $style);
$smarty->assign("facture", $facture);
$smarty->assign("header_height", $header_height);
$smarty->assign("footer_height", $footer_height);
$smarty->assign("header", $template_header->document);
Ejemplo n.º 5
0
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$devis_id = CValue::get('devis_id');
$devis = new CDevisCodage();
$devis->load($devis_id);
if ($devis->_id) {
    $devis->updateFormFields();
    $devis->loadRefPatient();
    $devis->loadRefCodable();
    $devis->loadRefPraticien();
    $devis->_ref_praticien->loadRefFunction();
    $devis->getActeExecution();
    $devis->countActes();
    $devis->loadRefsActes();
    $devis->loadRefsFraisDivers();
    foreach ($devis->_ref_actes_ccam as $_acte) {
        $_acte->getTarif();
    }
    foreach ($devis->_ref_frais_divers as $_frais) {
        $_frais->loadRefType();
    }
    $model = CCompteRendu::getSpecialModel($devis->_ref_praticien, $devis->_class, '[DEVIS]');
    if ($model->_id) {
        CCompteRendu::streamDocForObject($model, $devis);
    }
    $smarty = new CSmartyDP();
    $smarty->assign('devis', $devis);
    $smarty->display('print_devis_codage.tpl');
}