Vijayakrishnan преди 3 години
родител
ревизия
006e0706fb
променени са 1 файла, в които са добавени 20 реда и са изтрити 35 реда
  1. 20 35
      resources/views/app/patient/prescriptions/list.blade.php

+ 20 - 35
resources/views/app/patient/prescriptions/list.blade.php

@@ -47,17 +47,15 @@
                                class="text-nowrap"
                                :class="currentPrescription && currentPrescription.id === prescription.id ? 'font-weight-bold' : ''">
                                 @{{prescription.created_at_friendly_short}}
-                            </a>
-                            <div class="mt-1">
+                                |
                                 <b class="text-sm">@{{prescription.erx_category}}</b>
-                                /
-                                <span class="text-sm">@{{prescription.hcpProDisplayName}}</span>
-                            </div>
+                            </a>
+                            <div v-if="currentPrescription" class="text-sm">@{{prescription.hcpProDisplayName}}</div>
                             @if(@$note)
-                                <div v-if="prescription.note_id === {{$note->id}}" class="text-sm text-info mt-1 text-nowrap">* From this note</div>
+                                <div v-if="prescription.note_id === {{$note->id}}" class="text-sm text-info text-nowrap">* From this note</div>
                             @endif
                         </div>
-                        <div v-if="prescription.pro_declared_status === 'CANCELLED'" class="text-sm text-secondary font-weight-bold mt-1 text-sm d-flex align-items-baseline">
+                        <div v-if="currentPrescription && prescription.pro_declared_status === 'CANCELLED'" class="text-sm text-secondary font-weight-bold mt-1 text-sm d-flex align-items-baseline">
                             <i class="fa fa-ban mr-1 text-sm"></i>
                             CANCELLED
                         </div>
@@ -134,30 +132,18 @@
         </div>
         <div v-if="currentPrescription" class="border-top border-right border-bottom align-self-stretch p-3 flex-grow-1 min-width-50">
             <div class="d-flex align-items-center">
-                <h3 class="font-size-16 m-0">
-                    <b class="mr-1 font-size-16">@{{ currentPrescription.erx_category }} ERx <span class="ml-2">@{{ currentPrescription.created_at_friendly_short }}</span></b>
+                <h3 class="font-size-16 m-0 d-flex align-items-baseline">
+                    <b class="mr-1 font-size-16">@{{ currentPrescription.erx_category }} ERx <span class="ml-2">@{{ currentPrescription.created_at_friendly }}</span></b>
+                    @if(@$note)
+                        <div v-if="currentPrescription.note_id === {{$note->id}}" class="text-info mt-1 font-weight-bold text-nowrap ml-2">* From this note</div>
+                    @endif
                 </h3>
                 <a class="ml-auto" href="#" v-on:click.prevent="setCurrentPrescription(null);">
                     <i class="fa fa-times-circle on-hover-opaque"></i>
                 </a>
             </div>
             <hr class="my-3">
-            <div class="pb-2 d-flex align-items-start">
-                <span class="min-width-140px text-secondary text-sm">Created</span>
-                <div>
-                    <span class="text-nowrap">@{{currentPrescription.created_at_friendly}}</span>
-                    @if(@$note)
-                        <div v-if="currentPrescription.note_id === {{$note->id}}" class="text-info mt-1 font-weight-bold text-nowrap">* From this note</div>
-                    @endif
-                </div>
-            </div>
-            @if(!request()->input('erx_category'))
-            <div class="pb-2 d-flex align-items-center">
-                <span class="min-width-140px text-secondary text-sm">Type</span>
-                <span>@{{currentPrescription.erx_category}}</span>
-            </div>
-            @endif
-            <div class="pb-2 d-flex align-items-baseline" v-if="currentPrescription.erx_category !== 'DRUG'">
+            <div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category !== 'DRUG'">
                 <span class="min-width-140px text-secondary text-sm">Clinical</span>
                 <div class="d-inline-flex align-items-baseline flex-grow-1">
                     <a v-if="!currentPrescription.has_hcp_pro_signed" class="mr-2" href="#" v-on:click.prevent="editClinicalDetails(currentPrescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
