@@ -78,6 +78,11 @@ class Point extends Model
return $this->hasOne(Point::class, 'id', 'core_child_plan_point_id');
}
+ public function parentPoint()
+ {
+ return $this->hasOne(Point::class, 'id', 'parent_point_id');
+ }
+
public function client()
{
return $this->hasOne(Client::class, 'id', 'client_id');
@@ -11,6 +11,8 @@
href="<?= route('patients.view.notes.view.dashboard', ['patient' => $record->client, 'note' => $record->note]) ?>">
<?= friendlier_date_time($record->created_at) ?>
</a>
+ @elseif($record->parentPoint && $record->parentPoint->core_child_plan_point_id === $record->id)
+ <span class="text-sm"><?= friendlier_date_time($record->created_at) ?> as pre-existing plan</span>
@else
<span class="text-sm"><?= friendlier_date_time($record->created_at) ?> from the patient's chart</span>
@endif