%PDF- %PDF-
Direktori : /var/www/html/klinisol/klinisol-api/app/Models/ |
Current File : /var/www/html/klinisol/klinisol-api/app/Models/IcdSubmission.php |
<?php namespace App\Models; use App\Traits\IsSignable; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; /** * @property integer id * @property integer patient_id * @property integer protocol_id * @property integer doctor_id * @property integer icd_id * @property string description * @property string status * @property mixed extra_fields * @property Icd icd * @property Patient patient * @property mixed answers * @property Protocol protocol * @property Doctor doctor */ class IcdSubmission extends BaseModel implements HasMedia { use InteractsWithMedia, IsSignable; const ASSIGNED = 'ASSIGNED'; const SENT = 'SENT'; const COMPLETED = 'COMPLETED'; const COLLECTION_NAME = 'icd_questions'; const DISK = 's3'; const FINAL_FORM = 'FINAL_FORM'; const extra_field = [ [ "key" => "md_contact", "title" => "Means of MD contact", "type" => "checkbox", "options" => [ [ "value" => "email", "title" => "Email", ], [ "value" => "telephone", "title" => "Telephone", ], [ "value" => "letter", "title" => "Letter", ], ], ], [ "key" => "contacted_by", "title" => "Contacted by", "type" => "text", ], [ "key" => "contacted_date", "title" => "Date", "type" => "date", ], [ "key" => "comments", "title" => "Comments", "type" => "textarea", ], ]; protected $table = 'icd_submissions'; protected $fillable = [ 'patient_id', 'protocol_id', 'doctor_id', 'icd_id', 'description', 'status', 'extra_fields', ]; protected $casts = [ 'id' => 'int', 'patient_id' => 'int', 'protocol_id' => 'int', 'doctor_id' => 'int', 'icd_id' => 'int', 'description' => 'string', 'status' => 'string', 'extra_fields' => 'array', ]; public function icd() { return $this->belongsTo(Icd::class); } public function answers() { return $this->hasMany(IcdAnswer::class); } public function patient() { return $this->belongsTo(Patient::class); } public function protocol() { return $this->belongsTo(Protocol::class); } public function doctor() { return $this->belongsTo(Doctor::class); } }