57 lines
1.7 KiB
PHP
57 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
use yii\db\ActiveRecord;
|
|
|
|
/**
|
|
* This is the model class for table "his_obx".
|
|
*
|
|
* @property int $id
|
|
* @property int $his_obr_id
|
|
* @property string|null $set_id
|
|
* @property string|null $value_type
|
|
* @property string|null $identifier
|
|
* @property string|null $obx_text
|
|
* @property string|null $obx_values
|
|
* @property string|null $units
|
|
* @property string|null $references_range
|
|
* @property string|null $abnormal_flags
|
|
* @property string|null $probability
|
|
* @property string|null $nature_of_abnormal_test
|
|
* @property string|null $observ_result_status
|
|
* @property string|null $date_last_obs_normal_values
|
|
* @property string|null $user_defined_access_checks
|
|
* @property string|null $date_time_of_the_observation
|
|
* @property string|null $producer_id
|
|
* @property string|null $responsible_observer
|
|
*
|
|
* @property HisObr $obr
|
|
*/
|
|
class HisObx extends ActiveRecord
|
|
{
|
|
public static function tableName()
|
|
{
|
|
return 'his_obx';
|
|
}
|
|
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['his_obr_id'], 'required'],
|
|
[['his_obr_id'], 'integer'],
|
|
[['obx_values'], 'string'],
|
|
[['date_last_obs_normal_values', 'date_time_of_the_observation'], 'safe'],
|
|
[['set_id', 'value_type', 'identifier', 'units', 'abnormal_flags', 'probability', 'nature_of_abnormal_test', 'observ_result_status', 'user_defined_access_checks', 'producer_id', 'responsible_observer'], 'string', 'max' => 100],
|
|
[['obx_text'], 'string', 'max' => 255],
|
|
[['his_obr_id'], 'exist', 'skipOnError' => true, 'targetClass' => HisObr::class, 'targetAttribute' => ['his_obr_id' => 'id']],
|
|
];
|
|
}
|
|
|
|
public function getObr()
|
|
{
|
|
return $this->hasOne(HisObr::class, ['id' => 'his_obr_id']);
|
|
}
|
|
}
|