コード例 #1
0
 * @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
 */
$praticien_id = CValue::get('praticien_id');
$codable_class = CValue::get('codable_class');
$codable_id = CValue::get('codable_id');
$date = Cvalue::get('date');
$lock = CValue::get('lock', 1);
$user = CMediusers::get();
/** @var CCodable $codable */
$codable = CMbObject::loadFromGuid("{$codable_class}-{$codable_id}");
$codage = CCodageCCAM::get($codable, $praticien_id, 1, $date);
if (CAppUI::conf('ccam CCodable lock_codage_ccam') != 'password' && $codable_class != 'CSejour') {
    $codage = new CCodageCCAM();
    $codage->praticien_id = $praticien_id;
    $codage->codable_class = $codable_class;
    $codage->codable_id = $codable_id;
    $codages = $codage->loadMatchingList();
    foreach ($codages as $_codage) {
        $_codage->locked = $lock;
        $_codage->store();
    }
    $msg = $lock ? 'CCodageCCAM-msg-codage_locked' : 'CCodageCCAM-msg-codage_unlocked';
    CAppUI::setMsg($msg, UI_MSG_OK);
    echo CAppUI::getMsg();
    CApp::rip();
}
コード例 #2
0
 /**
  * Charge le codage CCAM associé
  *
  * @return CCodageCCAM|null
  */
 function loadRefCodageCCAM()
 {
     $this->loadRefObject();
     if (isset($this->_ref_object)) {
         return $this->_ref_codage_ccam = CCodageCCAM::get($this->_ref_object, $this->executant_id, $this->code_activite, CMbDT::date(null, $this->execution));
     }
     return null;
 }
コード例 #3
0
 /**
  * @see parent::getExtensionDocumentaire()
  */
 function getExtensionDocumentaire($executant_id)
 {
     $extension_documentaire = null;
     if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
         $codage_ccam = CCodageCCAM::get($this, $executant_id, 4, $this->date);
         $actes = $codage_ccam->loadActesCCAM();
         foreach ($actes as $_acte) {
             if ($_acte->extension_documentaire) {
                 $extension_documentaire = $_acte->extension_documentaire;
                 break;
             }
         }
     }
     if (!$extension_documentaire) {
         /** @var CTypeAnesth $type_anesth */
         $type_anesth = $this->loadFwdRef("type_anesth", true);
         $this->_ref_type_anesth = $type_anesth;
         $extension_documentaire = $type_anesth->ext_doc;
     }
     return $extension_documentaire;
 }