Explorar o código

Merge branch 'master' of rav.triplestart.com:jmudaka/stagfe2

Josh Kamau %!s(int64=5) %!d(string=hai) anos
pai
achega
0bc2af47fd

+ 8 - 1
public/css/yemi.css

@@ -1,3 +1,10 @@
 [moe] [url]:not([show]){
     display: none;
-}
+}
+[moe] form:not([show]) {
+    z-index: 99999;
+    position: absolute;
+    background-color: white;
+    padding: 10px;
+    border: 1px solid gray;
+}

+ 24 - 137
public/js/yemi.js

@@ -14,6 +14,14 @@ var hideMask = function () {
     $('#mask').hide();
 }
 
+var showMoeFormMask = function () {
+    $('#moe-form-mask').show();
+}
+
+var hideMoeFormMask = function () {
+    $('#moe-form-mask').hide();
+}
+
 $(document).ready(function () {
     hideMask();
 });
@@ -225,6 +233,13 @@ $(function () {
 
 jQuery(document).ready(function () {
     var $ = jQuery;
+    $('body').mousedown(function(e){
+        if($(e.target).closest('[moe]').length){
+            return;
+        }
+        $('[moe] form:not([show])').hide();
+        hideMoeFormMask();
+    });
 
     $('[moe]').each(function () {
         var moe = $(this);
@@ -264,7 +279,13 @@ jQuery(document).ready(function () {
                         $(realForm).css('display', 'inline');
                         formToggle = true;
                     } else {
+                        var isRealFormVisible = $(realForm).is(':visible');
                         $(realForm).toggle(100);
+                        if(isRealFormVisible){
+                            hideMoeFormMask();
+                        }else{
+                            showMoeFormMask();
+                        }
                     }
                 }
                 if (!infoToggle && info && $(info).attr('show') == null) {
@@ -299,6 +320,7 @@ jQuery(document).ready(function () {
                 if (start && $(start).attr('show') == null) {
                     $(start).show(100);
                 }
+                hideMoeFormMask();
             });
         }
         $(submit).click(function (e) {
@@ -343,8 +365,8 @@ jQuery(document).ready(function () {
                         window.history.back();
                     } else {
                         var host = window.location.host;
-                        if (redir.indexOf('[uid]') > -1) {
-							redir = redir.replace('[uid]', data)
+                        if (redir.indexOf('[data]') > -1) {
+							redir = redir.replace('[data]', data)
                             window.location.href = '/' + redir;
                         } else {
                             window.location.href = '/' + redir;
@@ -634,90 +656,12 @@ $('a[aller]').click(function () {
     return false;
 });
 
-$('button[batcher]').click(function () {
-    var url = $(this).attr('batcher');
-    var rid = $(this).attr('rid');
-    batcher(url, rid);
-    return false;
-});
-
-var batcherGoing = false;
-
-var batcher = function (url, recordIdName) {
-    if (batcherGoing) {
-        return;
-    }
-    batcherGoing = true;
-    var jobs = [];
-    $('input[type=checkbox][job]').each(function () {
-        if (this.checked) {
-            jobs.push(this);
-        }
-    });
-    console.log('JOBS', jobs);
-    var pointer = 0;
-    var doJob = function () {
-        var job = jobs[pointer];
-        if (job) {
-            pointer++;
-            var recordID = $(job).attr('job');
-            var data = {
-                isBatch: true
-            };
-            data[recordIdName] = recordID;
-            doAjax(url, data,
-                function () {
-                    var messageCell = $(job).closest('td')[0];
-                    if (messageCell) {
-                        $(messageCell).find('.errorMessage').remove();
-                    }
-                    $(job).closest('tr').css('background', 'gray');
-                },
-                function () {
-                    doJob();
-                },
-                function (res) {
-                    $(job).closest('tr').css('background', '#83D3C1');
-                    $(job).prop('checked', false);
-                    $(job).prop('disabled', true);
-                    var messageCell = $(job).closest('td')[0];
-                    if (messageCell) {
-                        $(messageCell).find('.errorMessage').remove();
-                        $(messageCell).append('<span class="errorMessage">success!</span>');
-                    }
-                },
-                function (mess) {
-                    var tr = $(job).closest('tr');
-                    $(tr).css('background', '#ED4337');
-                    var messageCell = $(job).closest('td')[0];
-                    if (messageCell) {
-                        $(messageCell).find('.errorMessage').remove();
-                        $(messageCell).append('<span class="errorMessage"> ' + mess + '</span>');
-                    }
-                    var shouldContinue = confirm('Error processing record ID: ' + recordID + '\n\nMessage: ' + mess + '\n\nContinue?');
-                    if (shouldContinue) {
-                        //carry on...
-                    } else {
-                        jobs = [];
-                    }
-                }, true);
-        } else {
-            batcherGoing = false;
-        }
-    }
-    doJob();
-}
-
-
 $(function () {
-
     $('.showOnLoad').show();
-
 });
 
 $(function () {
     var i = 0;
-
     function pulsate() {
         $(".urgentIndicator").
         animate({
@@ -877,29 +821,6 @@ $(function () {
     });
 });
 
-$(document).ready(function () {
-    $('[bulk-batcher]').on('click', function () {
-        var url = $(this).attr('url');
-        var ridname = $(this).attr('rid');
-        var ids = [];
-        var target = $(this).attr('target');
-        $('[job]:checked').each(function () {
-            ids.push($(this).attr('job'));
-        });
-        console.log(ids);
-        var data = {};
-        data[ridname] = JSON.stringify(ids);
-        console.log(data);
-        doAjax(url, data, null, null, function (batchID) {
-            if (target) {
-                window.open('/' + target + batchID, new Date().getTime(), "height=500,width=500");
-            } else {
-                window.location.href = '/batch-process?id=' + batchID;
-            }
-        }, null, false, null, true);
-    });
-});
-
 $(document).ready(function () {
     // setInterval(function () {
     //     doAjax('/api/session/test', null, null, null, null, function () {
@@ -920,40 +841,6 @@ $(function () {
     });
 });
 
-$(function () {
-    $('[point=percentCalc]').each(function () {
-        var pc = this;
-        var calculateTotalAmount = function () {
-            var table = $(pc).closest('table');
-            var total = 0;
-            $(table).find('[point=itemPercent]').each(function () {
-                var ip = this;
-                var percent = $(ip).val();
-                var amount = $(ip).attr('amount');
-                var itemTotal = 0;
-                if (percent) {
-                    itemTotal = (amount * percent * .01);
-                }
-                itemTotal = parseFloat(itemTotal);
-                total += itemTotal;
-                $(ip).closest('tr').find('[point=itemAmount]').html('$' + itemTotal.toFixed(2));
-            });
-            T = total;
-            $(table).find('[point=mainAmount]').html('$' + total.toFixed(2));
-        }
-        $(pc).closest('table').find('[point=applyAll]').click(function () {
-            var val = $(this).closest('td').find('[point=itemPercent]').val();
-            var table = $(this).closest('table');
-            $(table).find('[point=itemPercent]').val(val);
-            calculateTotalAmount();
-        });
-        $(pc).find('[point=itemPercent]').change(function () {
-            calculateTotalAmount();
-        });
-    });
-});
-
-
 $(function () {
     $('input[type=file][ajaxload]').each(function () {
         var me = this;

+ 29 - 0
resources/views/app/dashboard.blade.php

@@ -35,6 +35,35 @@
                             </table>
                         </div>
                     </div>
+                    <div class="card mt-3">
+                        <div class="card-header">
+                            <strong>
+                                Reimbursement
+                            </strong>
+                        </div>
+                        <div class="card-body p-0">
+                            <table class="table table-condensed">
+                                <tbody>
+                                <tr>
+                                    <th>$1034.90</th>
+                                    <th>Current balance</th>
+                                </tr>
+                                <tr>
+                                    <th>30 June, 2020</th>
+                                    <th>Next Payment Date</th>
+                                </tr>
+                                <tr>
+                                    <th>$1023.00</th>
+                                    <th>Last payment</th>
+                                </tr>
+                                <tr>
+                                    <th>15 June, 2020</th>
+                                    <th>Last payment date</th>
+                                </tr>
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
                 </div>
             </div>
         </div>

+ 1 - 3
resources/views/app/new-patient.blade.php

@@ -13,9 +13,7 @@
             </strong>
         </div>
         <div class="card-body">
-            <form show url="/api/client/create" class="px-3 pt-3 pb-1" redir="patients/view/[uid]">
-                @csrf
-
+            <form show url="/api/client/create" class="px-3 pt-3 pb-1" redir="patients/view/[data]">
                 @if (session('message'))
                     <div class="alert alert-danger">{{ session('message') }}</div>
                 @endif

+ 0 - 1
resources/views/app/patient/dashboard.blade.php

@@ -1,6 +1,5 @@
 @extends ('layouts.patient')
 
-
 @section('section-title')
     Patient Dashboard
 @endsection

+ 26 - 8
resources/views/layouts/patient.blade.php

@@ -77,7 +77,7 @@
                         <div class="d-flex">
                             <div class="">
                                 <div class="d-flex">
-                                    <div class="d-flex">
+                                    <div class="d-flex align-items-center">
                                         <div class="font-weight-bold" style="font-size: 1.4em">
                                             {{$patient->name_last}}, {{$patient->name_first}}
                                         </div>
@@ -86,7 +86,7 @@
                                             {{$patient->age_in_years}} y.o. {{$patient->sex}}
                                         </span>
                                     </div>
-                                    <div>
+                                    <div class="align-items-center d-flex">
                                         <i class="badge badge-info ml-3">
                                             #{{$patient->chart_number}}
                                         </i>
@@ -106,7 +106,7 @@
                                                 </div>
                                             @endif
                                         @else
-                                            none! 
+                                            none!
                                             <div moe>
                                                 <a href="" start show>[assign someone]</a>
                                                 <form url="/api/client/putMcp">
@@ -133,7 +133,7 @@
                                             @if($patient->cm)
                                                 {{$patient->cm->name_display}}
                                             @else
-                                                none! 
+                                                none!
                                                 <div moe>
                                                     <a href="" start show>[assign someone]</a>
                                                     <form url="/api/client/putCmPro">
@@ -166,9 +166,8 @@
                                                     Medicare Part B <i class="fa fa-check"></i>
                                                 @else
                                                     Not Medicare Part B <i class="fa fa-times"></i>
-                                                    |
                                                     @if($patient->is_medicare_advantage == 'YES')
-                                                        Medicare Advantage,
+                                                        , Medicare Advantage,
                                                         {{$patient->medicare_advantage_plan}}
                                                     @endif
                                                 @endif
@@ -181,6 +180,23 @@
                                             None provided. <i class="fa fa-times"></i>
                                         @endif
                                     </div>
+                                    <div class="pl-3">
+                                        <strong>PCP:</strong>
+                                        @if($patient->mcp)
+                                            {{$patient->mcp->displayName()}}...
+                                            @if($patient->has_mcp_done_onboarding_visit == 'YES')
+                                                <strong>First E&M
+                                                    Visit:</strong> {{$patient->mcp_onboarding_visit_date}}...
+                                                <strong>Last E&M Visit:</strong>
+                                                {$patient->most_recent_mcp_em_visit_date}...
+                                                <strong>Next E&M Visit:</strong> {$patient->next_mcp_em_visit_date}
+                                            @else
+                                                Patient has not been seen yet!
+                                            @endif
+                                        @else
+                                            none! [assign someone]
+                                        @endif
+                                    </div>
                                 </div>
                                 <div class="d-flex">
                                     <div>
@@ -190,7 +206,8 @@
                                         T2DM, CAD, HTN, Weight Loss
                                     </div>
                                     <div class="pl-4">
-                                        <strong>Ht:</strong> ___ in. <strong>Wt:</strong> ___ lbs. <strong>BMI:</strong> ___ (UNDER/NORM/OVERWEIGHT/OBESE)
+                                        <strong>Ht:</strong> ___ in. <strong>Wt:</strong> ___ lbs. <strong>BMI:</strong>
+                                        ___
                                     </div>
                                 </div>
                                 <div>
@@ -207,7 +224,8 @@
                                     <i class="fa fa-plus-circle"></i>
                                     Note
                                 </button>
-                                <button class="btn btn-primary btn-sm">
+                                <br>
+                                <button class="btn btn-primary btn-sm mt-2">
                                     <i class="fa fa-book"></i>
                                     Education
                                 </button>

+ 2 - 0
resources/views/layouts/template.blade.php

@@ -28,6 +28,8 @@
 
 <body>
 <div id="mask" style="background: rgba(0, 0, 0, 0) url(&quot;/vanillaspin.gif&quot;) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 9999; width: 100%; height: 100%; display: none;">
+</div>
+<div id="moe-form-mask" style="background: rgba(0, 0, 0, .1) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 99; width: 100%; height: 100%; display: none;">
 </div>
 
     <nav class="navbar navbar-expand-md navbar-dark stag-primary-bg py-1">