Эх сурвалжийг харах

PMHx - Reuse dx wizard for "add to problems list"

Vijayakrishnan 3 жил өмнө
parent
commit
a692a8c1ee

+ 5 - 0
resources/views/app/patient/problems-center.blade.php

@@ -230,6 +230,7 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
                                            stag-suggest-bottom-left
                                            stag-suggest-ep="/fdb-dx-suggest-v2/json"
                                            stag-suggest-text-only
+                                           value="{{trim(request()->input('dx')) ? trim(request()->input('dx')) : ''}}"
                                            required>
                                 </div>
                                 <div class="col-4">
@@ -327,6 +328,10 @@ $ccSegment = $ccSegment ?? $note->getSegmentByInternalName('mc_cc');
 
             initSegmentMoes($('#problems-center-{{$note->id}}'));
             __initRTEs(parentSegment.find('[note-rte]:not(.ql-container)'));
+
+            @if(trim(request()->input('dx')))
+                parentSegment.find('input[stag-suggest][data-name="name"]').focus().trigger('keydown')[0].scrollIntoView();
+            @endif
         }
         addMCInitializer('problems-center-{{$note->id}}', init, '#problems-center-{{$note->id}}');
     }).call(window);

+ 4 - 5
resources/views/app/patient/segment-templates/past_medical_history/edit.blade.php

@@ -131,12 +131,11 @@ for ($i = 0; $i < count($fields); $i++) {
                                                     </div>
                                                     <a v-show="common['{{$fName}}']"
                                                        class="ml-1"
-                                                       native target="_blank"
                                                        open-in-stag-popup
-                                                       popup-style="stag-popup-sm overflow-visible"
-                                                       title="Add to Problems List"
-                                                       mc-initer="problems-quick-add-{{$note->id}}"
-                                                       href="/problems-quick-add/{{$patient->uid}}/{{$note->uid}}?dx={{urlencode($values[$k])}}">
+                                                       mc-initer="problems-center-{{$note->id}}"
+                                                       title="Problems Center"
+                                                       popup-style="wide overflow-visible"
+                                                       href="/problems-center/{{$patient->uid}}/{{$note->uid}}?dx={{urlencode($values[$k])}}">
                                                         <i class="fa fa-plus-circle on-hover-opaque"></i>
                                                     </a>
                                                 </div>