/**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     if (!$this->retablissement) {
         $this->retablissement = "00:00:00";
     }
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     if ($this->nom_icone) {
         $this->nom_icone = basename($this->nom_icone);
     }
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     // GET
     if ($this->_query_params_get) {
         $this->_query_params_get = CMbSecurity::filterInput($this->_query_params_get);
         $this->query_params_get = json_encode($this->_query_params_get);
     }
     // POST
     if ($this->_query_params_post) {
         $this->_query_params_post = CMbSecurity::filterInput($this->_query_params_post);
         $this->query_params_post = json_encode($this->_query_params_post);
     }
     // SESSION
     if ($this->_session_data) {
         $this->_session_data = CMbSecurity::filterInput($this->_session_data);
         $this->session_data = json_encode($this->_session_data);
     }
 }
示例#4
0
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     // Should update codes CCAM. Very sensible, test a lot before uncommenting
     // $this->updateDBCodesCCAMField();
     parent::updatePlainFields();
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     $group = CGroups::loadCurrent();
     if ($this->_poids_g) {
         $this->poids = round($this->_poids_g / 1000, 2);
     }
     foreach (self::$list_constantes as $_constant => &$_params) {
         // If field is a
         if ($this->{$_constant} === null && empty($_params["formfields"])) {
             continue;
         }
         if (isset($_params["formfields"])) {
             $conv = 1.0;
             if (isset($_params['conversion'])) {
                 $form_field_unite = '_' . $_params["unit_config"];
                 $_unite = $this->{$form_field_unite};
                 // Si le champ n'a pas de valeur, on regarde en config
                 if (!$_unite) {
                     $_unite = CAppUI::conf('dPpatients CConstantesMedicales ' . $_params["unit_config"], $group);
                 }
                 $conv = self::getConv($_constant, $_unite);
             }
             $_parts = array();
             $_empty = true;
             foreach ($_params["formfields"] as $_formfield) {
                 if (empty($this->{$_formfield}) && !is_numeric($this->{$_formfield})) {
                     break;
                 }
                 $_empty = false;
                 $_value = $this->{$_formfield};
                 $_value = CMbFieldSpec::checkNumeric($_value, false);
                 if ($conv != 1.0) {
                     $_value = round($_value / $conv, self::CONV_ROUND_UP);
                 }
                 $_parts[] = $_value;
             }
             // no value at all
             if ($_empty) {
                 $this->{$_constant} = "";
             } elseif (count($_parts) != count($_params["formfields"])) {
                 $this->{$_constant} = "";
             } else {
                 $this->{$_constant} = implode("|", $_parts);
             }
         }
     }
     parent::updatePlainFields();
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     if ($this->value !== null) {
         $value_type = $this->loadRefValueType();
         if ($value_type->datatype === "NM") {
             $this->value = CMbFieldSpec::checkNumeric($this->value, false);
         }
     }
 }
示例#7
0
 /**
  * Update the plin fields
  * 
  * @return null
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     if ($this->_presentation_contexts && !$this->presentation_contexts) {
         foreach ($this->_presentation_contexts as $_pres_context) {
             if (!$this->presentation_contexts) {
                 $this->presentation_contexts = "{$_pres_context->id}/{$_pres_context->abstract_syntax}/{$_pres_context->transfer_syntax}";
             } else {
                 $this->presentation_contexts .= "|{$_pres_context->id}/{$_pres_context->abstract_syntax}/{$_pres_context->transfer_syntax}";
             }
         }
     }
     if ($this->_messages) {
         foreach ($this->_messages as $type => $msg) {
             if (!$this->messages) {
                 $this->messages = "{$type}\\" . base64_encode($msg->getPacket());
             } else {
                 $this->messages .= "|{$type}\\" . base64_encode($msg->getPacket());
             }
         }
     }
 }
示例#8
0
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     if ($this->_departments) {
         foreach ($this->_departments as &$_dep) {
             $_dep = str_pad($_dep, 2, "0", STR_PAD_LEFT);
         }
         $this->departments = implode("|", $this->_departments);
     }
 }
示例#9
0
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     // Tris
     $dBs_gauche = array();
     foreach ($this->_gauche_vocale as $key => $value) {
         $dBs_gauche[] = CMbArray::get($value, 0, "end sort");
         $this->_gauche_vocale[$key] = CMbArray::get($value, 0) . "-" . CMbArray::get($value, 1);
     }
     array_multisort($dBs_gauche, SORT_ASC, $this->_gauche_vocale);
     $dBs_droite = array();
     foreach ($this->_droite_vocale as $key => $value) {
         $dBs_droite[] = CMbArray::get($value, 0, "end sort");
         $this->_droite_vocale[$key] = CMbArray::get($value, 0) . "-" . CMbArray::get($value, 1);
     }
     array_multisort($dBs_droite, SORT_ASC, $this->_droite_vocale);
     // Implodes
     $this->gauche_aerien = implode("|", $this->_gauche_aerien);
     $this->gauche_osseux = implode("|", $this->_gauche_osseux);
     $this->gauche_conlat = implode("|", $this->_gauche_conlat);
     $this->gauche_ipslat = implode("|", $this->_gauche_ipslat);
     $this->gauche_pasrep = implode("|", $this->_gauche_pasrep);
     $this->gauche_vocale = implode("|", $this->_gauche_vocale);
     $this->gauche_tympan = implode("|", $this->_gauche_tympan);
     $this->droite_aerien = implode("|", $this->_droite_aerien);
     $this->droite_osseux = implode("|", $this->_droite_osseux);
     $this->droite_conlat = implode("|", $this->_droite_conlat);
     $this->droite_ipslat = implode("|", $this->_droite_ipslat);
     $this->droite_pasrep = implode("|", $this->_droite_pasrep);
     $this->droite_vocale = implode("|", $this->_droite_vocale);
     $this->droite_tympan = implode("|", $this->_droite_tympan);
 }
示例#10
0
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     if ($this->_min_tsivy !== null && $this->_sec_tsivy !== null) {
         $this->tsivy = '00:' . ($this->_min_tsivy ? sprintf("%02d", $this->_min_tsivy) : '00') . ':';
         $this->tsivy .= $this->_sec_tsivy ? sprintf("%02d", $this->_sec_tsivy) : '00';
     }
     parent::updatePlainFields();
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     $this->translation = CMbString::purifyHTML($this->translation);
 }
示例#12
0
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     $reset_position = $this->fieldModified("ex_group_id") || $this->fieldModified("disabled");
     // If we change its group, we need to reset its coordinates
     if ($reset_position) {
         $this->subgroup_id = "";
     }
     $subgroup_modified = $this->fieldModified("subgroup_id");
     if ($reset_position || $subgroup_modified) {
         if (!$this->fieldModified("coord_left")) {
             $this->coord_left = "";
         }
         if (!$this->fieldModified("coord_top")) {
             $this->coord_top = "";
         }
     }
     parent::updatePlainFields();
 }
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     if (!$this->_id && $this->locked === null) {
         $this->locked = "0";
     }
     parent::updatePlainFields();
 }
示例#14
0
 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     parent::updatePlainFields();
     $this->completeField("stock_class");
     if (!$this->stock_class) {
         $this->stock_class = "CProductStockGroup";
     }
 }