<?php /** * $Id: vw_codes_tarif.php 19425 2013-06-04 18:04:05Z mytto $ * * @package Mediboard * @subpackage Cabinet * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 19425 $ */ CCanDo::checkEdit(); $tarif_id = CValue::getOrSession("tarif_id"); $tarif = new CTarif(); $tarif->load($tarif_id); $tarif->loadActes(); $tab = array(); if (CAppui::conf("dPccam CCodeCCAM use_cotation_ccam")) { $tab["ccam"] = "_ref_code_ccam"; $tab["ngap"] = "_libelle"; } if (CModule::getActive("tarmed") && CAppui::conf("tarmed CCodeTarmed use_cotation_tarmed")) { $tab["tarmed"] = "_ref_tarmed"; $tab["caisse"] = "_ref_prestation_caisse"; } // Création du template $smarty = new CSmartyDP(); $smarty->assign("tarif", $tarif); $smarty->assign("tab", $tab); $smarty->display("vw_codes_tarif.tpl");
/** * Bind the tarif to the codable * * @return null|string */ function bindTarif() { if ($this->_class != "COperation") { $this->completeField("praticien_id"); } $this->_bind_tarif = false; $this->loadRefPraticien(); // Chargement du tarif $tarif = new CTarif(); $tarif->load($this->_tarif_id); if ($this->_class != "CConsultation") { $this->tarif = $this->tarif ? "composite" : $tarif->description; } // Mise à jour de codes CCAM prévus, sans information serialisée complémentaire $this->_codes_ccam = array(); foreach ($tarif->_codes_ccam as $_code_ccam) { $this->_codes_ccam[] = substr($_code_ccam, 0, 7); } $this->codes_ccam = implode("|", $this->_codes_ccam); $this->exec_tarif = $this->_acte_execution ? $this->_acte_execution : $this->getActeExecution(); if ($msg = $this->store()) { return $msg; } // Precodage des actes NGAP avec information sérialisée complète $this->_tokens_ngap = $tarif->codes_ngap; if ($msg = $this->precodeActe("_tokens_ngap", "CActeNGAP", $this->_ref_praticien->_id)) { return $msg; } $this->codes_ccam = $tarif->codes_ccam; // Precodage des actes CCAM avec information sérialisée complète if ($msg = $this->precodeCCAM($this->_ref_praticien->_id)) { return $msg; } $this->codes_ccam = implode("|", $this->_codes_ccam); if (CModule::getActive("tarmed")) { $this->_tokens_tarmed = $tarif->codes_tarmed; if ($msg = $this->precodeActe("_tokens_tarmed", "CActeTarmed", $this->_ref_praticien->_id)) { return $msg; } $this->_tokens_caisse = $tarif->codes_caisse; if ($msg = $this->precodeActe("_tokens_caisse", "CActeCaisse", $this->_ref_praticien->_id)) { return $msg; } } return null; }
/** * @see parent::bindTarif() */ function bindTarif() { $this->_bind_tarif = false; // Chargement du tarif $tarif = new CTarif(); $tarif->load($this->_tarif_id); if ($this->tarif == "pursue") { // Cas de la cotation poursuivie $this->secteur1 += $tarif->secteur1; $this->secteur2 += $tarif->secteur2; $this->secteur3 += $tarif->secteur3; $this->tarif = "composite"; } else { // Cas de la cotation normale $this->secteur1 = $tarif->secteur1; $this->secteur2 = $tarif->secteur2; $this->secteur3 = $tarif->secteur3; $this->tarif = $tarif->description; } $this->calculTVA(); $this->du_patient = $this->secteur1 + $this->secteur2 + $this->secteur3 + $this->du_tva; // Mise à jour de codes CCAM prévus, sans information serialisée complémentaire foreach ($tarif->_codes_ccam as $_code_ccam) { $this->_codes_ccam[] = substr($_code_ccam, 0, 7); } $this->codes_ccam = implode("|", $this->_codes_ccam); $this->exec_tarif = $this->_acte_execution; if ($msg = $this->store()) { return $msg; } // Precodage des actes NGAP avec information sérialisée complète $this->_tokens_ngap = $tarif->codes_ngap; if ($msg = $this->precodeActe("_tokens_ngap", "CActeNGAP", $this->getExecutantId())) { return $msg; } $this->codes_ccam = $tarif->codes_ccam; // Precodage des actes CCAM avec information sérialisée complète if ($msg = $this->precodeActeCCAM()) { return $msg; } if (CModule::getActive("tarmed")) { $this->_tokens_tarmed = $tarif->codes_tarmed; if ($msg = $this->precodeActe("_tokens_tarmed", "CActeTarmed", $this->getExecutantId())) { return $msg; } $this->_tokens_caisse = $tarif->codes_caisse; if ($msg = $this->precodeActe("_tokens_caisse", "CActeCaisse", $this->getExecutantId())) { return $msg; } } $this->loadRefsActes(); if ($this->concerne_ALD) { foreach ($this->_ref_actes_ngap as $_acte_ngap) { $_acte_ngap->ald = 1; $_acte_ngap->store(); } foreach ($this->_ref_actes_ccam as $_acte_ccam) { $_acte_ccam->ald = 1; $_acte_ccam->store(); } } return null; }