浏览代码

Patient claim summary > claim resolver popup

Vijayakrishnan 4 年之前
父节点
当前提交
3bb472290a

+ 6 - 6
public/css/style.css

@@ -962,7 +962,7 @@ body .node input[type="number"] {
 .stag-popup.show {
     display: block;
 }
-.stag-popup>form {
+.stag-popup>form, .stag-popup>.stag-popup-content {
     width: 80%;
     background: #fff;
     border: 1px solid #aaa;
@@ -972,19 +972,19 @@ body .node input[type="number"] {
     margin: 0 auto;
     padding: 0.75rem;
 }
-.stag-popup.wide>form {
+.stag-popup.wide>form, .stag-popup.wide>.stag-popup-content {
     width: calc(100% - 4rem);
 }
-.stag-popup.narrow>form {
+.stag-popup.narrow>form, .stag-popup.narrow>.stag-popup-content {
     max-width: 500px;
 }
-.stag-popup.stag-popup-sm>form {
+.stag-popup.stag-popup-sm>form, .stag-popup.stag-popup-sm>.stag-popup-content {
     max-width: 500px;
 }
-.stag-popup.stag-popup-md>form {
+.stag-popup.stag-popup-md>form, .stag-popup.stag-popup-md>.stag-popup-content {
     max-width: 632pt;
 }
-.stag-popup.stag-popup-right>form {
+.stag-popup.stag-popup-right>form, .stag-popup.stag-popup-right>.stag-popup-content {
     margin-right: 1.5rem;
     margin-left: auto;
 }

+ 65 - 0
public/js/stag-popup.js

@@ -37,6 +37,16 @@ function closeStagPopup(_noEvent = false) {
             closeStagPopup(true);
         }
     }
+    else {
+        if(popup.is('[update-parent]')) {
+            if(stagPopupsQueue.length) {
+                refreshDynamicStagPopup();
+            }
+            else {
+                fastReload()
+            }
+        }
+    }
     // if all closed
     if(!stagPopupsQueue.length) {
         $('html, body').removeClass('no-scroll');
@@ -47,6 +57,53 @@ function closeStagPopup(_noEvent = false) {
     }
     return false;
 }
+function openDynamicStagPopup(url, initer, title, updateParent) {
+    url += (url.indexOf('?') !== -1 ? '&' : '?') + 'popupmode=1';
+    showMask();
+    window.noMc = true;
+    $.get(url, (_data) => {
+        let popup = $('.dynamic-popup[stag-popup-key="' + url + '"]');
+        if(!popup.length) {
+            $('main.stag-content').append(
+                '<div class="stag-popup stag-popup-lg dynamic-popup mcp-theme-1" stag-popup-key="' + url + '">' +
+                '<div class="stag-popup-content p-0">' +
+                '<h3 class="stag-popup-title mb-0 mt-3 mx-3 pb-0 border-bottom-0"><span></span>' +
+                '<a href="#" class="ml-auto text-secondary" onclick="return closeStagPopup()"><i class="fa fa-times-circle"></i></a>\n' +
+                '</h3>' +
+                '<div class="stag-popup-content-inner"></div>' +
+                '</div>' +
+                '</div>'
+            );
+            popup = $('.dynamic-popup[stag-popup-key="' + url + '"]');
+        }
+        popup.attr('mc-initer', initer);
+        popup.find('.stag-popup-title>span').text(title);
+        popup.find('.stag-popup-content-inner').html(_data);
+        if(updateParent) {
+            popup.attr('update-parent', 1);
+        }
+        else {
+            popup.removeAttr('update-parent');
+        }
+        showStagPopup(url);
+        if(initer) runMCInitializer(initer);
+        hideMask();
+    });
+}
+function refreshDynamicStagPopup() {
+    if(!stagPopupsQueue.length) return;
+    let popup = stagPopupsQueue[stagPopupsQueue.length - 1];
+    if(popup.is('.dynamic-popup')) {
+        showMask();
+        window.noMc = true;
+        let url = popup.attr('stag-popup-key'),
+            initer = popup.attr('mc-initer');
+        $.get(url, (_data) => {
+            if(initer) runMCInitializer(initer);
+            hideMask();
+        });
+    }
+}
 (function() {
     window.initStagPopupEvents = function () {
         $(document)
@@ -68,6 +125,14 @@ function closeStagPopup(_noEvent = false) {
                     }
                 }
             });
+
+        $(document)
+            .off('click.open-in-stag-popup', 'a[open-in-stag-popup]')
+            .on('click.open-in-stag-popup', 'a[open-in-stag-popup]', function() {
+                openDynamicStagPopup(this.href, $(this).attr('mc-initer'), $(this).attr('title'), $(this).is('[update-parent]'));
+                return false;
+            });
+
     }
     addMCInitializer('stag-popups', window.initStagPopupEvents);
 })();

+ 5 - 1
resources/views/app/patient/claims-resolver.blade.php

@@ -267,7 +267,11 @@
                 <strong>{{ $note->hcpPro->displayName() }}</strong>
             </td>
             <td>
-                <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}" class="font-weight-bold">
+                <a native target="_blank"
+                   open-in-stag-popup
+                   update-parent
+                   title="Note Details"
+                   href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}">
                     {{ friendly_date_time($d, false) }}
                 </a>
             </td>

+ 7 - 1
resources/views/app/practice-management/patient-claim-summary.blade.php

@@ -36,7 +36,13 @@
                     @foreach($patients as  $patient)
                         <tr>
                             <td>
-                                <a href="{{route('patients.view.claims-resolver', $patient->uid)}}">{{$patient->name_first}} {{$patient->name_last}}</a>
+                                <a native target="_blank"
+                                   open-in-stag-popup
+                                   update-parent
+                                   title="{{$patient->name_first}} {{$patient->name_last}} - Claims Resolver"
+                                   href="{{route('patients.view.claims-resolver', $patient->uid)}}">
+                                    {{$patient->name_first}} {{$patient->name_last}}
+                                </a>
                             </td>
                             <td>{{$patient->mcp}}</td>
                             <td>{{$patient->notes_without_billing_closed}}</td>