|
@@ -0,0 +1,121 @@
|
|
|
|
+@extends ('layouts.patient')
|
|
|
|
+@section('inner-content')
|
|
|
|
+ <div class="">
|
|
|
|
+ <div class="d-flex align-items-center pb-2">
|
|
|
|
+ <h4 class="font-weight-bold m-0">Client Memos</h4>
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <div moe wide>
|
|
|
|
+ <a start show class="">Add</a>
|
|
|
|
+ <form url="/api/clientMemo/create">
|
|
|
|
+ <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
|
+ <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="10" name="content" placeholder="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>
|
|
|
|
+ <table class="table table-striped table-sm table-bordered mb-0">
|
|
|
|
+ @if($patient->memos && count($patient->memos))
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="px-2 text-secondary">Created</th>
|
|
|
|
+ <th class="px-2 text-secondary">Category</th>
|
|
|
|
+ <th class="px-2 text-secondary">Summary</th>
|
|
|
|
+ <th class="px-2 text-secondary delete-column"> </th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($patient->memos as $memo)
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="px-2">{{ friendly_date_time($memo->created_at) }}</td>
|
|
|
|
+ <td class="px-2">{{ $memo->category }}</td>
|
|
|
|
+ <td class="px-2"><pre class="m-0">{{ $memo->content }}</pre></td>
|
|
|
|
+ <td class="px-2 text-center delete-column">
|
|
|
|
+ <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="10"
|
|
|
|
+ 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>
|
|
|
|
+ @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>
|
|
|
|
+ <script>
|
|
|
|
+ (function() {
|
|
|
|
+ function init() {
|
|
|
|
+ $('input[type="text"][name="contentText"]').each(function() {
|
|
|
|
+ var elem = this, dynID = 'rx-' + Math.ceil(Math.random() * 1000000);
|
|
|
|
+ $(elem).attr('id', dynID);
|
|
|
|
+ var strengthElem = $(elem).closest('form').find('[name="strength"]')[0],
|
|
|
|
+ dynStrengthsID = 'rx-' + Math.ceil(Math.random() * 1000000) + '-strengths';
|
|
|
|
+ $(strengthElem).attr('id', dynStrengthsID);
|
|
|
|
+ new window.Def.Autocompleter.Prefetch(dynStrengthsID, []);
|
|
|
|
+ new window.Def.Autocompleter.Search(dynID,
|
|
|
|
+ 'https://clinicaltables.nlm.nih.gov/api/rxterms/v3/search?ef=STRENGTHS_AND_FORMS');
|
|
|
|
+ window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
|
|
|
|
+ var autocomp = elem.autocomp;
|
|
|
|
+ var strengths =
|
|
|
|
+ autocomp.getSelectedItemData()[0].data['STRENGTHS_AND_FORMS'];
|
|
|
|
+ if (strengths)
|
|
|
|
+ strengthElem.autocomp.setListAndField(strengths, '');
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ addMCInitializer('patient-rx-list', init);
|
|
|
|
+ })();
|
|
|
|
+ </script>
|
|
|
|
+@endsection
|