/**
  * Method to load the target object of thesaurus target
  *
  * @return CActeNGAP|CCodeCCAM|CCodeCIM10
  */
 function loadRefTarget()
 {
     if ($this->object_class && $this->object_id) {
         switch ($this->object_class) {
             case "CCodeCIM10":
                 $object = new CCodeCIM10();
                 $object->code = $this->object_id;
                 $object->loadLite();
                 $this->_ref_target = $object;
                 break;
             case "CCodeCCAM":
                 $object = new CCodeCCAM($this->object_id);
                 $object->load();
                 $this->_ref_target = $object;
                 break;
             case "CActeNGAP":
                 $object = new CActeNGAP();
                 $object->code = $this->object_id;
                 $object->loadMatchingObject();
                 $this->_ref_target = $object;
                 break;
             case "CMedicamentClasseATC":
                 $object = new CMedicamentClasseATC();
                 $niveau = $object->getNiveau($this->object_id);
                 $object->loadClasseATC($niveau, $this->object_id);
                 $this->_ref_target = $object;
                 break;
             default:
                 // nothing to do
                 break;
         }
     }
     return $this->_ref_target;
 }
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Cabinet
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$acte = new CActeNGAP();
$acte->quantite = CValue::get("quantite", "1");
$acte->code = CValue::get("code");
$acte->coefficient = CValue::get("coefficient", "1");
$acte->demi = CValue::get("demi");
$acte->complement = CValue::get("complement");
$acte->executant_id = CValue::get('executant_id');
$acte->gratuit = CValue::get('gratuit');
$acte->updateMontantBase();
$acte->getLibelle();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("acte", $acte);
$smarty->display("inc_vw_tarif_ngap.tpl");
 /**
  * Create a NGAP acte
  *
  * @param String[]  $data         Data with fiel and value
  * @param CMbObject $object       Reference object
  * @param String    $praticien_id Praticen id
  *
  * @return CActeNGAP
  */
 function createActeNGAP($data, $object, $praticien_id)
 {
     $ngap = new CActeNGAP();
     $ngap->code = $data["code"];
     $ngap->coefficient = $data["coefficient"];
     $ngap->quantite = $data["quantite"] ? $data["quantite"] : 1;
     $ngap->numero_dent = $data["numero_dent"];
     $ngap->comment = $data["comment"];
     $ngap->montant_depassement = $data["montantDepassement"];
     $ngap->numero_forfait_technique = $data["numeroForfaitTechnique"];
     $ngap->numero_agrement = $data["numeroAgrementAppareil"];
     $ngap->minor_coef = $data["minor_coef"];
     $ngap->minor_pct = $data["minor_pct"];
     $ngap->major_coef = $data["major_coef"];
     $ngap->major_pct = $data["major_pct"];
     $ngap->facturable = $data["facturable"] ? $data["facturable"] == "non" ? "0" : "1" : "1";
     $ngap->rapport_exoneration = $data["rapportExoneration"];
     $date = $data["date"];
     $heure = $data["heure"];
     if (!$heure) {
         $heure = $this->getHourWithObject($object);
     } else {
         $heure = CMbDT::transform(null, $heure, "%H:%M:%S");
     }
     $ngap->execution = "{$date} {$heure}";
     $complement = null;
     if ($data["executionNuit"] && $data["executionNuit"] !== "non") {
         $complement = "N";
     }
     if ($data["executionDimancheJourFerie"] && $data["executionDimancheJourFerie"] !== "non") {
         $complement = "F";
     }
     $ngap->complement = $complement;
     $ngap->setObject($object);
     $ngap->executant_id = $praticien_id;
     return $ngap;
 }
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$consult_id = CValue::get("consult_id");
$consult = new CConsultation();
$consult->load($consult_id);
$consult->countActes();
$consult->loadExtCodesCCAM();
$consult->getAssociationCodesActes();
$consult->loadPossibleActes();
$consult->canDo();
// Chargement des actes NGAP
$consult->loadRefsActesNGAP();
// Initialisation d'un acte NGAP
$acte_ngap = CActeNGAP::createEmptyFor($consult);
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
    // Chargement des règles de codage
    $consult->loadRefsCodagesCCAM();
    foreach ($consult->_ref_codages_ccam as $_codages_by_prat) {
        foreach ($_codages_by_prat as $_codage) {
            $_codage->loadPraticien()->loadRefFunction();
            $_codage->loadActesCCAM();
            $_codage->getTarifTotal();
            foreach ($_codage->_ref_actes_ccam as $_acte) {
                $_acte->getTarif();
            }
        }
    }
}
$sejour = $consult->loadRefSejour();
$object_id = CValue::get("object_id");
$object_class = CValue::get("object_class");
$code = CValue::post("code");
$executant_id = CValue::post("executant_id");
// Chargement de l'object
/** @var CCodable $object */
$object = new $object_class();
$object->load($object_id);
// Chargement de ses actes NGAP
$object->countActes();
$praticien = CMediusers::get($executant_id);
$praticien->loadRefFunction();
$praticien->spec_cpam_id ? $spe_undefined = false : ($spe_undefined = true);
$praticien->spec_cpam_id ? $spe = $praticien->spec_cpam_id : ($spe = 1);
// Creation de la requete permettant de retourner tous les codes correspondants
if ($code) {
    $sql = "SELECT c.`code`, c.`libelle`, c.`lettre_cle`, t.`tarif`\r\n  FROM `codes_ngap` as c, `tarif_ngap` as t, `specialite_to_tarif_ngap` as s\r\n  WHERE c.`code` LIKE ?1 AND t.`code` = c.`code` AND t.`zone` = ?2 AND s.`specialite` = ?3 AND t.`tarif_ngap_id` = s.`tarif_id`";
    if (!$object->_count_actes) {
        $sql .= " AND c.`lettre_cle` = '1' ";
    }
}
$sql = $ds->prepare($sql, addslashes($code) . '%', CActeNGAP::getZone($praticien->_ref_function), $spe);
$result = $ds->loadList($sql, null);
// Création du template
$smarty = new CSmartyDP();
$smarty->debugging = false;
$smarty->assign("code", $code);
$smarty->assign("result", $result);
$smarty->assign('spe_undefined', $spe_undefined);
$smarty->assign("nodebug", true);
$smarty->display("httpreq_do_ngap_autocomplete.tpl");
            $list_mode_sortie = $mode_sortie->loadGroupList($where);
        }
    }
}
$smarty = new CSmartyDP();
$smarty->assign("listAnesths", $listAnesths);
$smarty->assign("listChirs", $listChirs);
$smarty->assign("services", $services);
$smarty->assign("list_mode_sortie", $list_mode_sortie);
$smarty->assign("consult", $consult);
$smarty->assign("consult_anesth", $consult_anesth);
$smarty->assign("patient", $patient);
$smarty->assign("_is_anesth", $user->isAnesth());
$smarty->assign("antecedent", new CAntecedent());
$smarty->assign("traitement", new CTraitement());
$smarty->assign("acte_ngap", CActeNGAP::createEmptyFor($consult));
$smarty->assign("liste_dents", $liste_dents);
if (CModule::getActive("dPprescription")) {
    $smarty->assign("line", new CPrescriptionLineMedicament());
}
$smarty->assign("userSel", $user);
$smarty->assign("user", $user);
$smarty->assign("sejour_id", $sejour_id);
$smarty->assign("today", CMbDT::date());
$smarty->assign("isPrescriptionInstalled", CModule::getActive("dPprescription"));
if ($consult_anesth->_id) {
    $consult_anesth->loadRefOperation();
    $consult_anesth->loadRefsTechniques();
    $anesth = new CTypeAnesth();
    $anesth = $anesth->loadGroupList();
    $smarty->assign("list_etat_dents", $list_etat_dents);
$object_id = CValue::getOrSession("object_id");
$object_class = CValue::getOrSession("object_class");
// Chargement de la consultation
/** @var CCodable $object */
$object = new $object_class();
$object->load($object_id);
$object->countActes();
$object->loadRefsActesNGAP();
$object->loadRefPraticien();
$object->loadRefPatient();
$date = CValue::getOrSession("date", CMbDT::date());
$date_now = CMbDT::date();
if ($object instanceof CConsultation) {
    $object->loadRefSejour()->loadDiagnosticsAssocies();
}
// Initialisation d'un acte NGAP
$acte_ngap = CActeNGAP::createEmptyFor($object);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("acte_ngap", $acte_ngap);
$smarty->assign("object", $object);
$smarty->assign("subject", $object);
if ($object_class == "CConsultation") {
    $smarty->assign("_is_dentiste", $object->_is_dentiste);
} elseif ($object_class == "COperation") {
    $object->loadRefChir();
    $smarty->assign("_is_dentiste", $object->_ref_chir->isDentiste());
} else {
    $smarty->assign("_is_dentiste", false);
}
$smarty->display("inc_codage_ngap.tpl");
        foreach ($_codages_by_prat as $_codage) {
            $_codage->loadPraticien()->loadRefFunction();
            $_codage->loadActesCCAM();
            $_codage->getTarifTotal();
            foreach ($_codage->_ref_actes_ccam as $_acte) {
                $_acte->getTarif();
            }
        }
    }
}
// Chargement des praticiens
$listAnesths = new CMediusers();
$listAnesths = $listAnesths->loadAnesthesistes(PERM_DENY);
$listChirs = new CMediusers();
$listChirs = $listChirs->loadPraticiens(PERM_DENY);
//Initialisation d'un acte NGAP
$acte_ngap = CActeNGAP::createEmptyFor($operation);
// Liste des dents CCAM
$liste_dents = reset(CDentCCAM::loadList());
$user = CMediusers::get();
$user->isPraticien();
// Création du template
$smarty = new CSmartyDP("modules/dPsalleOp");
$smarty->assign("acte_ngap", $acte_ngap);
$smarty->assign("liste_dents", $liste_dents);
$smarty->assign("subject", $operation);
$smarty->assign("listAnesths", $listAnesths);
$smarty->assign("listChirs", $listChirs);
$smarty->assign('user', $user);
$smarty->assign("_is_dentiste", $operation->_ref_chir->isDentiste());
$smarty->display("inc_codage_actes.tpl");
Example #9
0
                $_codage->loadActesCCAM();
                $_codage->getTarifTotal();
                foreach ($_codage->_ref_actes_ccam as $_acte) {
                    $_acte->getTarif();
                }
            }
        }
    }
}
// Chargement des praticiens
$listAnesths = new CMediusers();
$listAnesths = $listAnesths->loadAnesthesistes(PERM_DENY);
$listChirs = new CMediusers();
$listChirs = $listChirs->loadPraticiens(PERM_DENY);
//Initialisation d'un acte NGAP
$acte_ngap = CActeNGAP::createEmptyFor($devis);
// Liste des dents CCAM
$liste_dents = reset(CDentCCAM::loadList());
$user = CMediusers::get();
$user->isPraticien();
$smarty = new CSmartyDP();
$smarty->assign('devis', $devis);
$smarty->assign("acte_ngap", $acte_ngap);
$smarty->assign("liste_dents", $liste_dents);
$smarty->assign("listAnesths", $listAnesths);
$smarty->assign("listChirs", $listChirs);
$smarty->assign('user', $user);
if ($action == 'open') {
    $smarty->display('inc_edit_devis_container.tpl');
} else {
    $smarty->display('inc_edit_devis.tpl');