Vijayakrishnan Krishnan 4 år sedan
förälder
incheckning
f48fd43cf7

+ 32 - 0
resources/views/app/patient/note/_create-bill.blade.php

@@ -0,0 +1,32 @@
+<span class="mx-2 text-secondary">|</span>
+<span moe class="">
+    <a class="" href="" show start>Create Bill</a>
+    <form url="/api/bill/createForNote">
+        <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" value="{{date('Y-m-d')}}" required>
+        </div>
+        <div class="mb-2">
+            <select autofocus class="form-control" name="code">
+                <option value="">-- Select Code --</option>
+                <?php $noteRates = $pro->noteRates(); ?>
+                @if($noteRates && count($noteRates))
+                    @foreach($noteRates as $noteRate)
+                        <option value="{{ $noteRate->code }}">{{ $noteRate->code }}</option>
+                    @endforeach
+                @endif
+            </select>
+        </div>
+        <div class="mb-2">
+            <input type="text" name="reason1" placeholder="Reason 1" class="form-control form-control-sm">
+        </div>
+        <div class="mb-2">
+            <input type="text" name="reason2" placeholder="Reason 2" class="form-control form-control-sm">
+        </div>
+        <div class="">
+            <button class="btn btn-primary btn-sm" submit>Submit</button>
+            <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+        </div>
+    </form>
+</span>

+ 25 - 81
resources/views/app/patient/note/dashboard.blade.php

@@ -93,23 +93,26 @@
                     </span>
                     @endif
                 </div>
+            </div>
+
+            <div class="px-2 border-left border-right">
                 <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>
+                        <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>
                     @endif
                 </div>
             </div>
@@ -165,39 +168,6 @@
                     </div>
                 </div>
                 <div class="pl-2 border-left">
-                    <div class="d-flex justify-content-end">
-                        <div moe relatve class="">
-                            <a class="" href="" show start>Create Bill</a>
-                            <form url="/api/bill/createForNote" right>
-                                <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" value="{{date('Y-m-d')}}" required>
-                                </div>
-                                <div class="mb-2">
-                                    <select autofocus class="form-control" name="code">
-                                        <option value="">-- Select Code --</option>
-                                        <?php $noteRates = $pro->noteRates(); ?>
-                                        @if($noteRates && count($noteRates))
-                                            @foreach($noteRates as $noteRate)
-                                                <option value="{{ $noteRate->code }}">{{ $noteRate->code }}</option>
-                                            @endforeach
-                                        @endif
-                                    </select>
-                                </div>
-                                <div class="mb-2">
-                                    <input type="text" name="reason1" placeholder="Reason 1" class="form-control form-control-sm">
-                                </div>
-                                <div class="mb-2">
-                                    <input type="text" name="reason2" placeholder="Reason 2" class="form-control form-control-sm">
-                                </div>
-                                <div class="">
-                                    <button class="btn btn-primary btn-sm" submit>Submit</button>
-                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-                                </div>
-                            </form>
-                        </div>
-                    </div>
                     <div class="d-flex justify-content-end">
                         @if(!$note->is_cancelled)
                         <div moe relatve
@@ -278,19 +248,24 @@
 
                 @if($note->bills->count())
                     <div class="mt-2 px-3">
-                        <p class="font-weight-bold mb-2 text-secondary">Bills</p>
+                        <div class="d-flex align-items-center mb-2">
+                            <p class="font-weight-bold text-secondary m-0">Bills</p>
+                            @include('app/patient/note/_create-bill')
+                        </div>
                         <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
                             <thead class="bg-light">
                             <tr>
+                                <th class="border-bottom-0 w-25 pl-3">HCP</th>
                                 <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 pl-2">Amount</th>
                                 <th class="border-bottom-0"></th>
                             </tr>
                             </thead>
                             <tbody>
                             @foreach ($note->bills as $bill)
                                 <tr>
+                                    <td class="pl-3">{{ $bill->hcp->displayName() }}</td>
                                     <td class="pl-3 {{ $bill->is_cancelled ? 'text-secondary' : '' }}">{{$bill->code}}</td>
                                     <td class="pl-2">
                                         {{ $bill->reason1 }}
@@ -354,38 +329,7 @@
                 @else
                     <div class="my-3 px-3 d-flex">
                         <p class="font-weight-bold mb-0 text-secondary">No bills in this note</p>
-                        <span class="mx-2 text-secondary">|</span>
-                        <span moe class="">
-                            <a class="" href="" show start>Create Bill</a>
-                            <form url="/api/bill/createForNote">
-                                <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" value="{{date('Y-m-d')}}" required>
-                                </div>
-                                <div class="mb-2">
-                                    <select autofocus class="form-control" name="code">
-                                        <option value="">-- Select Code --</option>
-                                        <?php $noteRates = $pro->noteRates(); ?>
-                                        @if($noteRates && count($noteRates))
-                                            @foreach($noteRates as $noteRate)
-                                                <option value="{{ $noteRate->code }}">{{ $noteRate->code }}</option>
-                                            @endforeach
-                                        @endif
-                                    </select>
-                                </div>
-                                <div class="mb-2">
-                                    <input type="text" name="reason1" placeholder="Reason 1" class="form-control form-control-sm">
-                                </div>
-                                <div class="mb-2">
-                                    <input type="text" name="reason2" placeholder="Reason 2" class="form-control form-control-sm">
-                                </div>
-                                <div class="">
-                                    <button class="btn btn-primary btn-sm" submit>Submit</button>
-                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-                                </div>
-                            </form>
-                        </span>
+                        @include('app/patient/note/_create-bill')
                     </div>
                 @endif
             </div>