Vijayakrishnan před 3 roky
rodič
revize
3a149d3448

+ 4 - 0
app/Models/Note.php

@@ -136,6 +136,10 @@ class Note extends Model
         return $reasons;
     }
 
+    public function reasonsLog() {
+        return $this->hasMany(NoteReasons::class, 'note_id', 'id')->orderBy('created_at', 'DESC');
+    }
+
     public function claims()
     {
         return $this->hasMany(Claim::class, 'note_id', 'id')->orderBy('created_at', 'DESC');

+ 12 - 0
app/Models/NoteReasons.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class NoteReasons extends Model
+{
+
+    protected $table = 'note_reasons';
+    //
+}

+ 3 - 0
public/css/style.css

@@ -334,6 +334,9 @@ body>nav.navbar {
     white-space: nowrap;
     display: block;
 }
+.mcp-theme-1 .max-width-unset {
+    max-width: unset !important;
+}
 .mcp-theme-1 .form-control.form-control-sm:not(.min-width-unset) {
     min-width: 200px;
 }

+ 41 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -1181,7 +1181,7 @@ use App\Models\Handout;
                                 ],
                             ];
                         ?>
-                        <div class="d-flex align-items-start flex-wrap">
+                        <div class="d-inline-flex align-items-start flex-wrap mr-auto">
                             <?php $emptyNoteICDs = true; ?>
                                 @foreach ($noteICDData as $noteICDKey => $noteICD)
                                     <?php
@@ -1199,6 +1199,46 @@ use App\Models\Handout;
                                 <small class="text-dark">-</small>
                             @endif
                         </div>
+                        <div class="on-hover-show d-block on-hover-opaque position-relative mx-1">
+                            <i class="fa fa-info-circle"></i>
+                            <div class="on-hover-content p-0 border-0 max-width-unset bg-white">
+                                <table class="table table-sm m-0 table-bordered border-0">
+                                    <thead>
+                                    <tr class="bg-light">
+                                        <th class="border-bottom-0">Created</th>
+                                        <th class="min-width-140px border-bottom-0">Reason 1</th>
+                                        <th class="min-width-140px border-bottom-0">Reason 2</th>
+                                        <th class="min-width-140px border-bottom-0">Reason 3</th>
+                                        <th class="min-width-140px border-bottom-0">Reason 4</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    @foreach($note->reasonsLog as $log)
+                                        <tr>
+                                            <td class="text-nowrap">{{friendly_date_time($log->created_at)}}</td>
+                                            <td>
+                                                {{$log->note_reason_icd1}}
+                                                <div class="text-sm text-secondary">{{$log->note_reason_icd1description}}</div>
+                                            </td>
+                                            <td>
+                                                {{$log->note_reason_icd2}}
+                                                <div class="text-sm text-secondary">{{$log->note_reason_icd2description}}</div>
+                                            </td>
+                                            <td>
+                                                {{$log->note_reason_icd3}}
+                                                <div class="text-sm text-secondary">{{$log->note_reason_icd3description}}</div>
+                                            </td>
+                                            <td>
+                                                {{$log->note_reason_icd4}}
+                                                <div class="text-sm text-secondary">{{$log->note_reason_icd4description}}</div>
+                                            </td>
+                                        </tr>
+                                    @endforeach
+                                    </tbody>
+                                </table>
+                            </div>
+                        </div>
+                        <div></div>
                     </div>
                     @if(!empty($note->note_reason_memo))
                         <div style="padding-left: 60px;">