|
@@ -3,42 +3,68 @@
|
|
|
<h4 class="font-weight-bold m-0 font-size-14"><i class="fa fa-prescription mr-2"></i>ERx</h4>
|
|
|
<span class="mx-2 text-secondary">|</span>
|
|
|
<a class="py-0 font-weight-normal c-pointer" v-on:click.prevent="showPopup('erx-popup')">Add</a>
|
|
|
+ <select class="ml-auto max-width-300px form-control form-control-sm"
|
|
|
+ onchange="fastLoad('/patients/view/{{$patient->uid}}/action-items-erx/' + this.value, true, false, false)">
|
|
|
+ <option value="open" {{ $filter === 'open' ? 'selected' : '' }}>Open tickets</option>
|
|
|
+ <option value="closed" {{ $filter === 'closed' ? 'selected' : '' }}>Closed tickets</option>
|
|
|
+ <option value="all" {{ $filter === 'all' ? 'selected' : '' }}>All tickets</option>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- <table class="table table-sm table-bordered mb-0" style="table-layout: fixed">
|
|
|
+ <table class="table table-sm table-bordered mb-0">
|
|
|
<thead>
|
|
|
<tr class="bg-light">
|
|
|
<th class="px-2 text-secondary border-bottom-0 width-30px">#</th>
|
|
|
<th class="px-2 text-secondary border-bottom-0">Medication</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Strength</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Amount</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Route</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Frequency</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Dispense</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Refills</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Purpose</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0">Pharmacy</th>
|
|
|
- <th class="px-2 text-secondary border-bottom-0"> </th>
|
|
|
+ <th class="px-2 text-secondary border-bottom-0 width-200px">Pharmacy</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr v-for="(item, index) in items" :class="item.is_open ? '' : 'opacity-60'">
|
|
|
+ <tr v-for="(item, index) in items" :class="item.is_open ? '' : 'opacity-60 bg-light'">
|
|
|
<td class="px-2">@{{ index + 1 }}</td>
|
|
|
- <td class="px-2">@{{item.medication}}</td>
|
|
|
- <td class="px-2">@{{item.strength}}</td>
|
|
|
- <td class="px-2">@{{item.amount}}</td>
|
|
|
- <td class="px-2">@{{item.route}}</td>
|
|
|
- <td class="px-2">@{{item.frequency}}</td>
|
|
|
- <td class="px-2">@{{item.dispense}} <span class="text-secondary" v-html="inWords(item.dispense)"></span></td>
|
|
|
- <td class="px-2">@{{item.refills}}</td>
|
|
|
- <td class="px-2">@{{item.purpose}}</td>
|
|
|
- <td class="px-2">@{{item.pharmacy}}</td>
|
|
|
<td class="px-2">
|
|
|
+ <div class="d-flex align-items-center flex-wrap">
|
|
|
+ <a href="#" class="font-weight-bold">@{{item.medication}}</a>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.strength">
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span>@{{item.strength}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.amount">
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span>@{{item.amount}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.route">
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span>@{{item.route}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.frequency">
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span>@{{item.frequency}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.dispense">
|
|
|
+ <span>
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span>Dispense:</span> @{{item.dispense}}
|
|
|
+ <span class="text-secondary ml-1" v-html="inWords(item.dispense)"></span>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.refills">
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span><span>Refills:</span> @{{item.refills}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="d-inline-flex align-items-center" v-if="item.purpose">
|
|
|
+ <span class="mx-2 text-secondary">•</span>
|
|
|
+ <span><span>Purpose:</span> @{{item.purpose}}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td class="px-2">@{{item.pharmacy ? item.pharmacy : '-'}}</td>
|
|
|
+ {{--<td class="px-2">
|
|
|
<a class="mr-2 c-pointer" v-on:click.prevent="showPopup('erx-popup', item)">Edit</a>
|
|
|
<a class="mr-2 c-pointer" v-if="item.is_open" v-on:click.prevent="closeItem(item)">Close</a>
|
|
|
<a class="mr-2 c-pointer" v-if="!item.is_open" v-on:click.prevent="openItem(item)">Open</a>
|
|
|
-
|
|
|
+
|
|
|
@include('app.patient.partials.ticket_action_links')
|
|
|
- </td>
|
|
|
+ </td>--}}
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
@@ -162,8 +188,12 @@
|
|
|
<script>
|
|
|
(function() {
|
|
|
<?php
|
|
|
- $tickets = $patient->tickets->filter(function($_item) {
|
|
|
- return $_item->category === 'erx';
|
|
|
+ $tickets = $patient->tickets->filter(function($_item) use ($filter) {
|
|
|
+ $match = $_item->category === 'erx';
|
|
|
+ if($filter !== 'all') {
|
|
|
+ $match = $match && ($filter === 'open' ? $_item->is_open : !$_item->is_open);
|
|
|
+ }
|
|
|
+ return $match;
|
|
|
});
|
|
|
$items = [];
|
|
|
foreach ($tickets as $ticket) {
|