select(['id', 'study_id', 'clinical_history', 'surgical_history', 'lab_results', 'clinical_diagnosis'])->firstOrFail();
}
public static function seriesOnly(int $studyId): self
{
return self::where('study_id', $studyId)->select(['id', 'study_id', 'series'])->firstOrFail();
}
public function study(): BelongsTo
{
return $this->belongsTo(Study::class);
}
public function historyIcon(): string
{
return sprintf('', blank($this->clinical_history) ? 'text-muted' : 'text-success');
}
/**
* @return array
*/
protected function casts(): array
{
return [
'properties' => 'array',
'series' => 'array',
'assignment_log' => 'array',
];
}
}