Exemplo n.º 1
0
 /**
  * @see parent::doRedirect()
  */
 function doRedirect()
 {
     if (CAppUI::conf("dPsalleOp CActeCCAM codage_strict") || !$this->_old->_id || !$this->_obj->_id) {
         $this->_ref_object->correctActes();
     }
     parent::doRedirect();
 }
 /**
  * Export constructor
  *
  * @param CMbObject $object        Object to export
  * @param null      $backrefs_tree Backrefs tree
  *
  * @throws CMbException
  */
 function __construct(CMbObject $object, $backrefs_tree = null)
 {
     if (!$object->getPerm(PERM_READ)) {
         throw new CMbException("Permission denied");
     }
     $this->object = $object;
     $this->backrefs_tree = isset($backrefs_tree) ? $backrefs_tree : $object->getExportedBackRefs();
 }
 /**
  * Get target object
  *
  * @return CMbObject
  */
 function getObject()
 {
     if (!$this->object) {
         $this->object = CStoredObject::loadFromGuid($this->object_guid);
     }
     if ($this->object) {
         $this->object->loadComplete();
     }
     return $this->object;
 }
/**
 * Fonction utilitaire pour la sauvegarde rapide d'un object avec génération du message
 *
 * @param CMbObject $object Objet à enregister
 *
 * @return void
 */
function storeObject($object)
{
    $title = $object->_id ? "-msg-modify" : "-msg-create";
    if ($msg = $object->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
        echo CAppUI::getMsg();
        CApp::rip();
    }
    CAppUI::setMsg(CAppUI::tr(get_class($object) . $title), UI_MSG_OK);
}
Exemplo n.º 5
0
/**
 * Fonction utilitaire pour la sauvegarde rapide d'un object avec génération du message
 *
 * @param CMbObject $object Objet à enregister
 *
 * @return void
 */
function storeObject($object)
{
    $title = $object->_id ? "-msg-modify" : "-msg-create";
    if ($msg = $object->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
        echo CAppUI::getMsg();
        // Il peut y avoir un msg de retour postérieur à la création de l'objet
        // On continue donc le processus de création de la naissance
        //CApp::rip();
    }
    CAppUI::setMsg(CAppUI::tr(get_class($object) . $title), UI_MSG_OK);
}
Exemplo n.º 6
0
 /**
  * Build event
  *
  * @param CMbObject $object Object
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     // Génération de l'échange
     $this->generateExchange();
     // Dans le cas où l'on charge un message XML HL7v3 standard
     if (!$this->dom) {
         $this->dom = new CHL7v3MessageXML("utf-8", $this->version);
     }
 }
Exemplo n.º 7
0
 /**
  * Build HPR message
  *
  * @param CMbObject $object Object to use
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     $this->version = "H" . $this->_receiver->_configs["{$this->type}_version"];
     $this->type_liaison = $this->_receiver->_configs["{$this->type}_sous_type"];
     // Génération de l'échange
     $this->generateExchange();
     // Création du message HL7
     $message = new CHPrimSanteMessage($this->version);
     $message->name = $this->msg_codes;
     $this->message = $message;
     $this->addH();
 }
Exemplo n.º 8
0
 /**
  * @see parent::getSpec()
  */
 function getSpec()
 {
     $spec = parent::getSpec();
     $spec->table = 'interv_hors_plages';
     $spec->key = 'interv_hors_plage_id';
     return $spec;
 }
 /**
  * @see parent::store()
  */
 function store()
 {
     if (!$this->_id) {
         $this->group_id = CGroups::loadCurrent()->_id;
     }
     return parent::store();
 }
Exemplo n.º 10
0
 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_classeNyha = "";
     if ($this->q1 == 1) {
         if ($this->q2a !== null && $this->q2a == 0) {
             $this->_classeNyha = "Classe III";
         }
         if ($this->q2a == 1 && $this->q2b !== null && $this->q2b == 1) {
             $this->_classeNyha = "Classe I";
         }
         if ($this->q2a == 1 && $this->q2b !== null && $this->q2b == 0) {
             $this->_classeNyha = "Classe II";
         }
     } elseif ($this->q1 == 0) {
         if ($this->q3a !== null && $this->q3a == 0) {
             $this->_classeNyha = "Classe III";
         }
         if ($this->q3a == 1 && $this->q3b !== null && $this->q3b == 1) {
             $this->_classeNyha = "Classe III";
         }
         if ($this->q3a == 1 && $this->q3b !== null && $this->q3b == 0) {
             $this->_classeNyha = "Classe IV";
         }
     }
     $this->_view = "Classification NYHA : {$this->_classeNyha}";
 }
Exemplo n.º 11
0
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $specs = parent::getProps();
     $specs["libelle"] = "str notNull";
     $specs["color"] = "color";
     return $specs;
 }
 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_view = $this->libelle ? $this->libelle : $this->code;
     $this->_shortview = $this->code;
     $this->_font_color = CColorSpec::get_text_color($this->color) > 130 ? '000000' : "ffffff";
 }
