* вывод данных из отчетов для ролей адм и зав * поправил ширину стобцов ввода * добавил календарь на страницу статистики * переделал календарь у заведующего на странице отчета * добавил и привязал метрики в статистику
45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Report extends Model
|
|
{
|
|
protected $primaryKey = 'report_id';
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'created_at',
|
|
'sent_at',
|
|
'rf_department_id',
|
|
'rf_user_id',
|
|
'rf_lpudoctor_id'
|
|
];
|
|
|
|
public function metrikaResults(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
{
|
|
return $this->hasMany(MetrikaResult::class, 'rf_report_id', 'report_id');
|
|
}
|
|
|
|
public function observationPatients(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
{
|
|
return $this->hasMany(ObservationPatient::class, 'rf_report_id', 'report_id');
|
|
}
|
|
|
|
public function unwantedEvents()
|
|
{
|
|
return $this->hasMany(UnwantedEvent::class, 'rf_report_id', 'report_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'rf_user_id');
|
|
}
|
|
|
|
public function lpuDoctor()
|
|
{
|
|
return $this->belongsTo(MisLpuDoctor::class, 'rf_lpudoctor_id');
|
|
}
|
|
}
|