Эх сурвалжийг харах

Pre-demo UI/logic updates #2

Vijayakrishnan Krishnan 4 жил өмнө
parent
commit
010ce0b057

+ 62 - 42
resources/views/app/patient/note/dashboard.blade.php

@@ -34,6 +34,7 @@
         <div class="card-header d-flex align-items-start px-3 border-bottom-0">
             <div class="pr-2">
                 {{$note->title}}
+                @if(!$note->is_signed_by_hcp)
                 <div moe>
                     <a href="" show start><i class="fa fa-edit"></i></a>
                     <form url="/api/note/putTitle">
@@ -48,47 +49,53 @@
                         </div>
                     </form>
                 </div>
+                @endif
             </div>
             <div class="px-2 border-left border-right">
                 <div class="d-flex">
                     <span class="mr-2">{{friendly_date_time($note->effective_dateest, false)}}</span>
+                    @if(!$note->is_signed_by_hcp)
                     <span moe class="ml-auto">
-                    <a href="" show start><i class="fa fa-calendar"></i></a>
-                    <form url="/api/note/putEffectiveDateEST">
-                        <input type="hidden" name="uid" value="{{$note->uid}}">
-                        <div class="mb-2">
-                            <label for="" class="text-secondary text-sm">Effective date EST</label>
-                            <input type="date" name="effectiveDateEST" value="{{$note->effective_dateest}}" class="form-control form-control-sm">
-                        </div>
-                        <div class="mb-0">
-                            <button class="btn btn-primary btn-sm" submit>Submit</button>
-                            <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-                        </div>
-                    </form>
-                </span>
+                        <a href="" show start><i class="fa fa-calendar"></i></a>
+                        <form url="/api/note/putEffectiveDateEST">
+                            <input type="hidden" name="uid" value="{{$note->uid}}">
+                            <div class="mb-2">
+                                <label for="" class="text-secondary text-sm">Effective date EST</label>
+                                <input type="date" name="effectiveDateEST" value="{{$note->effective_dateest}}" class="form-control form-control-sm">
+                            </div>
+                            <div class="mb-0">
+                                <button class="btn btn-primary btn-sm" submit>Submit</button>
+                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                            </div>
+                        </form>
+                    </span>
+                    @endif
                 </div>
                 <div class="d-flex">
                     <span class="mr-2">{{friendly_time($note->effective_time)}}</span>
+                    @if(!$note->is_signed_by_hcp)
                     <span moe class="ml-auto">
-                    <a href="" show start><i class="fa fa-clock"></i></a>
-                    <form url="/api/note/putEffectiveTime">
-                        <input type="hidden" name="uid" value="{{$note->uid}}">
-                        <div class="mb-2">
-                            <label for="" class="text-secondary text-sm">Effective time </label>
-                            <input type="time" name="effectiveTime" value="{{ date("H:i", strtotime($note->effective_time)) }}" class="form-control form-control-sm">
-                        </div>
-                        <div class="mb-0">
-                            <button class="btn btn-primary btn-sm" submit>Submit</button>
-                            <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-                        </div>
-                    </form>
-                </span>
+                        <a href="" show start><i class="fa fa-clock"></i></a>
+                        <form url="/api/note/putEffectiveTime">
+                            <input type="hidden" name="uid" value="{{$note->uid}}">
+                            <div class="mb-2">
+                                <label for="" class="text-secondary text-sm">Effective time </label>
+                                <input type="time" name="effectiveTime" value="{{ date("H:i", strtotime($note->effective_time)) }}" class="form-control form-control-sm">
+                            </div>
+                            <div class="mb-0">
+                                <button class="btn btn-primary btn-sm" submit>Submit</button>
+                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                            </div>
+                        </form>
+                    </span>
+                    @endif
                 </div>
             </div>
 
             <div class="px-2">
                 <div class="d-flex">
                     <span class="mr-2"><span class="text-secondary">HCP:</span> {{$note->hcpPro->name_display}}</span>
+                    @if(!$note->is_signed_by_hcp)
                     <div moe class="ml-auto">
                         <a href="" show start><i class="fa fa-edit"></i></a>
                         <form url="/api/note/putHcp">
@@ -107,6 +114,7 @@
                             </div>
                         </form>
                     </div>