Exemplo n.º 13
0
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $props = parent::getProps();
     $props["sejour_id"] = "ref notNull class|CSejour";
     $props["user_id"] = "ref notNull class|CMediusers";
     return $props;
 }
Exemplo n.º 14
0
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_view = $this->nom;
     $this->_debut = substr($this->debut, 0, 2);
     $this->_fin = substr($this->fin, 0, 2);
 }
Exemplo n.º 15
0
 /**
  * @see parent::store()
  */
 function store()
 {
     if ($this->fieldModified("content") || !$this->last_modified) {
         $this->last_modified = CMbDT::dateTime();
     }
     return parent::store();
 }
Exemplo n.º 16
0
 function getSpec()
 {
     $spec = parent::getSpec();
     $spec->dsn = 'hl7v2';
     $spec->incremented = 0;
     return $spec;
 }
Exemplo n.º 17
0
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $props = parent::getProps();
     $props["favoris_user"] = "******";
     $props["favoris_code"] = "str notNull maxLength|16 seekable";
     return $props;
 }
Exemplo n.º 18
0
 /**
  * @see parent::loadView()
  */
 function loadView()
 {
     parent::loadView();
     $this->loadRefExClassField();
     $this->loadRefExClassTriggered();
     $this->_view = $this->_ref_ex_class_field->_view . " > " . $this->_ref_ex_class_triggered->_view;
 }
Exemplo n.º 19
0
 /**
  * Build event
  *
  * @param CMbObject $object Object
  *
  * @see parent::build()
  *
  * @return void
  */
 function build($object)
 {
     // Traitement sur le mbObject
     $this->object = $object;
     $this->last_log = $object->loadLastLog();
     // Récupération de la version HL7 en fonction du receiver et de la transaction
     $this->version = $this->_receiver->_configs[$this->transaction . "_HL7_version"];
     // Génération de l'échange
     $this->generateExchange();
     $terminator = $this->getSegmentTerminator($this->_receiver->_configs["ER7_segment_terminator"]);
     // Création du message HL7
     $message = new CHL7v2Message($this->version);
     $message->segmentTerminator = $terminator;
     $message->name = $this->msg_codes;
     $this->message = $message;
 }
Exemplo n.º 20
0
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $specs = parent::getProps();
     $specs["rpu_id"] = "ref notNull class|CRPU";
     $specs["extract_passages_id"] = "ref notNull class|CExtractPassages";
     return $specs;
 }
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $props = parent::getProps();
     $props["consultation_anesth_id"] = "ref notNull class|CConsultAnesth cascade";
     $props["technique"] = "text helped";
     return $props;
 }
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $props = parent::getProps();
     $props["service_id"] = "ref class|CService";
     $props["group_id"] = "ref class|CGroups";
     return $props;
 }
Exemplo n.º 23
0
 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->loadRefsFwd();
     $this->_shortview = $this->_ref_examen_labo->_shortview;
     $this->_view = $this->_ref_examen_labo->_view;
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     if ($this->nom_icone) {
         $this->nom_icone = basename($this->nom_icone);
     }
 }
Exemplo n.º 25
0
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $specs = parent::getProps();
     $specs["lit_id"] = "ref notNull class|C**t cascade";
     $specs["item_prestation_id"] = "ref notNull class|CItemPrestation cascade";
     return $specs;
 }
 /**
  * @see parent::getProps()
  */
 function getProps()
 {
     $specs = parent::getProps();
     $specs["firstname"] = "str notNull";
     $specs["sex"] = "enum list|f|m|u notNull default|u";
     $specs["language"] = "str";
     return $specs;
 }
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_self_sender = $this->emetteur == CAppUI::conf('mb_id');
     $this->_self_receiver = $this->destinataire == CAppUI::conf('mb_id');
     // ms
     $this->response_time = $this->response_time * 1000;
 }
Exemplo n.º 28
0
 function getProps()
 {
     $props = parent::getProps();
     $props["nb"] = "num notNull";
     $props["ressource_soin_id"] = "ref class|CRessourceSoin notNull";
     $props["element_prescription_id"] = "ref class|CElementPrescription notNull";
     return $props;
 }
Exemplo n.º 29
0
 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_view = "Allaitement du " . CMbDT::transform($this->date_debut, null, CAppUI::conf("date")) . " à " . CMbDT::transform($this->date_debut, null, CAppUI::conf("time"));
     if ($this->date_fin) {
         $this->_view .= " au " . CMbDT::transform($this->date_fin, null, CAppUI::conf("date")) . " à " . CMbDT::transform($this->date_fin, null, CAppUI::conf("time"));
     }
 }
Exemplo n.º 30
0
 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_view = $this->name;
     if ($this->evenements) {
         $this->_ref_evenement = explode("|", $this->evenements);
     }
 }