|
@@ -37,8 +37,8 @@ $problems = $points;
|
|
<th class="border-bottom-0 text-secondary">Delete</th>
|
|
<th class="border-bottom-0 text-secondary">Delete</th>
|
|
<th class="border-bottom-0 text-secondary">Started</th>
|
|
<th class="border-bottom-0 text-secondary">Started</th>
|
|
<th class="border-bottom-0 text-secondary">Ended</th>
|
|
<th class="border-bottom-0 text-secondary">Ended</th>
|
|
- <th class="border-bottom-0 text-secondary">Last Review</th>
|
|
|
|
- <th class="border-bottom-0 text-secondary">Last Plan</th>
|
|
|
|
|
|
+ <th class="border-bottom-0 text-secondary w-25">Last Review</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary w-25">Last Plan</th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<?php foreach($problems as $problem): ?>
|
|
<?php foreach($problems as $problem): ?>
|
|
@@ -236,14 +236,22 @@ $problems = $points;
|
|
include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
- <a class="px-2 view-review-log"
|
|
|
|
- native target="_blank"
|
|
|
|
- open-in-stag-popup
|
|
|
|
- popup-style="stag-popup-md"
|
|
|
|
- title="Review log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
|
|
|
|
- href="/point/review-log/<?= $problem->uid ?>?popupmode=1">
|
|
|
|
- <i class="fa fa-history"></i>
|
|
|
|
- </a>
|
|
|
|
|
|
+ <div class="d-inline-flex flex-nowrap">
|
|
|
|
+ <a class="px-2 view-review-log"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ open-in-stag-popup
|
|
|
|
+ popup-style="stag-popup-md"
|
|
|
|
+ title="Review log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
|
|
|
|
+ href="/point/review-log/<?= $problem->uid ?>?popupmode=1">
|
|
|
|
+ <i class="fa fa-history"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <?php
|
|
|
|
+ $segment = $note->getSegmentByInternalName('intake_problems');
|
|
|
|
+ if($segment) {
|
|
|
|
+ include resource_path('views/app/patient/segment-templates/_child_review/edit-review.php');
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
@@ -253,14 +261,22 @@ $problems = $points;
|
|
include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
?>
|
|
?>
|
|
</div>
|
|
</div>
|
|
- <a class="px-2 view-review-log"
|
|
|
|
- native target="_blank"
|
|
|
|
- open-in-stag-popup
|
|
|
|
- popup-style="stag-popup-md"
|
|
|
|
- title="Plan log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
|
|
|
|
- href="/point/plan-log/<?= $problem->uid ?>?popupmode=1">
|
|
|
|
- <i class="fa fa-history"></i>
|
|
|
|
- </a>
|
|
|
|
|
|
+ <div class="d-inline-flex flex-nowrap">
|
|
|
|
+ <a class="px-2 view-review-log"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ open-in-stag-popup
|
|
|
|
+ popup-style="stag-popup-md"
|
|
|
|
+ title="Plan log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
|
|
|
|
+ href="/point/plan-log/<?= $problem->uid ?>?popupmode=1">
|
|
|
|
+ <i class="fa fa-history"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <?php
|
|
|
|
+ $segment = $note->getSegmentByInternalName('plan_problems');
|
|
|
|
+ if($segment) {
|
|
|
|
+ include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
@@ -359,6 +375,49 @@ $problems = $points;
|
|
|
|
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
|
|
+ function initVisitMoeRTEs() {
|
|
|
|
+ $('.stag-popup [visit-moe]').find('[note-rte]:not(.ql-container)').each(function() {
|
|
|
|
+
|
|
|
|
+ $(this).wrap(
|
|
|
|
+ $('<div class="border-left border-right rte-holder"/>')
|
|
|
|
+ .attr('data-shortcuts', '')
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ // give a unique id to this editor instance
|
|
|
|
+ var editorID = Math.ceil(Math.random() * 99999),
|
|
|
|
+ fieldName = $(this).attr('data-field-name') ? $(this).attr('data-field-name') : 'free_text';
|
|
|
|
+
|
|
|
|
+ var el = this;
|
|
|
|
+ var existingContent = $(el).html();
|
|
|
|
+ var quill = new Quill(el, {
|
|
|
|
+ theme: 'snow',
|
|
|
|
+ modules: stagQuillConfig
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ var toolbar = $(quill.container).prev('.ql-toolbar');
|
|
|
|
+
|
|
|
|
+ // add button for new shortcut
|
|
|
|
+ var newSCButton = $('<button class="btn bg-white btn-sm btn-default text-primary w-auto px-2 border py-0 ' +
|
|
|
|
+ 'text-sm add-shortcut" data-editor-id="' + editorID + '">+ Shortcut</button>');
|
|
|
|
+ toolbar.append(newSCButton);
|
|
|
|
+
|
|
|
|
+ quill.root.innerHTML = existingContent;
|
|
|
|
+
|
|
|
|
+ quill.on('text-change', function(delta, oldDelta, source) {
|
|
|
|
+ var content = quill.root.innerHTML;
|
|
|
|
+ let dataObject = {};
|
|
|
|
+ dataObject[fieldName] = content;
|
|
|
|
+ var dataValue = JSON.stringify(dataObject);
|
|
|
|
+ $(el).closest('[visit-moe]').find('input[name=data]').val(dataValue);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $(quill.container)
|
|
|
|
+ .find('.ql-editor[contenteditable]')
|
|
|
|
+ .attr('data-field', fieldName)
|
|
|
|
+ .attr('data-editor-id', editorID)
|
|
|
|
+ .attr('with-shortcuts', 1);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
function init() {
|
|
function init() {
|
|
let parentSegment = $('#problems-center-{{$note->id}}');
|
|
let parentSegment = $('#problems-center-{{$note->id}}');
|
|
parentSegment.find('input[stag-suggest][data-name="name"]')
|
|
parentSegment.find('input[stag-suggest][data-name="name"]')
|
|
@@ -373,7 +432,7 @@ $problems = $points;
|
|
}
|
|
}
|
|
icdSelect.prop('disabled', false);
|
|
icdSelect.prop('disabled', false);
|
|
if (_data.length === 1) {
|
|
if (_data.length === 1) {
|
|
- icdSelect.val(_data[0].routed_med_id).trigger('change');
|
|
|
|
|
|
+ icdSelect.val(_data[0].search_icd_cd).trigger('change');
|
|
}
|
|
}
|
|
}, 'json');
|
|
}, 'json');
|
|
});
|
|
});
|
|
@@ -531,7 +590,10 @@ $problems = $points;
|
|
initStagSuggest();
|
|
initStagSuggest();
|
|
|
|
|
|
$('.additionReasonCategory_ui').trigger('change');
|
|
$('.additionReasonCategory_ui').trigger('change');
|
|
|
|
+
|
|
|
|
+ initSegmentMoes($('#problems-center-{{$note->id}}'));
|
|
|
|
+ initVisitMoeRTEs();
|
|
}
|
|
}
|
|
- addMCInitializer('problems-center-{{$note->id}}', init, '#problems-center-{{$note->id}}')
|
|
|
|
|
|
+ addMCInitializer('problems-center-{{$note->id}}', init, '#problems-center-{{$note->id}}');
|
|
}).call(window);
|
|
}).call(window);
|
|
</script>
|
|
</script>
|