Bladeren bron

Dashboard appts. color coding confirmation & coverage info

Vijayakrishnan 3 jaren geleden
bovenliggende
commit
51012ae7d3
2 gewijzigde bestanden met toevoegingen van 23 en 3 verwijderingen
  1. 3 0
      app/Http/Controllers/HomeController.php
  2. 20 3
      resources/views/app/dashboard.blade.php

+ 3 - 0
app/Http/Controllers/HomeController.php

@@ -742,6 +742,9 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
             $appointment->proUid = $appointment->pro->uid;
             $appointment->proName = $appointment->pro->displayName();
 
+            // insurance information
+            $appointment->coverage = $appointment->client->getPrimaryCoverageStatus();
+
             unset($appointment->client);
             unset($appointment->pro);
             unset($appointment->detail_json);

+ 20 - 3
resources/views/app/dashboard.blade.php

@@ -497,14 +497,31 @@
                                         <a :href="'/patients/view/' + event.clientUid" class="font-weight-bold">@{{ event.clientName }}</a>
                                         <span class="small d-inline-block pl-2 text-secondary font-weight-normal">@{{ event.clientSummary }}</span>
                                     </div>
-                                    <div>
-                                        Status: <b class="text-secondary">@{{ event.status }}</b>
-                                        &nbsp;/&nbsp;
+                                    <div class="d-flex align-items-baseline">
+                                        <div v-if="event.status === 'CREATED'" class="text-warning-mellow font-weight-bold">
+                                            <i class="fa fa-exclamation-triangle"></i>
+                                            Confirmation pending
+                                        </div>
+                                        <div v-else-if="event.status === 'CONFIRMED'" class="text-success font-weight-bold">
+                                            <i class="fa fa-check"></i>
+                                            Confirmed by the patient
+                                        </div>
+                                        <div v-else-if="event.status === 'REJECTED'" class="text-danger font-weight-bold">
+                                            <i class="fa fa-stop"></i>
+                                            Rejected by the patient
+                                        </div>
+                                        <div v-else class="text-secondary">
+                                            Status: <b>@{{ event.status }}</b>
+                                        </div>
+                                        <span class="mx-2 text-secondary">|</span>
                                         <a :href="'/patients/view/' + event.clientUid + '/calendar/' + event.uid">
                                             <i class="fa fa-edit"></i>
                                             Edit Appointment
                                         </a>
                                     </div>
+                                    <div class="mt-1" :class="event.coverage !== 'YES' ? (event.coverage === 'NO' ? 'text-danger' : 'text-warning-mellow') : 'text-success'">
+                                        Coverage Status: <b>@{{ event.coverage }}</b>
+                                    </div>
                                 </div>
                                 <div class="ml-auto">
                                     <select v-model="event.newStatus"