Просмотр исходного кода

Merge branch 'master' of rav.triplestart.com:jmudaka/stagfe2 into dev

= 3 лет назад
Родитель
Сommit
828e577457

+ 9 - 7
resources/views/app/patient/coverage_column_renderer.blade.php

@@ -36,13 +36,15 @@
         <small class="ml-2 text-muted">(No insurance)</small>
     @endif
 </div>
-@if($coverage && $coverage->plan_type === 'MEDICARE')
-    @if(@$patient->mpb_remaining !== null)
-        <small class="text-muted d-block ml-3">Deductible: {{format_number(@$patient->mpb_remaining)}} </small>
+@if($coverage)
+    @if($coverage && $coverage->plan_type === 'MEDICARE')
+        @if(@$patient->mpb_remaining !== null)
+            <small class="text-muted d-block ml-3">Deductible: {{format_number(@$patient->mpb_remaining)}} </small>
+        @endif
     @endif
-@endif
-@if($coverage && $coverage->plan_type === 'COMMERCIAL')
-    @if(@$coverage->deductable_amount !== null)
-        <small class="text-muted d-block ml-3">Deductible: {{format_number(@$coverage->deductable_amount)}} </small>
+    @if($coverage->plan_type === 'COMMERCIAL')
+        @if(@$coverage->deductible_amount !== null)
+            <small class="text-muted d-block ml-3">Deductible: {{format_number(@$coverage->deductible_amount)}} </small>
+        @endif
     @endif
 @endif

+ 4 - 4
resources/views/layouts/patient-header.blade.php

@@ -332,7 +332,7 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </div>
         @endif
-        <?php $_cpc = $patient->getPrimaryCoverage(); ?>
+        <?php $_cpc = $patient->getPrimaryCoverage();?>
         <div class="d-flex">
           <div>DOB: {{friendly_date($patient->dob, false,null, true)}} </div>
           @if($_cpc && $patient->getPrimaryCoverageStatus() === 'YES')
@@ -360,9 +360,9 @@ $addressParts .= implode(", ", $addressPart2);
                 @endif
               @endif
               @if($_cpc->plan_type === 'COMMERCIAL')
-                @if(@$_cpc->deductable_amount !== null)
-                  <div class="ml-2">Deductible: {{format_number(@$_cpc->deductable_amount)}} </div>
-                @endif
+                
+                  <div class="ml-2">Deductible: {{@$_cpc->deductible_amount}} </div>
+                
               @endif
             @endif 
           @endif

+ 12 - 1
spec/rpt-queries.sql

@@ -94,4 +94,15 @@ group by mcp_pro_id
 -- DATE | MCP | COUNT
 
 UPDATE note SET visit_number = ((SELECT COUNT(*)
- FROM note n WHERE n.id < note.id AND n.client_id = note.client_id AND n.is_cancelled IS NOT TRUE AND n.is_core_note IS FALSE) + 1) WHERE is_cancelled IS NOT TRUE;
+ FROM note n WHERE n.id < note.id AND n.client_id = note.client_id AND n.is_cancelled IS NOT TRUE AND n.is_core_note IS FALSE) + 1) WHERE is_cancelled IS NOT TRUE;
+
+COPY (
+  SELECT 
+    name_first,
+    name_last,
+    next_mcp_appointment_date, 
+    (SELECT data FROM point WHERE category = 'CHIEF_COMPLAINT' AND point.client_id = client.id ORDER BY point.created_at DESC LIMIT 1) AS latest_chief_complaint,
+    client_engagement_status_category as status
+  FROM client 
+  WHERE shadow_pro_id IS NULL
+) TO '/tmp/client_appts.csv' CSV HEADER;