Răsfoiți Sursa

Fix sochx point npx

Vijayakrishnan 3 ani în urmă
părinte
comite
c7f4c94af8

+ 1 - 1
app/Models/Point.php

@@ -34,7 +34,7 @@ class Point extends Model
             ->where('category', $_category)
             ->orderBy('created_at', 'DESC')
             ->first();
-        if ($point->data) {
+        if ($point && $point->data) {
             $point->data = json_decode($point->data, $_assoc);
         }
         return $point;

+ 1 - 1
resources/views/app/patient/segment-templates/history_social/edit.blade.php

@@ -11,7 +11,7 @@ use App\Models\Segment;
 
 $point = Point::getGlobalSingletonOfCategory($patient, 'SOCIAL_HISTORY',true);
 
-$socHx = $point->data;
+$socHx = $point ? $point->data : null;
 
 $fields = [
     [

+ 1 - 1
resources/views/app/patient/segment-templates/history_social/summary.blade.php

@@ -11,7 +11,7 @@ use App\Models\Segment;
 
 $point = Point::getGlobalSingletonOfCategory($patient, 'SOCIAL_HISTORY', true);
 
-$contentData = $point->data;
+$contentData = $point ? $point->data : null;
 
 $fields = [
     [