Ship commercial Dentistry suite with odontogram and treatment plans.
Deploy Ladill Care / deploy (push) Failing after 36s
Deploy Ladill Care / deploy (push) Failing after 36s
Replace placeholder clinical forms with patient-level FDI charting, multi-visit plans, procedure-to-bill linking, imaging, reports, and demo seed data. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class DentalPlanItem extends Model
|
||||
{
|
||||
public const STATUS_PROPOSED = 'proposed';
|
||||
|
||||
public const STATUS_ACCEPTED = 'accepted';
|
||||
|
||||
public const STATUS_DONE = 'done';
|
||||
|
||||
public const STATUS_CANCELLED = 'cancelled';
|
||||
|
||||
protected $table = 'care_dental_plan_items';
|
||||
|
||||
protected $fillable = [
|
||||
'uuid', 'treatment_plan_id', 'tooth_code', 'surfaces', 'procedure_code',
|
||||
'label', 'priority', 'status', 'estimate_minor', 'bill_line_item_id', 'notes',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['surfaces' => 'array'];
|
||||
}
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::creating(function (DentalPlanItem $item) {
|
||||
if (! $item->uuid) {
|
||||
$item->uuid = (string) Str::uuid();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function getRouteKeyName(): string
|
||||
{
|
||||
return 'uuid';
|
||||
}
|
||||
|
||||
public function plan(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(DentalTreatmentPlan::class, 'treatment_plan_id');
|
||||
}
|
||||
|
||||
public function billLineItem(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(BillLineItem::class, 'bill_line_item_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user