feat(assessments): layered clinical assessment engine end-to-end
Deploy Ladill Care / deploy (push) Successful in 1m26s
Deploy Ladill Care / deploy (push) Successful in 1m26s
Add a template-driven assessment system with universal intake, clinical pathways, disease instruments (stroke MVP + extended, diabetes, and ten specialty packs), scoring, patient outcome trends, REST/API + FHIR export, and Enterprise org-level assessment analytics. Seed packs and design/licensing docs ship for deploy and pre-GA review.
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class AssessmentQuestion extends Model
|
||||
{
|
||||
public const TYPE_TEXT = 'text';
|
||||
|
||||
public const TYPE_TEXTAREA = 'textarea';
|
||||
|
||||
public const TYPE_NUMBER = 'number';
|
||||
|
||||
public const TYPE_INTEGER = 'integer';
|
||||
|
||||
public const TYPE_BOOLEAN = 'boolean';
|
||||
|
||||
public const TYPE_DATE = 'date';
|
||||
|
||||
public const TYPE_DATETIME = 'datetime';
|
||||
|
||||
public const TYPE_SINGLE_CHOICE = 'single_choice';
|
||||
|
||||
public const TYPE_MULTI_CHOICE = 'multi_choice';
|
||||
|
||||
public const TYPE_SCALE = 'scale';
|
||||
|
||||
public const TYPE_SCORE_ITEM = 'score_item';
|
||||
|
||||
public const TYPE_CALCULATED = 'calculated';
|
||||
|
||||
protected $table = 'care_assessment_questions';
|
||||
|
||||
protected $fillable = [
|
||||
'template_id', 'code', 'section', 'label', 'help_text', 'answer_type',
|
||||
'options', 'is_required', 'sort_order', 'score_key', 'validation',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'options' => 'array',
|
||||
'validation' => 'array',
|
||||
'is_required' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function template(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AssessmentTemplate::class, 'template_id');
|
||||
}
|
||||
|
||||
public function answers(): HasMany
|
||||
{
|
||||
return $this->hasMany(AssessmentAnswer::class, 'question_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user