|
@@ -0,0 +1,169 @@
|
|
|
+<?php
|
|
|
+ $isProTypeAdmin = $pro->pro_type === 'ADMIN';
|
|
|
+?>
|
|
|
+<div class="mb-2 pt-3 pb-2 border-top">
|
|
|
+ <div class="">
|
|
|
+ <div class="d-flex align-items-start pb-2">
|
|
|
+ <h6 class="my-0 font-weight-bold">Client Memos</h6>
|
|
|
+ </div>
|
|
|
+ <div moe class="w-100 p-2 border mb-3">
|
|
|
+ <form url="/api/clientMemo/create" show>
|
|
|
+ <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
+ <label class="text-secondary font-weight-bold">+ New Memo</label>
|
|
|
+ <div class="mb-2">
|
|
|
+ <select class="form-control form-control-sm" name="category" required>
|
|
|
+ <option value="">-- select --</option>
|
|
|
+ <option value="Incoming Call">Incoming Call</option>
|
|
|
+ <option value="Outgoing Call">Outgoing Call</option>
|
|
|
+ <option value="Call Unspecified">Call Unspecified</option>
|
|
|
+ <option value="Other">Other</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <textarea class="form-control form-control-sm" rows="5" name="content" placeholder="Content"></textarea>
|
|
|
+ </div>
|
|
|
+ @if ($isProTypeAdmin)
|
|
|
+ <div class="mb-2">
|
|
|
+ <label for="" class="checkbox">
|
|
|
+ <input type="checkbox" name="isAdminOnly">
|
|
|
+ Admins only
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <table class="table table-striped table-sm table-bordered mb-0">
|
|
|
+ @if ($clientMemos && count($clientMemos))
|
|
|
+ <thead class="bg-light">
|
|
|
+ <tr class="text-nowrap">
|
|
|
+ <th class="border-0 text-secondary">Category</th>
|
|
|
+ <th class="border-0 text-secondary w-50">Summary</th>
|
|
|
+ <th class="border-0 text-secondary">Created</th>
|
|
|
+ @if ($isProTypeAdmin)
|
|
|
+ <th class="border-0 text-secondary">Admins Only</th>
|
|
|
+ @endif
|
|
|
+ <th class="border-0 text-secondary">Ack. by MCP</th>
|
|
|
+ <th class="border-0 text-secondary delete-column"> </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach ($clientMemos as $memo)
|
|
|
+ <?php $memoCreatedBy = $memo->createdBy->pro; ?>
|
|
|
+ @if (!$memo->is_admin_only || ($memo->is_admin_only && $isProTypeAdmin))
|
|
|
+ <tr>
|
|
|
+ <td class="text-nowrap">{{ $memo->category }}</td>
|
|
|
+ <td class="px-2">
|
|
|
+ <pre class="m-0 break-spaces">{{ $memo->content }}</pre>
|
|
|
+ </td>
|
|
|
+ <td class="text-nowrap">
|
|
|
+ <strong>{{ $memoCreatedBy->displayName() }}</strong><br />
|
|
|
+ {{ friendly_date_time($memo->created_at) }}
|
|
|
+ </td>
|
|
|
+ @if ($isProTypeAdmin)
|
|
|
+ <td class="text-secondary">
|
|
|
+ @if ($memo->is_admin_only)
|
|
|
+ <span class="text-success"><i class="fas fa-lock"></i> YES</span>
|
|
|
+ @else
|
|
|
+ <span><i class="fas fa-unlock"></i> NO</span>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ @endif
|
|
|
+ <td>
|
|
|
+ @if ($memo->mcp_stamp_id)
|
|
|
+ <span class="text-success">YES <i class="fas fa-info-circle c-pointer"
|
|
|
+ data-toggle="tooltip" data-placement="bottom"
|
|
|
+ title="{{ friendly_date_time($memo->stamp->created_at) }}"></i></span>
|
|
|
+ @else
|
|
|
+ <span class="text-secondary">NO</span>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td class="text-center delete-column">
|
|
|
+ @if ($isProTypeAdmin)
|
|
|
+ <div moe relative bottom class="mr-2">
|
|
|
+ <a start show><i class="fa fa-history"></i></a>
|
|
|
+ <div action="" url right bottom>
|
|
|
+ <table class="table table-condensed table-striped table-sm">
|
|
|
+ <thead>
|
|
|
+ <th>Category</th>
|
|
|
+ <th>Summary</th>
|
|
|
+ <th>Created</th>
|
|
|
+
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach ($memo->updates as $update)
|
|
|
+ <tr>
|
|
|
+ <td>{{ $update->category }}</td>
|
|
|
+ <td>{{ $update->content }}</td>
|
|
|
+ <td><strong>{{ $update->createdBy->proname_first }}
|
|
|
+ {{ $update->createdBy->pro->name_last }}</strong><br />{{ friendly_date_time($update->created_at) }}
|
|
|
+ </td>
|
|
|
+
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ <div moe wide relative class="mr-2">
|
|
|
+ <a class="on-hover-opaque" start show title="Edit">
|
|
|
+ <i class="font-size-11 fa fa-edit"></i>
|
|
|
+ </a>
|
|
|
+ <form url="/api/clientMemo/update" right>
|
|
|
+ <input type="hidden" name="uid" value="{{ $memo->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <select class="form-control form-control-sm" name="category" required>
|
|
|
+ <option value="">-- select --</option>
|
|
|
+ <option {{ $memo->category === 'Incoming Call' ? 'selected' : '' }}
|
|
|
+ value="Incoming Call">Incoming Call</option>
|
|
|
+ <option {{ $memo->category === 'Outgoing Call' ? 'selected' : '' }}
|
|
|
+ value="Outgoing Call">Outgoing Call</option>
|
|
|
+ <option
|
|
|
+ {{ $memo->category === 'Call Unspecified' ? 'selected' : '' }}
|
|
|
+ value="Call Unspecified">Call Unspecified</option>
|
|
|
+ <option {{ $memo->category === 'Other' ? 'selected' : '' }}
|
|
|
+ value="Other">Other</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <textarea class="form-control form-control-sm" name="content" rows="5" placeholder="Content"><?= $memo->content ?></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" type="button"
|
|
|
+ submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" type="button"
|
|
|
+ cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div moe relative>
|
|
|
+ <a start show class="on-hover-opaque"><i
|
|
|
+ class="fa fa-trash-alt text-danger"></i></a>
|
|
|
+ <form url="/api/clientMemo/cancel" right>
|
|
|
+ <input type="hidden" name="uid" value="{{ $memo->uid }}">
|
|
|
+ <p class="small">Are you sure you want to cancel this memo?</p>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border"
|
|
|
+ cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ @else
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary p-3">No memos have been created for this patient</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ @endif
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</div>
|