Просмотр исходного кода

Notes resolution center updates

Vijayakrishnan 3 лет назад
Родитель
Сommit
660d7aa232

+ 1 - 1
config/app.php

@@ -65,7 +65,7 @@ return [
 
     'hrm2_url' => env('HRM2_URL'),
 
-    'asset_version' => 85,
+    'asset_version' => 86,
 
     'temp_dir' => env('TEMP_DIR'),
 

+ 2 - 2
js-dev/icd-autocomplete.js

@@ -4,7 +4,7 @@
         let self = this;
         $('[icd-autocomplete-code]:not([ac-initialized])').each(function() {
             let elem = this, dynID = 'icd-' + Math.ceil(Math.random() * 1000000),
-                codeElem = $(this), descElem = $(this).closest('form').find('[icd-autocomplete-description]');
+                codeElem = $(this), descElem = $(this).closest('form, tr').first().find('[icd-autocomplete-description]');
             var targetDescElem = $(this).data('target');
             if(targetDescElem){
                 descElem = $(this).closest('form').find(targetDescElem);
@@ -20,7 +20,7 @@
             window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
                 let autocomp = elem.autocomp, acData = autocomp.getSelectedItemData();
                 codeElem.val(acData[0].code).trigger('change');
-                descElem.val(acData[0].data['name']).trigger('change');
+                descElem.val(acData[0].data['name']).attr('title', acData[0].data['name']).trigger('change');
                 return false;
             });
             $(elem).attr('ac-initialized', 1);

+ 6 - 0
public/css/style.css

@@ -384,6 +384,9 @@ body>nav.navbar {
 .mcp-theme-1 .width-200px {
     width: 200px !important;
 }
+.mcp-theme-1 .width-250px {
+    width: 250px !important;
+}
 .mcp-theme-1 .width-300px {
     width: 300px !important;
 }
@@ -445,6 +448,9 @@ body>nav.navbar {
 .mcp-theme-1 .min-width-200px {
     min-width: 200px !important;
 }
+.mcp-theme-1 .min-width-250px {
+    min-width: 250px !important;
+}
 .mcp-theme-1 .min-width-300px {
     min-width: 300px;
 }

+ 2 - 2
public/js/icd-autocomplete.js

@@ -4,7 +4,7 @@
         let self = this;
         $('[icd-autocomplete-code]:not([ac-initialized])').each(function() {
             let elem = this, dynID = 'icd-' + Math.ceil(Math.random() * 1000000),
-                codeElem = $(this), descElem = $(this).closest('form').find('[icd-autocomplete-description]');
+                codeElem = $(this), descElem = $(this).closest('form, tr').first().find('[icd-autocomplete-description]');
             var targetDescElem = $(this).data('target');
             if(targetDescElem){
                 descElem = $(this).closest('form').find(targetDescElem);
@@ -20,7 +20,7 @@
             window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
                 let autocomp = elem.autocomp, acData = autocomp.getSelectedItemData();
                 codeElem.val(acData[0].code).trigger('change');
-                descElem.val(acData[0].data['name']).trigger('change');
+                descElem.val(acData[0].data['name']).attr('title', acData[0].data['name']).trigger('change');
                 return false;
             });
             $(elem).attr('ac-initialized', 1);

+ 78 - 3
resources/views/app/patient/note/resolve.blade.php

@@ -159,7 +159,79 @@
                             @include('app.patient.note.note-segment-list-resolve')
                         </div>
                     </div>
-                    <div class="overflow-auto min-width-200px width-200px" style="max-height: calc(100vh - 260px);">
+                    <div class="overflow-auto min-width-250px width-250px" style="max-height: calc(100vh - 260px);">
+                        <div class="p-2 border-bottom">
+                            <div class="font-weight-bold">ICDs</div>
+                            <div moe="">
+                                <form show url="/api/note/putReasons" class="mcp-theme-1" hook="onICDUpdate-{{$note->uid}}">
+                                    <input type="hidden" name="uid" value="{{$note->uid}}">
+                                    <div>
+                                        <table class="table table-sm table-bordered mb-2">
+                                            <thead class="bg-light">
+                                            <tr>
+                                                <th class="border-bottom-0">ICD</th>
+                                                <th class="border-bottom-0">Desc.</th>
+                                            </tr>
+                                            </thead>
+                                            <tbody>
+                                            <tr>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-code type="text" class="rounded-0 border-0 shadow-none icd-input width-70px pr-0 min-width-unset"
+                                                           name="reasonIcd1" placeholder="ICD 1" value="{{@$note->note_reason_icd1}}" autocomplete="off">
+                                                </td>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-description type="text" class="rounded-0 border-0 shadow-none form-control form-control-sm min-width-unset"
+                                                           name="reasonIcd1Description" value="{{@$note->note_reason_icd1description}}"
+                                                           title="{{@$note->note_reason_icd1description}}">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-code type="text" class="rounded-0 border-0 shadow-none icd-input width-70px pr-0 min-width-unset"
+                                                           name="reasonIcd2" placeholder="ICD 1" value="{{@$note->note_reason_icd2}}" autocomplete="off">
+                                                </td>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-description type="text" class="rounded-0 border-0 shadow-none form-control form-control-sm min-width-unset"
+                                                           name="reasonIcd2Description" value="{{@$note->note_reason_icd2description}}"
+                                                           title="{{@$note->note_reason_icd2description}}">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-code type="text" class="rounded-0 border-0 shadow-none icd-input width-70px pr-0 min-width-unset"
+                                                           name="reasonIcd3" placeholder="ICD 1" value="{{@$note->note_reason_icd3}}" autocomplete="off">
+                                                </td>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-description type="text" class="rounded-0 border-0 shadow-none form-control form-control-sm min-width-unset"
+                                                           name="reasonIcd3Description" value="{{@$note->note_reason_icd3description}}"
+                                                           title="{{@$note->note_reason_icd3description}}">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-code type="text" class="rounded-0 border-0 shadow-none icd-input width-70px pr-0 min-width-unset"
+                                                           name="reasonIcd4" placeholder="ICD 1" value="{{@$note->note_reason_icd4}}" autocomplete="off">
+                                                </td>
+                                                <td class="p-0">
+                                                    <input icd-autocomplete-description type="text" class="rounded-0 border-0 shadow-none form-control form-control-sm min-width-unset"
+                                                           name="reasonIcd4Description" value="{{@$note->note_reason_icd4description}}"
+                                                           title="{{@$note->note_reason_icd4description}}">
+                                                </td>
+                                            </tr>
+                                            </tbody>
+                                        </table>
+                                    </div>
+                                    <div class="mb-2">
+                                        <label class="text-secondary mb-1">Reason Memo:</label>
+                                        <input type="text" class="form-control form-control-sm min-width-unset" name="reasonMemo" value="{{@$note->note_reason_memo}}">
+                                    </div>
+                                    <div>
+                                        <button submit="" class="btn btn-sm btn-primary mr-1">Submit</button>
+                                        <button cancel="" class="btn btn-sm btn-default border">Cancel</button>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
                         @include('app.patient.note.rhs-sidebar')
                     </div>
                 </div>
@@ -231,7 +303,7 @@
             function init() {
                 let parentSegment = $('#note-resolve-{{$note->uid}}');
                 // __initRTEs(parentSegment.find('[note-rte]:not(.ql-container)'));
-
+                runMCInitializer('icd-autocomplete');
                 parentSegment.find('.btn-apply-override')
                     .off('click.apply-override')
                     .on('click.apply-override', function() {
@@ -239,7 +311,7 @@
                         $.post('/api/segment/proposeSegmentSummarySuggestion', {
                             uid: $(this).attr('data-segment-uid'),
                             proposedSuggestedSummaryHtml: html,
-                            autoAccept: 1
+                            autoAccept: true
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 toastr.success('Updated');
@@ -249,6 +321,9 @@
                     });
             }
             addMCInitializer('note-resolve-{{$note->uid}}', init, '#note-resolve-{{$note->uid}}');
+            addMCHook('onICDUpdate-{{$note->uid}}', function() {
+                toastr.success('ICDs updated');
+            });
         }).call(window);
     </script>
 @endsection

+ 4 - 1
resources/views/app/patient/note/segment-resolve.blade.php

@@ -60,13 +60,16 @@
     @if(!$isLSSegment)
         <?php
             $html = '';
-            $recalculated = $segment->getRecalculatedHtml($performer, $performer->session_key, true)['summaryHtml'];
             if($note->is_signed_by_hcp && $segment->accepted_suggestion_summary_html) {
                 $html = $segment->accepted_suggestion_summary_html;
             }
             else {
                 $html = $segment->summary_html;
             }
+            $recalculated = $html;
+            if(in_array($segment->segmentTemplate->internal_name, ['chief_complaint', 'omega_cc']) === TRUE) {
+                $recalculated = $segment->getRecalculatedHtml($performer, $performer->session_key, true)['summaryHtml'];
+            }
         ?>
         @if(!$rhsEdit)
             <div class="inset-comment summary-container p-2">

+ 1 - 1
resources/views/app/practice-management/notes-resolution-center.blade.php

@@ -82,7 +82,7 @@
                     <td class="text-nowrap">{{friendly_date($row->effective_dateest)}}</td>
                     <td class="text-nowrap">{{ $row->minutes }}</td>
                     <td class="text-nowrap">
-                        <div class="">
+                        <div class="grow-till-300px">
                         @if($row->icd1) <div>{{$row->icd1}} {{$row->icd1description}}</div>@endif
                         @if($row->icd2) <div>{{$row->icd2}} {{$row->icd2description}}</div>@endif
                         @if($row->icd3) <div>{{$row->icd3}} {{$row->icd3description}}</div>@endif