+                    @endif
                 </div>
                 {{--<div class="d-flex">
                     <span class="mr-2"><span class="text-secondary">Ally:</span> {{$note->allyPro ? $note->allyPro->name_display : '-'}}</span>
@@ -186,10 +194,10 @@
                                 <input type="hidden" name="noteUid" value="{{$note->uid}}">
                                 <div class="mb-2">
                                     <label for="" class="text-secondary text-sm">Effective Date</label>
-                                    <input type="date" name="effectiveDate" class="form-control form-control-sm" required>
+                                    <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
                                 </div>
                                 <div class="mb-2">
-                                    <select class="form-control" name="code" value="">
+                                    <select autofocus class="form-control" name="code" value="">
                                         <option value="">-- Select Code --</option>
                                         <?php $noteRates = $pro->noteRates(); ?>
                                         @if($noteRates && count($noteRates))
@@ -282,6 +290,8 @@
                             <thead class="bg-light">
                             <tr>
                                 <th class="border-bottom-0 w-25 pl-3">Code</th>
+                                <th class="border-bottom-0 w-25 pl-2">Reason</th>
+                                <th class="border-bottom-0 w-25 pl-2">Amount</th>
                                 <th class="border-bottom-0"></th>
                             </tr>
                             </thead>
@@ -289,17 +299,28 @@
                             @foreach ($note->bills as $bill)
                                 <tr>
                                     <td class="pl-3 {{ $bill->is_cancelled ? 'text-secondary' : '' }}">{{$bill->code}}</td>
+                                    <td class="pl-2">
+                                        {{ $bill->reason1 }}
+                                        <div class="text-secondary small">{{ $bill->reason2 }}</div>
+                                    </td>
+                                    <td class="pl-2">
+                                        @if($bill->has_hcp_been_paid)
+                                            <span class="text-dark">Received:</span><span class="font-weight-bold text-success ml-2">${{ $bill->hcp_payment_amount }}</span>
+                                        @else
+                                            <span class="text-dark">Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->hcp_expected_payment_amount ? '$' . $bill->hcp_expected_payment_amount : '-' }}</span>
+                                        @endif
+                                    </td>
                                     <td>
-                                        <div class="d-flex align-items-center">
+                                        <div class="">
                                             @if(!$bill->is_cancelled)
                                                 @if($bill->is_signed_by_hcp)
-                                                    <span class="text-secondary">
-                                                <i class="fa fa-check"></i>
-                                                HCP Signed
-                                            </span>
+                                                    <div class="d-block text-secondary">
+                                                        <i class="fa fa-check"></i>
+                                                        HCP Signed
+                                                    </div>
                                                 @else
                                                     <div moe
-                                                         class="{{ $bill->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
+                                                         class="d-block {{ $bill->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
                                                          title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s HCP can sign' : '' }}">
                                                         <a class="" href="" show start>Sign as HCP</a>
                                                         <form url="/api/bill/signAsHcp">
@@ -312,15 +333,14 @@
                                                         </form>
                                                     </div>
                                                 @endif
-                                                <span class="mx-2 text-secondary">|</span>
                                             @endif
                                             @if($bill->is_cancelled)
-                                                <span class="text-secondary">
-                                            Cancelled
-                                        </span>
+                                                <div class="d-block text-secondary">
+                                                    Cancelled
+                                                </div>
                                             @else
-                                                <div moe>
-                                                    <a class="" href="" show start>Cancel</a>
+                                                <div class="d-block" moe>
+                                                    <a class="text-danger" href="" show start>Cancel</a>
                                                     <form url="/api/bill/markCancelled">
                                                         <input type="hidden" name="uid" value="{{$bill->uid}}">
                                                         <p>Cancel this bill?</p>
@@ -349,10 +369,10 @@
                                 <input type="hidden" name="noteUid" value="{{$note->uid}}">
                                 <div class="mb-2">
                                     <label for="" class="text-secondary text-sm">Effective Date</label>
-                                    <input type="date" name="effectiveDate" class="form-control form-control-sm" required>
+                                    <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
                                 </div>
                                 <div class="mb-2">
-                                    <select class="form-control" name="code" value="">
+                                    <select autofocus class="form-control" name="code" value="">
                                         <option value="">-- Select Code --</option>
                                         <?php $noteRates = $pro->noteRates(); ?>
                                         @if($noteRates && count($noteRates))

+ 10 - 0
resources/views/app/patient/notes.blade.php

@@ -118,6 +118,7 @@
             <thead>
             <tr>
                 <th class="px-2 text-secondary border-bottom-0">Created</th>
+                <th class="px-2 text-secondary border-bottom-0 w-50">Content</th>
                 <th class="px-2 text-secondary border-bottom-0">Effective Date</th>
                 <th class="px-2 text-secondary border-bottom-0">HCP</th>
                 {{--<th class="px-2 text-secondary border-bottom-0">Ally</th>--}}
@@ -129,6 +130,15 @@
                     <td class="px-2">
                         {{ friendly_date_time($note->created_at, true) }}
                     </td>
+                    <td class="px-2">
+                        <?php
+                        $textContent = strip_tags($note->free_text_html);
+                        if(strlen($textContent) > 200) {
+                            $textContent = substr($textContent, 0, 200) . '…';
+                        }
+                        ?>
+                        {!! $textContent !!}
+                    </td>
                     <td class="px-2">
                         <a href="/patients/view/{{ $patient->uid }}/notes/view/{{ $note->uid }}" class="font-weight-bold">
                             {{ friendly_date_time($note->effective_dateest, false) }}