diff --git a/app/Http/Resources/IndexSttMedicalHistoryResource.php b/app/Http/Resources/IndexSttMedicalHistoryResource.php index c0c68b7..f86ed17 100644 --- a/app/Http/Resources/IndexSttMedicalHistoryResource.php +++ b/app/Http/Resources/IndexSttMedicalHistoryResource.php @@ -57,7 +57,7 @@ class IndexSttMedicalHistoryResource extends JsonResource ? "$archiveInfoMisCardNumber / $archiveInfoFoxproCardNumber" : $archiveInfoMisCardNumber ?? $archiveInfoFoxproCardNumber; - $department = $historyType === 'mis' ? $model->outcomeMigration->stationarBranch->department : null; + $department = $historyType === 'mis' ? $model->outcomeMigration?->stationarBranch->department : null; return [ 'id' => $id,