Пример #1
0
<?php

/**
 * $Id: $
 *
 * @package    Mediboard
 * @subpackage SalleOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 23384 $
 */
$acte_id = CValue::get("acte_id");
$acte = new CActeCCAM();
$acte->load($acte_id);
$acte->canDo();
if (!$acte->_can->edit) {
    CAppUI::redirect("m=system&a=access_denied");
}
$acte->getTarif();
// Chargement du code, de l'activité et de la phase CCAM
$code = $acte->_ref_code_ccam;
$activite = $code->activites[$acte->code_activite];
$phase = $activite->phases[$acte->code_phase];
$listModificateurs = $acte->modificateurs;
foreach ($phase->_modificateurs as $modificateur) {
    $position = strpos($listModificateurs, $modificateur->code);
    if ($position !== false) {
        if ($modificateur->_double == "1") {
            $modificateur->_checked = $modificateur->code;
        } elseif ($modificateur->_double == "2") {
            $modificateur->_checked = $modificateur->code . $modificateur->_double;
 /**
  * Create a CCAM
  *
  * @param String[]  $data         CCAM field with value
  * @param CMbObject $object       Reference Obect
  * @param String    $praticien_id Practicien id
  *
  * @return CActeCCAM
  */
 function createActeCCAM($data, $object, $praticien_id)
 {
     $ccam = new CActeCCAM();
     $ccam->code_acte = $data["code_acte"];
     $ccam->code_activite = $data["code_activite"];
     $ccam->code_phase = $data["code_phase"];
     $heure = $data["heure"];
     if (!$heure) {
         $heure = $this->getHourWithObject($object);
     } else {
         $heure = CMbDT::transform(null, $heure, "%H:%M:%S");
     }
     $ccam->execution = $data["date"] . " {$heure}";
     $ccam->modificateurs = implode($data["modificateur"]);
     $ccam->commentaire = $data["commentaire"];
     $ccam->signe = $data["signe"] ? $data["signe"] == "oui" ? "1" : "0" : null;
     $ccam->facturable = $data["facturable"] ? $data["facturable"] == "non" ? "0" : "1" : "1";
     $ccam->rembourse = $data["rembourse"] ? $data["rembourse"] == "oui" ? "1" : "0" : null;
     $ccam->charges_sup = $data["charges_sup"] ? $data["charges_sup"] == "c" ? "1" : "0" : null;
     $ccam->montant_depassement = $data["montantDepassement"];
     $ccam->numero_forfait_technique = $data["numeroForfaitTechnique"];
     $ccam->numero_agrement = $data["numeroAgrementAppareil"];
     $ccam->position_dentaire = implode("|", $data["position_dentaire"]);
     if ($data["code_association"] && $data["code_association"] > 0 && $data["code_association"] < 6) {
         $ccam->code_association = $data["code_association"];
     }
     if ($data["code_extension"] && $data["code_extension"] > 0 && $data["code_extension"] < 7) {
         $ccam->extension_documentaire = $data["code_extension"];
     }
     $ccam->rapport_exoneration = $data["rapport_exoneration"];
     $ccam->executant_id = $praticien_id;
     $ccam->setObject($object);
     return $ccam;
 }
Пример #3
0
 /**
  * Ajout des actes ccam d'un tarif dans une intervention ou consultation 
  * 
  * @param string $chir l'executant de l'acte
  * 
  * @return string $msg
  */
 function precodeCCAM($chir)
 {
     // Explode des codes_ccam du tarif
     $codes_ccam = explode("|", $this->codes_ccam);
     foreach ($codes_ccam as $_code) {
         $acte = new CActeCCAM();
         $acte->_adapt_object = true;
         $acte->_preserve_montant = true;
         $acte->setFullCode($_code);
         // si le code ccam est composé de 3 elements, on le precode
         if ($acte->code_activite != "" && $acte->code_phase != "") {
             // Permet de sauvegarder le montant de base de l'acte CCAM
             $acte->_calcul_montant_base = 1;
             // Mise a jour de codes_ccam suivant les _tokens_ccam du tarif
             $acte->object_id = $this->_id;
             $acte->object_class = $this->_class;
             $acte->executant_id = $chir;
             $acte->execution = $this->_datetime;
             $acte->facturable = 1;
             if ($msg = $acte->store()) {
                 return $msg;
             }
         }
     }
     return null;
 }
<?php

/**
 * $Id: httpreq_vw_reglement_ccam.php 19840 2013-07-09 19:36:14Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19840 $
 */
// Recuperation de l'id de l'acte CCAM
$acte_ccam_id = CValue::getOrSession("acte_ccam_id");
// Chargement de l'acte CCAM
$acte = new CActeCCAM();
$acte->load($acte_ccam_id);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("acte_ccam", $acte);
$smarty->display("inc_vw_reglement_ccam.tpl");
Пример #5
0
 /**
  * Load the linked acts of the given act
  *
  * @return CActeCCAM[]
  */
 public function loadActesCCAM()
 {
     if ($this->_ref_actes_ccam) {
         return $this->_ref_actes_ccam;
     }
     $act = new CActeCCAM();
     $where = array();
     $where['object_class'] = " = '{$this->codable_class}'";
     $where['object_id'] = " = {$this->codable_id}";
     $where['executant_id'] = " = {$this->praticien_id}";
     $where['code_activite'] = $this->activite_anesth ? " = 4" : " != 4";
     $where['execution'] = " BETWEEN '{$this->date} 00:00:00' AND '{$this->date} 23:59:59'";
     $this->_ref_actes_ccam = $act->loadList($where, "code_association");
     foreach ($this->_ref_actes_ccam as $_acte) {
         if (in_array($_acte->code_acte, $this->_check_failed_acts)) {
             unset($this->_ref_actes_ccam[$_acte->_id]);
             continue;
         }
         $_acte->loadRefCodeCCAM();
     }
     return $this->_ref_actes_ccam;
 }
Пример #6
0
 /**
  * Charge les autre actes du même codable
  *
  * @param bool $same_executant  Seulement les actes du même exécutant si vrai
  * @param bool $only_facturable Seulement les actes facturables si vrai
  * @param bool $same_activite   Seulement les actes ayant la même activité (4 ou (1,2,3,5))
  * @param bool $same_day        Seulement les actes fait le même jour
  *
  * @return CActeCCAM[]
  */
 function getLinkedActes($same_executant = true, $only_facturable = true, $same_activite = false, $same_day = false)
 {
     $acte = new CActeCCAM();
     $where = array();
     $where["acte_id"] = "<> '{$this->_id}'";
     $where["object_class"] = "= '{$this->object_class}'";
     $where["object_id"] = "= '{$this->object_id}'";
     if ($only_facturable) {
         $where["facturable"] = "= '1'";
     }
     if ($same_executant) {
         $where["executant_id"] = "= '{$this->executant_id}'";
     }
     if ($same_activite) {
         if ($this->code_activite == 4) {
             $where['code_activite'] = " = 4";
         } else {
             $where['code_activite'] = " IN(1, 2, 3, 5)";
         }
     }
     if ($same_day) {
         $begin = CMbDT::format($this->execution, '%Y-%m-%d 00:00:00');
         $end = CMbDT::format($this->execution, '%Y-%m-%d 23:59:59');
         $where['execution'] = " BETWEEN '{$begin}' AND '{$end}'";
     }
     $this->_linked_actes = $acte->loadList($where);
     return $this->_linked_actes;
 }
Пример #7
0
         foreach ($codes as $key => $value) {
             // Attention à bien cloner le code CCAM car on rajoute une champ à la volée
             $code = CDatedCodeCCAM::get($value["favoris_code"]);
             if (CAppUI::pref('actes_comp_supp_favoris', 0) || !CAppUI::pref('actes_comp_supp_favoris', 0) && !in_array($code->chapitres[0]['db'], array('18.', '19.'))) {
                 $code->occ = "0";
                 $list[$value["favoris_code"]] = $code;
             }
         }
         sort($list);
     }
     /**
      *  Statistiques
      */
     if ($mode == "stats") {
         // Appel de la fonction listant les codes les plus utilisés pour un praticien
         $actes = new CActeCCAM();
         $codes = $actes->getFavoris($_user_id, $object_class);
         foreach ($codes as $key => $value) {
             // Attention à bien cloner le code CCAM car on rajoute une champ à la volée
             $code = CDatedCodeCCAM::get($value["code_acte"]);
             if (CAppUI::pref('actes_comp_supp_favoris', 0) || !CAppUI::pref('actes_comp_supp_favoris', 0) && !in_array($code->chapitres[0]['db'], array('18.', '19.'))) {
                 $code->occ = $value["nb_acte"];
                 $list[$value["code_acte"]] = $code;
             }
         }
         if ($order == "alpha") {
             sort($list);
         }
     }
 }
 if ($type == "cim10") {
Пример #8
0
    echo CAppUI::getMsg();
    if ($redirectUrl) {
        CAppUI::redirect($redirectUrl);
    }
    CApp::rip();
}
if (!CUser::checkPassword($praticien->_user_username, $password)) {
    CAppUI::setMsg("Mot de passe incorrect", UI_MSG_ERROR);
    echo CAppUI::getMsg();
    if ($redirectUrl) {
        CAppUI::redirect($redirectUrl);
    }
    CApp::rip();
}
// Chargement des actes CCAM à modifier
$acte_ccam = new CActeCCAM();
$acte_ccam->object_id = $object_id;
$acte_ccam->object_class = $object_class;
$acte_ccam->executant_id = $praticien->_id;
$acte_ccam->signe = 0;
/** @var CActeCCAM[] $actes_ccam */
$actes_ccam = $acte_ccam->loadMatchingList();
// Modification des actes CCAM
foreach ($actes_ccam as $key => $_acte_ccam) {
    $_acte_ccam->signe = 1;
    $msg = $_acte_ccam->store();
    if ($msg) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
    }
}
if ($redirectUrl) {
Пример #9
0
}
$object_id = CValue::get("object_id");
$object_class = CValue::get("object_class");
$praticien = new CMediusers();
$listPraticien = $praticien->loadPraticiens();
// Signature des actes en definissant un objet
if ($dialog) {
    // Recuperation de l'operation
    // Chargement de l'objet
    $object = new $object_class();
    $object->load($object_id);
    $object->loadView();
    $operations[$object->_id] = $object;
} else {
    // On parcourt les actes ccam
    $acte_ccam = new CActeCCAM();
    $where = array();
    if ($praticien_id) {
        $where["executant_id"] = " = '{$praticien_id}'";
    }
    $where["execution"] = "LIKE '{$date}%'";
    $where["object_class"] = " = 'COperation'";
    $actes = $acte_ccam->loadList($where);
    foreach ($actes as $_acte) {
        // Si l'operation n'est pas deja stockée, on la charge et on la stocke
        if (!array_key_exists($_acte->object_id, $operations)) {
            $_acte->loadRefObject();
            $operations[$_acte->object_id] = $_acte->_ref_object;
        }
        // Sinon, on stocke directement l'acte dans l'operation
        $operations[$_acte->object_id]->_ref_actes_ccam[$_acte->_id] = $_acte;
Пример #10
0
 * $Id$
 *  
 * @package    Mediboard
 * @subpackage ccam
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$start_time = microtime(true);
CCanDo::checkAdmin();
$date = CValue::get('date');
$step = CValue::get('step', 100);
$codable_class = CValue::get('codable_class');
$start = CValue::getOrSession('start_update_montant', 0);
$act = new CActeCCAM();
$where = array();
$where['execution'] = " > '{$date} 00:00:00'";
$where['code_association'] = ' > 1';
if ($codable_class) {
    $where['object_class'] = " = '{$codable_class}'";
}
$total = $act->countList($where);
/** @var CActeCCAM[] $acts */
$acts = $act->loadList($where, 'execution DESC', "{$start}, {$step}");
foreach ($acts as $_act) {
    $_act->_calcul_montant_base = 1;
    $_act->store();
}
CValue::setSession('start_update_montant', $start + $step);
$smarty = new CSmartyDP();
Пример #11
0
 function addActeCCAM(DOMNode $elParent, CActeCCAM $mbActeCCAM, CCodable $codable)
 {
     $acteCCAM = $this->addElement($elParent, "acteCCAM");
     // Gestion des attributs
     $this->addAttribute($acteCCAM, "action", "création");
     $this->addAttribute($acteCCAM, "facturable", $mbActeCCAM->facturable ? "oui" : "non");
     $this->addAttribute($acteCCAM, "valide", "oui");
     $this->addAttribute($acteCCAM, "documentaire", "non");
     $this->addAttribute($acteCCAM, "gratuit", $mbActeCCAM->gratuit ? "oui" : "non");
     if ($mbActeCCAM->_rembex) {
         $this->addAttribute($acteCCAM, "remboursementExceptionnel", "oui");
     }
     $identifiant = $this->addElement($acteCCAM, "identifiant");
     $this->addElement($identifiant, "emetteur", "acte{$mbActeCCAM->_id}");
     $this->addElement($acteCCAM, "codeActe", $mbActeCCAM->code_acte);
     $this->addElement($acteCCAM, "codeActivite", $mbActeCCAM->code_activite);
     $this->addElement($acteCCAM, "codePhase", $mbActeCCAM->code_phase);
     // Date et heure de l'opération
     if (CAppUI::conf("hprimxml date_heure_acte") == "operation" && $codable instanceof COperation) {
         $date = $codable->date ? $codable->date : $codable->_ref_plageop->date;
         $time_operation = $codable->time_operation == "00:00:00" ? null : $codable->time_operation;
         $heure = CValue::first($codable->debut_op, $codable->entree_salle, $time_operation, $codable->horaire_voulu);
         $sejour = $codable->_ref_sejour;
         if ("{$date} {$heure}" < $sejour->entree) {
             $date = CMbDT::date($sejour->entree);
             $heure = CMbDT::time($sejour->entree);
         }
         if ("{$date} {$heure}" > $sejour->sortie) {
             $date = CMbDT::date($sejour->sortie);
             $heure = CMbDT::time($sejour->sortie);
         }
     } else {
         $date = CMbDT::date($mbActeCCAM->execution);
         $heure = CMbDT::time($mbActeCCAM->execution);
     }
     $execute = $this->addElement($acteCCAM, "execute");
     $this->addElement($execute, "date", $date);
     $this->addElement($execute, "heure", $heure);
     $mbExecutant = $mbActeCCAM->loadRefExecutant();
     $executant = $this->addElement($acteCCAM, "executant");
     $medecins = $this->addElement($executant, "medecins");
     $medecinExecutant = $this->addElement($medecins, "medecinExecutant");
     $this->addAttribute($medecinExecutant, "principal", "oui");
     $medecin = $this->addElement($medecinExecutant, "medecin");
     $this->addProfessionnelSante($medecin, $mbExecutant);
     //$this->addUniteFonctionnelle($executant, $codable);
     $modificateurs = $this->addElement($acteCCAM, "modificateurs");
     foreach ($mbActeCCAM->_modificateurs as $mbModificateur) {
         $this->addElement($modificateurs, "modificateur", $mbModificateur);
     }
     if ($mbActeCCAM->code_association) {
         $this->addElement($acteCCAM, "codeAssociationNonPrevue", $mbActeCCAM->code_association);
     }
     if ($mbActeCCAM->_anesth && $mbActeCCAM->object_class == "COperation") {
         $type_anesth = $mbActeCCAM->loadTargetObject()->_ref_type_anesth;
         $extension_documentaire = $mbActeCCAM->extension_documentaire ? $mbActeCCAM->extension_documentaire : $type_anesth->ext_doc;
         $this->addElement($acteCCAM, "codeExtensionDocumentaire", $extension_documentaire);
     }
     // Gestion des dents
     if ($mbActeCCAM->_dents) {
         $positionsDentaires = $this->addElement($acteCCAM, "positionsDentaires");
         foreach ($mbActeCCAM->_dents as $_dent) {
             $this->addElement($positionsDentaires, "positionDentaire", $_dent);
         }
     }
     $montant = $this->addElement($acteCCAM, "montant");
     if ($mbActeCCAM->montant_depassement > 0) {
         $montantDepassement = $this->addElement($montant, "montantDepassement", sprintf("%.2f", $mbActeCCAM->montant_depassement));
         if (CAppUI::conf("dPpmsi systeme_facturation") == "siemens") {
             if (CAppUI::conf("dPsalleOp CActeCCAM envoi_motif_depassement")) {
                 $this->addAttribute($montantDepassement, "motif", "d");
             }
         } else {
             if ($mbActeCCAM->motif_depassement) {
                 $this->addAttribute($montantDepassement, "motif", $mbActeCCAM->motif_depassement);
             }
         }
     }
     return $acteCCAM;
 }
Пример #12
0
 * dPccam
 *
 * @category Ccam
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  SVN: $Id:\$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$_filter_class = CValue::get("_filter_class");
$tag_id = CValue::get("tag_id");
$list = array();
$user = CUser::get();
if (!$tag_id) {
    $actes = new CActeCCAM();
    $codes = $actes->getFavoris($user->_id, $_filter_class);
    $i = 0;
    foreach ($codes as $value) {
        $code = CDatedCodeCCAM::get($value["code_acte"]);
        $code->getChaps();
        $code->favoris_id = 0;
        $code->occ = $value["nb_acte"];
        $code->class = $value["object_class"];
        $chapitre =& $code->chapitres[0];
        $list[$chapitre["code"]]["nom"] = $chapitre["nom"];
        $list[$chapitre["code"]]["codes"][$value["code_acte"]] = $code;
    }
}
$fusion = $list;
$codesByChap = CFavoriCCAM::getOrdered($user->_id, $_filter_class, true, $tag_id);