浏览代码

Billing report - claim status column

Vijayakrishnan 3 年之前
父节点
当前提交
ad109b84d2

+ 4 - 1
app/Http/Controllers/PracticeManagementController.php

@@ -252,7 +252,10 @@ SELECT c.id                                                                 AS c
                                                     FROM claim
                                                     WHERE claim.note_id = n.id))
                              ORDER BY cl.position_index), '
-'::text)          AS claim_lines
+'::text)          AS claim_lines,
+       array_to_string(ARRAY(SELECT cl2.status FROM claim cl2 WHERE cl2.note_id = n.id 
+                                                              ORDER BY cl2.created_at DESC), '
+'::text)          AS claim_statuses
 $from
 WHERE n.is_cancelled IS NOT TRUE AND " . implode(' AND ', $conditions) . "
 ORDER BY n.effective_dateest DESC NULLS LAST, p.id

+ 1 - 6
resources/views/app/practice-management/billing-report.blade.php

@@ -138,12 +138,7 @@
                             <pre>{{$row->icds}}</pre>
                         </td>
                         <td class="text-nowrap border-left-0">
-                            {{--@foreach($row->note->claims as $claim)
-                            {{ $claim->status }}<br />
-                            <?php foreach ($claim->mbClaims as $mbClaim) : continue; ?>
-                                {{$mbClaim->status}} {{$mbClaim->status_memo}}
-                            <?php endforeach; ?>
-                            @endforeach--}}
+                            <pre>{{$row->claim_statuses}}</pre>
                         </td>
                     </tr>
                     @endforeach