|
@@ -201,28 +201,90 @@
|
|
|
</div>
|
|
|
<div class="col-md-9">
|
|
|
|
|
|
- <!-- new associations -->
|
|
|
- @if(count($newMCPAssociations))
|
|
|
- <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
- <p class="pt-1 mb-2"><b>New Patients</b></p>
|
|
|
- @foreach($newMCPAssociations as $assoc)
|
|
|
- <div class="mb-1">You have been assigned as the MCP for {{$assoc->patient->displayName()}}.
|
|
|
- <a href="#" class="ack-client-pro-change" data-uid="{{$assoc->uid}}">Acknowledge</a>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-6">
|
|
|
+ <!-- new associations -->
|
|
|
+ @if(count($newMCPAssociations))
|
|
|
+ <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
+ <p class="pt-1 mb-2"><b>New Patients</b></p>
|
|
|
+ @foreach($newMCPAssociations as $assoc)
|
|
|
+ <div class="mb-1">You have been assigned as the MCP for
|
|
|
+ <a href="/patients/view/{{$assoc->patient->uid}}" class="d-inline-block width-150px">{{$assoc->patient->displayName()}}</a>.
|
|
|
+ <a href="#" class="ack-client-pro-change ml-3" data-uid="{{$assoc->uid}}">Stamp</a>
|
|
|
+ </div>
|
|
|
+ @endforeach
|
|
|
</div>
|
|
|
- @endforeach
|
|
|
- </div>
|
|
|
- @endif
|
|
|
+ @endif
|
|
|
|
|
|
- @if(count($newNAAssociations))
|
|
|
- <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
- <p class="pt-1 mb-2"><b>New Patients</b></p>
|
|
|
- @foreach($newNAAssociations as $assoc)
|
|
|
- <div class="mb-1">You have been assigned as the Care Coordinator for {{$assoc->patient->displayName()}}.
|
|
|
- <a href="#" class="ack-client-pro-change" data-uid="{{$assoc->uid}}">Acknowledge</a>
|
|
|
+ @if(count($newNAAssociations))
|
|
|
+ <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
+ <p class="pt-1 mb-2"><b>New Patients</b></p>
|
|
|
+ @foreach($newNAAssociations as $assoc)
|
|
|
+ <div class="mb-1">You have been assigned as the Care Coordinator for
|
|
|
+ <a href="/patients/view/{{$assoc->patient->uid}}" class="d-inline-block width-150px">{{$assoc->patient->displayName()}}</a>.
|
|
|
+ <a href="#" class="ack-client-pro-change ml-3" data-uid="{{$assoc->uid}}">Stamp</a>
|
|
|
+ </div>
|
|
|
+ @endforeach
|
|
|
</div>
|
|
|
- @endforeach
|
|
|
+ @endif
|
|
|
</div>
|
|
|
- @endif
|
|
|
+ <div class="col-6">
|
|
|
+ @if(count($mcpClientMemos))
|
|
|
+ <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
+ <p class="pt-1 mb-2"><b>New Patients Memos (MCP)</b></p>
|
|
|
+ <table class="table table-sm table-hover table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Patient</th>
|
|
|
+ <th>Memo</th>
|
|
|
+ <th>Created</th>
|
|
|
+ <th></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($mcpClientMemos as $memo)
|
|
|
+ <tr>
|
|
|
+ <td class="">
|
|
|
+ <a href="/patients/view/{{$memo->client_uid}}">{{$memo->name_first}} {{$memo->name_last}}</a>
|
|
|
+ </td>
|
|
|
+ <td>{!! $memo->content !!}</td>
|
|
|
+ <td class="text-nowrap">{{friendlier_date_time($memo->created_at)}}</td>
|
|
|
+ <td><a href="#" class="ack-client-memo" data-uid="{{$memo->uid}}">Stamp</a></td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ @if(count($naClientMemos))
|
|
|
+ <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
+ <p class="pt-1 mb-2"><b>New Patients Memos (NA)</b></p>
|
|
|
+ <table class="table table-sm table-hover table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Patient</th>
|
|
|
+ <th>Memo</th>
|
|
|
+ <th>Created</th>
|
|
|
+ <th></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($naClientMemos as $memo)
|
|
|
+ <tr>
|
|
|
+ <td class="">
|
|
|
+ <a href="/patients/view/{{$memo->client_uid}}">{{$memo->name_first}} {{$memo->name_last}}</a>
|
|
|
+ </td>
|
|
|
+ <td>{!! $memo->content !!}</td>
|
|
|
+ <td class="text-nowrap">{{friendlier_date_time($memo->created_at)}}</td>
|
|
|
+ <td><a href="#" class="ack-client-memo" data-uid="{{$memo->uid}}">Stamp</a></td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
<li class="nav-item">
|
|
@@ -696,6 +758,29 @@
|
|
|
}, 'json');
|
|
|
return false;
|
|
|
});
|
|
|
+
|
|
|
+ $(document)
|
|
|
+ .off('click', '.ack-client-memo')
|
|
|
+ .on('click', '.ack-client-memo', function() {
|
|
|
+ let trigger = $(this).text('…');
|
|
|
+ $.post('/api/clientMemo/stamp', {
|
|
|
+ uid: $(this).attr('data-uid')
|
|
|
+ }, _data => {
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
+ trigger.hide();
|
|
|
+ let doneElem = $('<i class="text-success fa fa-check"></i>');
|
|
|
+ doneElem.insertAfter(trigger);
|
|
|
+ setTimeout(() => {
|
|
|
+ let tbody = trigger.closest('tbody');
|
|
|
+ trigger.closest('tr').remove();
|
|
|
+ if(!tbody.find('>tr').length) {
|
|
|
+ tbody.closest('.ack-container').remove();
|
|
|
+ }
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
+ return false;
|
|
|
+ });
|
|
|
}
|
|
|
addMCInitializer('pro-dashboard', init, '#pro-dashboard-container');
|
|
|
})();
|