Samson Mutunga 3 yıl önce
ebeveyn
işleme
c8c8195eec

+ 4 - 0
app/Models/Client.php

@@ -1034,4 +1034,8 @@ ORDER BY m.ts DESC
         return $this->hasOne(Pro::class, 'id', 'flag_acknowledged_by_pro_id');
     }
 
+    public function clientRepFollowUp(){
+        return $this->hasOne(ClientRepFollowUp::class, 'id', 'client_rep_follow_up_id');
+    }
+
 }

+ 15 - 0
app/Models/ClientRepFollowUp.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Models;
+
+# use Illuminate\Database\Eloquent\Model;
+
+class ClientRepFollowUp extends Model
+{
+    protected $table = 'client_rep_follow_up';
+
+    public function pro(){
+        return $this->hasOne(Pro::class, 'id', 'client_rep_pro_id');
+    }
+
+}

+ 97 - 0
resources/views/app/patient/partials/fu-form.blade.php

@@ -0,0 +1,97 @@
+<div moe wide>
+    <a href="#" start show class="d-flex align-items-baseline" title="Next FU">Next FU</a>
+    <form url="/api/client/putClientRepFollowUp" class="mcp-theme-1">
+        <div id="viewNextFuData" class="{{ $patient->clientRepFollowUp ? '':'d-none' }}">
+            @if($patient->clientRepFollowUp)
+            <a id="updateNextFu" class="c-pointer">Update</a>
+            <table class="table table-sm table-striped table-bordered">
+                <tr>
+                    <td><b>Created At</b></td>
+                    <td>{{ friendly_date_time($patient->clientRepFollowUp->created_at) }}</td>
+                </tr>
+                <tr>
+                    <td><b>Updated At</b></td>
+                    <td>{{ friendly_date_time($patient->clientRepFollowUp->updated_at) }}</td>
+                </tr>
+                <tr>
+                    <td><b>Client Rep</b></td>
+                    <td>{{ $patient->clientRepFollowUp->pro->displayName() }}</td>
+                </tr>
+                <tr>
+                    <td><b>Next Followup Date</b></td>
+                    <td>{{ friendly_date_time($patient->clientRepFollowUp->next_follow_up_date) }}</td>
+                </tr>
+                <tr>
+                    <td><b>Next Followup Reason</b></td>
+                    <td>{{ $patient->clientRepFollowUp->next_follow_up_reason }}</td>
+                </tr>
+                <tr>
+                    <td><b>Next Followup Memo</b></td>
+                    <td>{{ $patient->clientRepFollowUp->next_follow_up_memo }}</td>
+                </tr>
+            </table>
+            @endif
+        </div>
+        <div id="updateNextFuData" class="{{ $patient->clientRepFollowUp ? 'd-none':'' }}">
+            <a id="showNextFu" class="c-pointer">Show FU</a>
+            <input type="hidden" name="uid" value="{{ $patient->uid }}">
+            <div class="mb-2">
+                <label for="" class="text-sm text-secondary mb-1">Next Calling Date</label>
+                <input type="date" class="form-control input-sm" name="nextFollowUpDate" value="{{ $patient->next_follow_up_date }}" />
+            </div>
+            <div class="mb-2">
+                <label for="" class="text-sm text-secondary mb-1">Call Assigned To</label>
+                <select provider-search name="clientRepProUid" class="form-control input-sm">
+                </select>
+            </div>
+            <div class="mb-2">
+                <label for="" class="text-sm text-secondary mb-1">Call Reason</label>
+                <select name="nextFollowUpReason" class="form-control input-sm">
+                    <option value=""></option>
+                    <option>Appointment Confirmation</option>
+                    <option>New Appointment</option>
+                    <option>Missed Appointment</option>
+                    <option>Appointment Reschedule</option>
+                    <option>Appointment Cancellation</option>
+                    <option>Response to Pt's Voicemail</option>
+                    <option>Regarding ERx/Lab/Image Orders</option>
+                    <option>Regarding Supply Orders</option>
+                    <option>Regarding RPM</option>
+                    <option>Pt Profile Related Matters</option>
+                    <option>Pt Insurance Related Matters</option>
+                    <option>Incoming Referrals</option>
+                    <option>Outgoing Referrals</option>
+                    <option>Insurance Verification</option>
+                    <option>Questions Related to Past Visit</option>
+                    <option>Provider Recommended follow-up</option>
+                    <option>Care Coordination</option>
+                    <option>Patient Consent</option>
+                    <option>Patient Feedback</option>
+                    <option>Goals Follow Up</option>
+                    <option>Other-- (check recent memo)</option>
+                </select>
+            </div>
+            <div class="mb-2">
+                <label for="" class="text-sm text-secondary mb-1">Memo</label>
+                <textarea class="form-control input-sm" name="nextFollowUpMemo"></textarea>
+            </div>
+            <div class="d-flex align-items-center">
+                <button class="btn btn-sm btn-primary mr-2" submit>Submit</button>
+                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+            </div>
+        </div>
+    </form>
+</div>
+
+<script>
+    $(document).ready(function() {
+        $('#updateNextFu').click(function(){
+            $('#viewNextFuData').addClass('d-none');
+            $('#updateNextFuData').removeClass('d-none');
+        });
+        $('#showNextFu').click(function(){
+            $('#viewNextFuData').removeClass('d-none');
+            $('#updateNextFuData').addClass('d-none');
+        });
+    });
+</script>

+ 2 - 1
resources/views/app/patient/partials/quick-actions-buttons.blade.php

@@ -48,7 +48,8 @@
 		<a href="#" start class="ml-2 d-block" show onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i class="fa fa-eye mr-1"></i></a>
 	</div>
 	@endif
-	<div>
+	<div class="mr-2">
 		<a href="#" start class="ml-2 d-block" show onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i class="fa fa-video mr-1"></i></a>
 	</div>
+	@include('app.patient.partials.fu-form')
 </div>