@@ -196,8 +182,7 @@
                     <div v-else>-</div>
                 </div>
             </div>
-            <div class="pb-2 d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'DRUG'">
-                <span class="min-width-140px text-secondary text-sm">Medications</span>
+            <div class="d-flex align-items-baseline" v-if="currentPrescription.erx_category === 'DRUG'">
                 <div class="flex-grow-1">
 
                     <div v-if="currentPrescription.clinical_detail_json">
@@ -210,12 +195,12 @@
                                 <div class="d-flex align-items-baseline">
                                     <b class="mr-2">@{{drug.medication ?? '-'}}</b>
                                 </div>
-                                <div v-if="drug.instructions" class="d-flex align-items-baseline text-secondary font-italic">
-                                    @{{ drug.instructions }}
+                                <div v-if="drug.instructions" class="d-inline-flex align-items-baseline text-secondary font-italic mr-2">
+                                    <span class="text-secondary">Instructions: @{{ drug.instructions }}</span>
                                 </div>
                                 <div class="d-flex align-items-baseline">
                                     <span class="text-secondary">Dispense:</span>
-                                    <span class="ml-1">@{{ drug.dispense ? drug.dispense : '-' }}</span>
+                                    <span class="ml-1 mr-2">@{{ drug.dispense ? drug.dispense : '-' }}</span>
                                     <span class="text-secondary ml-2">Refills:</span>
                                     <span class="ml-1">@{{ drug.refills ? drug.refills : '-' }}</span>
                                 </div>
@@ -224,7 +209,7 @@
                     </div>
 
                     @if(@$note)
-                    <div class="d-flex align-items-center mt-3" v-if="!currentPrescription.has_hcp_pro_signed">
+                    <div class="d-flex align-items-center" v-if="!currentPrescription.has_hcp_pro_signed">
                         <a href="#" class="d-block mb-1 mr-2" v-on:click.prevent="setAddMode('existing')">+ Existing</a>
                         <a href="#" class="d-block mb-1" v-on:click.prevent="setAddMode('new')">+ New</a>
                     </div>
@@ -242,7 +227,7 @@
                 <table class="m-0 table table-sm border bg-white table-hover table-bordered">
                     <tr class="bg-light">
                         <th class="align-bottom text-secondary">Medication</th>
-                        <!--<th class="align-bottom">Instructions<br>To Pharmacist</th>
+                        <!--<th class="align-bottom">Instructions</th>
                         <th class="align-bottom">Dispense</th>
                         <th class="align-bottom">Refills</th>-->
                         <th class="align-bottom text-secondary">Instructions/Dispense/Refills</th>
@@ -252,7 +237,7 @@
                         <td class="width-200px">@{{ drug.data.name }}</td>
                         <td>
                             <div class="d-flex align-items-center mb-1">
-                                <span class="text-sm min-width-80px">Instructions<br>to Pharmacist</span>
+                                <span class="text-sm min-width-80px">Instructions</span>
                                 <input type="text" class="form-control form-control-sm min-width-unset shadow-none flex-grow-1" v-model="drug.data.instructions">
                             </div>
                             <div class="row mb-1">
@@ -321,7 +306,7 @@
                     </div>
                     <div class="row mb-2">
                         <div class="col-12">
-                            <label class="text-sm text-secondary mb-0">Instructions To Pharmacist</label>
+                            <label class="text-sm text-secondary mb-0">Instructions</label>
                             <input type="text" data-name="instructions"
                                    class="form-control form-control-sm min-width-unset">
                         </div>
@@ -769,7 +754,7 @@ GROUP BY erx_category");
                             let payload = {
                                 noteUid: '{{ @$note ? $note->uid : '' }}',
                                 clientUid: '{{$patient->uid}}',
-                                hcpProUid: '{{$patient->mcp ? $patient->mcp->uid : ''}}',
+                                hcpProUid: '{{@$note && $note->hcpPro ? $note->hcpPro->uid : ($patient->mcp ? $patient->mcp->uid : '')}}',
                                 erxCategory: _type
                             };
                             $.post('/api/erx/create', payload, _data => {