|
@@ -31,6 +31,7 @@ $medications = $points;
|
|
<table class="table table-sm table-bordered table-striped mb-0 bg-white mb-2">
|
|
<table class="table table-sm table-bordered table-striped mb-0 bg-white mb-2">
|
|
<thead>
|
|
<thead>
|
|
<tr class="">
|
|
<tr class="">
|
|
|
|
+ <th class="border-bottom-0 text-secondary text-center width-30px">Rel.</th>
|
|
<th class="border-bottom-0 text-secondary">Name</th>
|
|
<th class="border-bottom-0 text-secondary">Name</th>
|
|
<th class="border-bottom-0 text-secondary">Frequency</th>
|
|
<th class="border-bottom-0 text-secondary">Frequency</th>
|
|
<th class="border-bottom-0 text-secondary">Active?</th>
|
|
<th class="border-bottom-0 text-secondary">Active?</th>
|
|
@@ -51,7 +52,21 @@ $medications = $points;
|
|
</tr>
|
|
</tr>
|
|
@endif
|
|
@endif
|
|
<?php $prevRowRemoved = $medication->is_removed; ?>
|
|
<?php $prevRowRemoved = $medication->is_removed; ?>
|
|
|
|
+ <?php $rel = $medication->relevanceToNote($note); ?>
|
|
<tr class="{{$medication->is_removed ? 'on-hover-opaque' : ''}}">
|
|
<tr class="{{$medication->is_removed ? 'on-hover-opaque' : ''}}">
|
|
|
|
+ <td class="text-center">
|
|
|
|
+ <a href="#" class="toggle-relevance"
|
|
|
|
+ data-relevant="{{$rel ? '1' : '0'}}"
|
|
|
|
+ data-rel-uid="{{$rel ? $rel->uid : ''}}"
|
|
|
|
+ data-point-uid="{{$medication->uid}}"
|
|
|
|
+ title="Mark as{{$rel ? ' not ' : ' '}}relevant to this visit">
|
|
|
|
+ @if($rel)
|
|
|
|
+ <i class="fa fa-star text-sm text-info"></i>
|
|
|
|
+ @else
|
|
|
|
+ <i class="fa fa-star text-sm text-secondary on-hover-opaque"></i>
|
|
|
|
+ @endif
|
|
|
|
+ </a>
|
|
|
|
+ </td>
|
|
<td>
|
|
<td>
|
|
<div class="d-flex align-items-baseline">
|
|
<div class="d-flex align-items-baseline">
|
|
@if($medication->is_removed)
|
|
@if($medication->is_removed)
|
|
@@ -650,6 +665,36 @@ $medications = $points;
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ $('.toggle-relevance')
|
|
|
|
+ .off('click.toggle-relevance')
|
|
|
|
+ .on('click.toggle-relevance', function () {
|
|
|
|
+ if(+$(this).attr('data-relevant') === 0) {
|
|
|
|
+ $.post('/api/visitPoint/markPointRelevantToNote', {
|
|
|
|
+ noteUid: '{{$note->uid}}',
|
|
|
|
+ pointUid: $(this).attr('data-point-uid')
|
|
|
|
+ }, _data => {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ refreshDynamicStagPopup();
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if($(this).attr('data-rel-uid')) {
|
|
|
|
+ $.post('/api/visitPoint/undoMarkPointRelevantToNote', {
|
|
|
|
+ uid: $(this).attr('data-rel-uid')
|
|
|
|
+ }, _data => {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ refreshDynamicStagPopup();
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ console.log('Error - missing rel uid');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+
|
|
initStagSuggest();
|
|
initStagSuggest();
|
|
|
|
|
|
$('.additionReasonCategory_ui').trigger('change');
|
|
$('.additionReasonCategory_ui').trigger('change');
|