profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/robertdown/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Robert Down RN robertdown @openemr Orlando, Florida Project Administrator of @openemr, registered nurse, believer in big data, open source, and healthcare for all

openemr/openemr-devops 49

OpenEMR administration and deployment tooling

robertdown/openemr 4

OpenEMR is the most popular open source electronic health records and medical practice management solution. ONC certified with international usage, OpenEMR's goal is a superior alternative to its proprietary counterparts.

robertdown/demo-data-generator 1

Generate fictional demo data for testing of OpenEMR

robertdown/buzzr 0

Node-based quiz app

robertdown/COVID-19 0

Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE

robertdown/demo_farm_openemr 0

Demo farm for OpenEMR

robertdown/dotsync 0

Sync dotfiles between multiple machines from a git repo or push using rsync

pull request commentopenemr/openemr

Enhancing Login Page Customizations and Twig Migration

I’m going to add one more global option to show/hide the label fields for username and password. Plan to add in the next couple of days

robertdown

comment created time in 4 days

push eventrobertdown/openemr

stephen waite

commit sha 2815711896fe6fc96f3806dbb8ba5e28a50d1541

fix upgrade version selected in dropdown and misc php8 fixes (#4629) * fix upgrade version selected in dropdown and misc php8 fixes * restore comment in docblock * format advice * move advice to paragraph and restore single xlt statement * typo

view details

push time in 5 days

PR closed openemr/openemr

Ensure the array key exists prior to checking it to suppress a log wa…

Fixes #4633

Short description of what this resolves:

Ensures the array key exists prior to referencing it which ensures undefined key warnings no longer logged.

+1 -1

0 comment

1 changed file

robertdown

pr closed time in 5 days

delete branch robertdown/openemr

delete branch : quickfix--supress-undefined-array-key

delete time in 5 days

issue closedopenemr/openemr

Kernel isDev() logs undefined key

Describe the bug

The recent change I submitted to the Kernel class does not properly ensure a key exists in the array prior to referencing it. This leads to log bloat with lots of warnings.

To Reproduce

Pull master, go to Medical Dashboard screen, check PHP log

Expected behavior

No warning logged

closed time in 5 days

robertdown

issue commentopenemr/openemr

Kernel isDev() logs undefined key

@sunsetsystems beat me to the fix in #4629

robertdown

comment created time in 5 days

PR opened openemr/openemr

Ensure the array key exists prior to checking it to suppress a log wa…

Fixes #4633

Short description of what this resolves:

Ensures the array key exists prior to referencing it which ensures undefined key warnings no longer logged.

+1 -1

0 comment

1 changed file

pr created time in 5 days

issue openedopenemr/openemr

Kernel isDev() logs undefined key

Describe the bug

The recent change I submitted to the Kernel class does not properly ensure a key exists in the array prior to referencing it. This leads to log bloat with lots of warnings.

To Reproduce

Pull master, go to Medical Dashboard screen, check PHP log

Expected behavior

No warning logged

created time in 5 days

create barnchrobertdown/openemr

branch : quickfix--supress-undefined-array-key

created branch time in 5 days

delete branch robertdown/openemr

delete branch : demographic_form_enhancement

delete time in 5 days

push eventrobertdown/openemr

Robert Down

commit sha 5f37a79995155cfc58701a015c5b97ab8a44f3fe

Pass the google client id in

view details

push time in 5 days

pull request commentopenemr/openemr

Enhancing Login Page Customizations and Twig Migration

Can confirm that these changes do not break the Google Sign-in process, I manually tested that and it still works

robertdown

comment created time in 5 days

push eventrobertdown/openemr

Robert Down

commit sha 116dabf1a98fe3f58ef097e369b0618110e1f98d

Small correction so the e2e test now passes

view details

push time in 5 days

create barnchrobertdown/openemr

branch : patient_menu_twig

created branch time in 5 days

push eventrobertdown/openemr

Brady Miller

commit sha b41817f402f894d724b2240aadf6f4987adabcd8

minor fixes for recent twig patient summary improvements (#4627)

view details

stephen waite

commit sha 6a6397d56af40818f792e3ff4af598c7ab04edda

Icd 2022 external data load (#4628) * yearly icd update * typo in load_release_date * typo in load_release_date in database.sql

view details

push time in 5 days

push eventrobertdown/openemr

Robert Down

commit sha d908f2b16f82dc7c966862c6a62b211172ea26d4

Fixing typo

view details

push time in 6 days

PR opened openemr/openemr

Enhancing Login Page Customizations and Twig Migration

Changes proposed in this pull request:

This PR adds customization to the login page by creating 3 new global options in the Appearance section. First, a boolean that will hide the tagline. Second, a textbox to customize the tagline if you wanted (The default is now what the previously hard-coded text was). Third, a boolean that hides the Acknowledgement link. The defaults of these new settings match current state to minimize disruption.

The login.scss file was updated doing away with the gradient behind the logo and instead uses the primary theme color of the theme as defined by the bootstrap theme-colors map.

The entire login.php page was moved over to a Twig template to improve separation of business logic from display logic.

The labels on the username and password were hidden by default using .sr-only as they already have a Placeholder attribute, effectively resulting in duplicate directions.

The login icon was removed from the Login button.

+419 -347

0 comment

4 changed files

pr created time in 6 days

push eventrobertdown/openemr

Robert Down

commit sha 567c186ffaaa422f0d5bfc3b53ff3908b08d93fa

Lint fixes

view details

push time in 6 days

create barnchrobertdown/openemr

branch : login-screen

created branch time in 6 days

push eventrobertdown/openemr

Robert Down

commit sha b95a3fd062c01e3afa83ce45fb79d97dc604f573

Bring Twig back (again) and add some enhancements

view details

Robert Down

commit sha 29e43fbc4def82cb4f78e96df0f73fc5ba3f6703

Undo the Twig stuff in globals since it is already in Common

view details

Stephen Nielson

commit sha 42defec1aa3791d927dcab389d545b257b8e51d0

Add provenance author to code commits (#4603)

view details

Rod Roark

commit sha 7009c308b4050b8ab58b53f402f686a263d777f4

Fixed typo in CSV loader for translations.

view details

Brady Miller

commit sha fb52a8b69a798442cba843f3fe63939bd17d4283

incorporate swagger for api documentation and testing (#4605) Co-authored-by: Stephen Nielson <stephen@nielson.org>

view details

Brady Miller

commit sha 0434d4028422701c79ebb906ba2d68bcb571e7ca

devtools for swagger and api dev and testing (#4611)

view details

stephen waite

commit sha e71a3ff9a299a6a62230547562e837331acd37af

fixes for edihistory, remove jquery ui residuals, replace php each function removed in php8 (#4613) * fixes for edihistory, remove jquery ui residuals * replace deprecated each with foreach #2296

view details

stephen waite

commit sha 27bf27b9ce2d44b3afbdaceaf112e8c19b855b14

fixes from forum (#4617)

view details

Brady Miller

commit sha d1f1b46a4ef5207c460cadb873ac6aa778b0de9e

some more api documentation (#4615)

view details

Brady Miller

commit sha 9c12dec9c2d664dd3e8b764a419f314f8d0d6ce1

quick minor clean to api documentation

view details

Brady Miller

commit sha 0fa8b96401dada19b9baaad846832013abca157c

Updating easy dev env (#4621) * multisite fix * updated devtool docs and using alpine 3.14 flex docker in ci

view details

Brady Miller

commit sha 0c8693e89ad0286f76a1a841d941a9364f03b5e4

more api documentation (#4625) - also fixed api documentation for standard api documents endpoints, so can now upload and download documents in swagger ui.

view details

Robert Down

commit sha eb0f49d221d1a68a7ef299a1a3b1f02fc31a6d0f

Make Kernel DI optional

view details

Robert Down

commit sha 3d0e140dca82be7bc41fcb3493529c3e68610a6f

PSR12 Linting Fixes

view details

Robert Down RN

commit sha 8d0be586568fe560996010455a21d1e8574da6cc

Merge pull request #4607 from robertdown/twig_enhancement Twig Enhancements

view details

Robert Down RN

commit sha da491449315136454e996bd49900f6f59e603773

Tab UI improvement (#4626) * Reduced padding on the main menu * Smaller font sizes on main menu and tabs * Better spacing of various tab items

view details

Robert Down RN

commit sha ab4ed0595e4316647eaff1287340ed1c39a535f0

Medical Dashboard UI Improvements (#4623) Update the UI/UX of the Medical Dashboard screen

view details

Brady Miller

commit sha 654dac01dfb9cafba3f65ea8dca280b57e260c59

quick fix to prior commit for broken sql query (my fault :) )

view details

Robert Down

commit sha 3a343e047001ac4f053acc2481695cfdb21de1e6

Layout and Layout Props enhancements

view details

push time in 10 days

push eventrobertdown/openemr

Robert Down RN

commit sha ab4ed0595e4316647eaff1287340ed1c39a535f0

Medical Dashboard UI Improvements (#4623) Update the UI/UX of the Medical Dashboard screen

view details

Brady Miller

commit sha 654dac01dfb9cafba3f65ea8dca280b57e260c59

quick fix to prior commit for broken sql query (my fault :) )

view details

push time in 10 days

delete branch robertdown/openemr

delete branch : pt-summary

delete time in 10 days

push eventopenemr/openemr

Robert Down RN

commit sha ab4ed0595e4316647eaff1287340ed1c39a535f0

Medical Dashboard UI Improvements (#4623) Update the UI/UX of the Medical Dashboard screen

view details

push time in 10 days

PR merged openemr/openemr

Medical Dashboard UI Improvements Status: Needs Review UI Modernization

Changes proposed in this pull request:

This PR improves the UI of the Medical Dashboard screen creating cards, providing separation between section, improving the appointments section, and drawing attention to critical allergies. Additionally, it breaks apart the business logic from the presentation logic. Now, all the PHP required to generate the UI is handled in demographics.php and then several new Twig templates actually render the UI. Some before/after screenshots attached

Before

Screenshot 2021-09-14 at 00-23-37 OpenEMR Screenshot 2021-09-14 at 00-24-04 OpenEMR

After

Screenshot 2021-09-14 at 00-24-55 OpenEMR Screenshot 2021-09-14 at 00-25-08 OpenEMR Screenshot 2021-09-14 at 00-25-16 OpenEMR

+2145 -2036

6 comments

33 changed files

robertdown

pr closed time in 10 days

push eventrobertdown/openemr

Robert Down

commit sha 97d7c77310d517da47db8e246071b5436719dc27

Addressing the table name binding issue

view details

push time in 10 days

push eventrobertdown/openemr

Robert Down

commit sha 3cbdfd3ebcc3a6c28659d4de2755852ea948a85c

Fix an issue with the allergy ID

view details

push time in 10 days

push eventrobertdown/openemr

Robert Down

commit sha 5a83a229bcc3584b36d9fc6f34bf518357643573

Last minute reordering of filter to promote best practice

view details

push time in 10 days

Pull request review commentopenemr/openemr

Medical Dashboard UI Improvements

 function image_widget($doc_id, $doc_catg) if (!empty($result3['provider'])) {   // Use provider in case there is an ins record w/ unassigned insco     $insco_name = getInsuranceProvider($result3['provider']); }++$arrOeUiSettings = array(+    'heading_title' => xl('Medical Record Dashboard'),+    'include_patient_name' => true,+    'expandable' => false,+    'expandable_files' => array(), //all file names need suffix _xpd+    'action' => "", //conceal, reveal, search, reset, link or back+    'action_title' => "",+    'action_href' => "", //only for actions - reset, link or back+    'show_help_icon' => true,+    'help_file_name' => "medical_dashboard_help.php"+);+$oemr_ui = new OemrUI($arrOeUiSettings); ?> <html>  <head>+    <?php+    Header::setupHeader(['common']);+    require_once("$srcdir/options.js.php");+    ?>+    <script>+        function oldEvt(apptdate, eventid) {+            let title = <?php echo xlj('Appointments'); ?>;+            dlgopen('../../main/calendar/add_edit_event.php?date=' + encodeURIComponent(apptdate) + '&eid=' + encodeURIComponent(eventid), '_blank', 800, 500, '', title);+        } -<?php-Header::setupHeader(['common']);-require_once("$srcdir/options.js.php");-?>-<script>-    function oldEvt(apptdate, eventid) {-        let title = <?php echo xlj('Appointments'); ?>;-        dlgopen('../../main/calendar/add_edit_event.php?date=' + encodeURIComponent(apptdate) + '&eid=' + encodeURIComponent(eventid), '_blank', 800, 500, '', title);-    }+        function advdirconfigure() {+            dlgopen('advancedirectives.php', '_blank', 400, 500);+        } -    function advdirconfigure() {-        dlgopen('advancedirectives.php', '_blank', 400, 500);-    }+        function refreshme() {+            top.restoreSession();+            location.reload();+        } -    function refreshme() {-        top.restoreSession();-        location.reload();-    }+        // Process click on Delete link.+        function deleteme() { // @todo don't think this is used any longer!!+            dlgopen('../deleter.php?patient=' + <?php echo js_url($pid); ?> + '&csrf_token_form=' + <?php echo js_url(CsrfUtils::collectCsrfToken()); ?>, '_blank', 500, 450, '', '', {+                allowResize: false,+                allowDrag: false,+                dialogId: 'patdel',+                type: 'iframe'+            });+            return false;+        } -    // Process click on Delete link.-    function deleteme() { // @todo don't think this is used any longer!!-        dlgopen('../deleter.php?patient=' + <?php echo js_url($pid); ?> +'&csrf_token_form=' + <?php echo js_url(CsrfUtils::collectCsrfToken()); ?>, '_blank', 500, 450, '', '', {-            allowResize: false,-            allowDrag: false,-            dialogId: 'patdel',-            type: 'iframe'-        });-        return false;-    }+        // Called by the deleteme.php window on a successful delete.+        function imdeleted() {+            top.clearPatient();+        } -    // Called by the deleteme.php window on a successful delete.-    function imdeleted() {-        top.clearPatient();-    }+        function newEvt() {+            let title = <?php echo xlj('Appointments'); ?>;+            let url = '../../main/calendar/add_edit_event.php?patientid=' + <?php echo js_url($pid); ?>;+            dlgopen(url, '_blank', 800, 500, '', title);+            return false;+        } -    function newEvt() {-        let title = <?php echo xlj('Appointments'); ?>;-        let url = '../../main/calendar/add_edit_event.php?patientid=' + <?php echo js_url($pid); ?>;-        dlgopen(url, '_blank', 800, 500, '', title);-        return false;-    }+        function getWeno() {+            top.restoreSession();+            location.href = '../../weno/indexrx.php'+        } -    function getWeno() {-        top.restoreSession();-        location.href = '../../weno/indexrx.php'-    }-</script>--<script>--    function toggleIndicator(target, div) {-// <i id="show_hide" class="fa fa-lg small fa-eye-slash" title="Click to Hide"></i>-        $mode = $(target).find(".indicator").text();-        if ($mode == <?php echo xlj('collapse'); ?> ) {-            $(target).find(".indicator").text(<?php echo xlj('expand'); ?>);-            $("#" + div).hide();-            $.post("../../../library/ajax/user_settings.php",-                {+        function toggleIndicator(target, div) {+            // <i id="show_hide" class="fa fa-lg small fa-eye-slash" title="Click to Hide"></i>+            $mode = $(target).find(".indicator").text();+            if ($mode == <?php echo xlj('collapse'); ?>) {+                $(target).find(".indicator").text(<?php echo xlj('expand'); ?>);+                $("#" + div).hide();+                $.post("../../../library/ajax/user_settings.php", {                     target: div,                     mode: 0,                     csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>-                }-            );-        } else {-            $(target).find(".indicator").text(<?php echo xlj('collapse'); ?>);-            $("#" + div).show();-            $.post("../../../library/ajax/user_settings.php",-                {+                });+            } else {+                $(target).find(".indicator").text(<?php echo xlj('collapse'); ?>);+                $("#" + div).show();+                $.post("../../../library/ajax/user_settings.php", {                     target: div,                     mode: 1,                     csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>-                }-            );+                });+            }         }-    } -    // edit prescriptions dialog.-    // called from stats.php.-    //-    function editScripts(url) {-        var AddScript = function () {-            var __this = $(this);-            __this.find("#clearButton").css("display", "");-            __this.find("#backButton").css("display", "");-            __this.find("#addButton").css("display", "none");--            var iam = top.frames.editScripts;-            iam.location.href = '<?php echo $GLOBALS['webroot']?>/controller.php?prescription&edit&id=0&pid=' + <?php echo js_url($pid); ?>;-        };-        var ListScripts = function () {-            var __this = $(this);-            __this.find("#clearButton").css("display", "none");-            __this.find("#backButton").css("display", "none");-            __this.find("#addButton").css("display", "");-            var iam = top.frames.editScripts-            iam.location.href = '<?php echo $GLOBALS['webroot']?>/controller.php?prescription&list&id=' + <?php echo js_url($pid); ?>;-        };--        let title = <?php echo xlj('Prescriptions'); ?>;-        let w = 960; // for weno width--        dlgopen(url, 'editScripts', w, 400, '', '', {-            buttons: [-                {text: <?php echo xlj('Add'); ?>, close: false, id: 'addButton', class: 'btn-primary btn-sm', click: AddScript},-                {text: <?php echo xlj('Clear'); ?>, close: false, id: 'clearButton', style: 'display:none;', class: 'btn-primary btn-sm', click: AddScript},-                {text: <?php echo xlj('Back'); ?>, close: false, id: 'backButton', style: 'display:none;', class: 'btn-primary btn-sm', click: ListScripts},-                {text: <?php echo xlj('Quit'); ?>, close: true, id: 'doneButton', class: 'btn-secondary btn-sm'}-            ],-            onClosed: 'refreshme',-            allowResize: true,-            allowDrag: true,-            dialogId: 'editscripts',-            type: 'iframe'-        });-    }--    /**-     * async function fetchHtml(...)-     *-     * @param {*} url-     * @param {boolean} embedded-     * @param {boolean} sessionRestore-     * @returns {text}-     */-    async function fetchHtml(url, embedded = false, sessionRestore = false) {-        if (sessionRestore === true) {-            // restore cookie before fetch.-            top.restoreSession();-        }-        let csrf = new FormData;-        // a security given.-        csrf.append("csrf_token_form", <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>);-        if (embedded === true) {-            // special formatting in certain widgets.-            csrf.append("embeddedScreen", true);+        // edit prescriptions dialog.+        // called from stats.php.+        //+        function editScripts(url) {+            var AddScript = function() {+                var __this = $(this);+                __this.find("#clearButton").css("display", "");+                __this.find("#backButton").css("display", "");+                __this.find("#addButton").css("display", "none");++                var iam = top.frames.editScripts;+                iam.location.href = '<?php echo $GLOBALS['webroot'] ?>/controller.php?prescription&edit&id=0&pid=' + <?php echo js_url($pid); ?>;+            };+            var ListScripts = function() {+                var __this = $(this);+                __this.find("#clearButton").css("display", "none");+                __this.find("#backButton").css("display", "none");+                __this.find("#addButton").css("display", "");+                var iam = top.frames.editScripts+                iam.location.href = '<?php echo $GLOBALS['webroot'] ?>/controller.php?prescription&list&id=' + <?php echo js_url($pid); ?>;+            };++            let title = <?php echo xlj('Prescriptions'); ?>;+            let w = 960; // for weno width++            dlgopen(url, 'editScripts', w, 400, '', '', {+                buttons: [{+                        text: <?php echo xlj('Add'); ?>,+                        close: false,+                        id: 'addButton',+                        class: 'btn-primary btn-sm',+                        click: AddScript+                    },+                    {+                        text: <?php echo xlj('Clear'); ?>,+                        close: false,+                        id: 'clearButton',+                        style: 'display:none;',+                        class: 'btn-primary btn-sm',+                        click: AddScript+                    },+                    {+                        text: <?php echo xlj('Back'); ?>,+                        close: false,+                        id: 'backButton',+                        style: 'display:none;',+                        class: 'btn-primary btn-sm',+                        click: ListScripts+                    },+                    {+                        text: <?php echo xlj('Quit'); ?>,+                        close: true,+                        id: 'doneButton',+                        class: 'btn-secondary btn-sm'+                    }+                ],+                onClosed: 'refreshme',+                allowResize: true,+                allowDrag: true,+                dialogId: 'editscripts',+                type: 'iframe'+            });         } -        const response = await fetch(url, {-            method: 'POST',-            credentials: 'same-origin',-            body: csrf-        });-        return await response.text();-    }+        /**+         * async function fetchHtml(...)+         *+         * @param {*} url+         * @param {boolean} embedded+         * @param {boolean} sessionRestore+         * @returns {text}+         */+        async function fetchHtml(url, embedded = false, sessionRestore = false) {+            if (sessionRestore === true) {+                // restore cookie before fetch.+                top.restoreSession();+            }+            let csrf = new FormData;+            // a security given.+            csrf.append("csrf_token_form", <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>);+            if (embedded === true) {+                // special formatting in certain widgets.+                csrf.append("embeddedScreen", true);+            } -    /**-     * async function placeHtml(...) will await fetch of html then place in divId.-     * This function will return a promise for use to init various items regarding-     * inserted HTML if needed.-     * If divId does not exist, then will skip.-     * Example-     *-     * @param {*} url-     * @param {string} divId id-     * @param {boolean} embedded-     * @param {boolean} sessionRestore-     * @returns {object} promise-     */-    async function placeHtml(url, divId, embedded = false, sessionRestore = false) {-        const contentDiv = document.getElementById(divId);-        if (contentDiv) {-            await fetchHtml(url, embedded, sessionRestore).then(fragment => {-                contentDiv.innerHTML = fragment;+            const response = await fetch(url, {+                method: 'POST',+                credentials: 'same-origin',+                body: csrf             });+            return await response.text();         }-    } -    if (typeof load_location === 'undefined') {-        function load_location(location) {-            top.restoreSession();-            document.location = location;+        /**+         * async function placeHtml(...) will await fetch of html then place in divId.+         * This function will return a promise for use to init various items regarding+         * inserted HTML if needed.+         * If divId does not exist, then will skip.+         * Example+         *+         * @param {*} url+         * @param {string} divId id+         * @param {boolean} embedded+         * @param {boolean} sessionRestore+         * @returns {object} promise+         */+        async function placeHtml(url, divId, embedded = false, sessionRestore = false) {+            const contentDiv = document.getElementById(divId);+            if (contentDiv) {+                await fetchHtml(url, embedded, sessionRestore).then(fragment => {+                    contentDiv.innerHTML = fragment;+                });+            }         }-    } -    $(function () {-        var msg_updation = '';-        <?php-        if ($GLOBALS['erx_enable']) {-            $soap_status = sqlStatement("select soap_import_status,pid from patient_data where pid=? and soap_import_status in ('1','3')", array($pid));-            while ($row_soapstatus = sqlFetchArray($soap_status)) { ?>-        top.restoreSession();-        $.ajax({-            type: "POST",-            url: "../../soap_functions/soap_patientfullmedication.php",-            dataType: "html",-            data: {-                patient:<?php echo js_escape($row_soapstatus['pid']); ?>,-            },-            async: false,-            success: function (thedata) {-                //alert(thedata);-                msg_updation += thedata;-            },-            error: function () {-                alert('ajax error');+        if (typeof load_location === 'undefined') {+            function load_location(location) {+                top.restoreSession();+                document.location = location;             }-        });+        } -        top.restoreSession();-        $.ajax({-            type: "POST",-            url: "../../soap_functions/soap_allergy.php",-            dataType: "html",-            data: {-                patient:<?php echo js_escape($row_soapstatus['pid']); ?>,-            },-            async: false,-            success: function (thedata) {-                //alert(thedata);-                msg_updation += thedata;-            },-            error: function () {-                alert('ajax error');-            }-        });-                <?php-                if ($GLOBALS['erx_import_status_message']) { ?>-        if (msg_updation)-            alert(msg_updation);+        $(function() {+            var msg_updation = '';+            <?php+            if ($GLOBALS['erx_enable']) {+                $soap_status = sqlStatement("select soap_import_status,pid from patient_data where pid=? and soap_import_status in ('1','3')", array($pid));+                while ($row_soapstatus = sqlFetchArray($soap_status)) { ?>+                    top.restoreSession();+                    $.ajax({+                        type: "POST",+                        url: "../../soap_functions/soap_patientfullmedication.php",+                        dataType: "html",+                        data: {+                            patient: <?php echo js_escape($row_soapstatus['pid']); ?>,+                        },+                        async: false,+                        success: function(thedata) {+                            //alert(thedata);+                            msg_updation += thedata;+                        },+                        error: function() {+                            alert('ajax error');+                        }+                    });++                    top.restoreSession();+                    $.ajax({+                        type: "POST",+                        url: "../../soap_functions/soap_allergy.php",+                        dataType: "html",+                        data: {+                            patient: <?php echo js_escape($row_soapstatus['pid']); ?>,+                        },+                        async: false,+                        success: function(thedata) {+                            //alert(thedata);+                            msg_updation += thedata;+                        },+                        error: function() {+                            alert('ajax error');+                        }+                    });                     <?php+                    if ($GLOBALS['erx_import_status_message']) { ?>+                        if (msg_updation)+                            alert(msg_updation);+                        <?php+                    }                 }             }-        }-        ?>+            ?> -        // load divs-        placeHtml("stats.php", "stats_div", true);-        placeHtml("pnotes_fragment.php", 'pnotes_ps_expand').then(() => {-            // must be delegated event!-            $(this).on("click", ".complete_btn", function(){-                let btn = $(this);-                let csrf = new FormData;-                csrf.append("csrf_token_form", <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>);-                fetch("pnotes_fragment.php?docUpdateId=" + encodeURIComponent(btn.attr('data-id')),-                    {-                    method: "POST",-                    credentials: 'same-origin',-                    body: csrf-                })-                .then(function() {-                    placeHtml("pnotes_fragment.php", 'pnotes_ps_expand');+            // load divs+            placeHtml("stats.php", "stats_div", true);+            placeHtml("pnotes_fragment.php", 'pnotes_ps_expand').then(() => {+                // must be delegated event!+                $(this).on("click", ".complete_btn", function() {+                    let btn = $(this);+                    let csrf = new FormData;+                    csrf.append("csrf_token_form", <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>);+                    fetch("pnotes_fragment.php?docUpdateId=" + encodeURIComponent(btn.attr('data-id')), {+                            method: "POST",+                            credentials: 'same-origin',+                            body: csrf+                        })+                        .then(function() {+                            placeHtml("pnotes_fragment.php", 'pnotes_ps_expand');+                        });                 });             });-        });-        placeHtml("disc_fragment.php", "disclosures_ps_expand");-        placeHtml("labdata_fragment.php", "labdata_ps_expand");-        placeHtml("track_anything_fragment.php", "track_anything_ps_expand");-        <?php if ($vitals_is_registered && AclMain::aclCheckCore('patients', 'med')) { ?>-        // Initialize the Vitals form if it is registered and user is authorized.-        placeHtml("vitals_fragment.php", "vitals_ps_expand");-        <?php } ?>--        <?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_crw']) { ?>-        placeHtml("clinical_reminders_fragment.php", "clinical_reminders_ps_expand", true, true).then(() => {-            // (note need to place javascript code here also to get the dynamic link to work)-            $(".medium_modal").on('click', function (e) {+            placeHtml("disc_fragment.php", "disclosures_ps_expand");+            placeHtml("labdata_fragment.php", "labdata_ps_expand");+            placeHtml("track_anything_fragment.php", "track_anything_ps_expand");+            <?php if ($vitals_is_registered && AclMain::aclCheckCore('patients', 'med')) { ?>+                // Initialize the Vitals form if it is registered and user is authorized.+                placeHtml("vitals_fragment.php", "vitals_ps_expand");+            <?php } ?>++            <?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_crw']) { ?>+                placeHtml("clinical_reminders_fragment.php", "clinical_reminders_ps_expand", true, true).then(() => {+                    // (note need to place javascript code here also to get the dynamic link to work)+                    $(".medium_modal").on('click', function(e) {+                        e.preventDefault();+                        e.stopPropagation();+                        dlgopen('', '', 800, 200, '', '', {+                            buttons: [{+                                text: <?php echo xlj('Close'); ?>,+                                close: true,+                                style: 'secondary btn-sm'+                            }],+                            onClosed: 'refreshme',+                            allowResize: false,+                            allowDrag: true,+                            dialogId: 'demreminder',+                            type: 'iframe',+                            url: $(this).attr('href')+                        });+                    });+                });+            <?php } // end crw+            ?>++            <?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_prw']) { ?>+                placeHtml("patient_reminders_fragment.php", "patient_reminders_ps_expand", false, true);+            <?php } // end prw+            ?>++            <?php+            // Initialize for each applicable LBF form.+            $gfres = sqlStatement("SELECT grp_form_id+                FROM layout_group_properties+                WHERE grp_form_id LIKE 'LBF%'+                    AND grp_group_id = ''+                    AND grp_repeats > 0+                    AND grp_activity = 1+                ORDER BY grp_seq, grp_title");+            while ($gfrow = sqlFetchArray($gfres)) { ?>+                $(<?php echo js_escape("#" . $gfrow['grp_form_id'] . "_ps_expand"); ?>).load("lbf_fragment.php?formname=" + <?php echo js_url($gfrow['grp_form_id']); ?>, {+                    csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>+                });+            <?php } ?>+            tabbify();++            // modal for dialog boxes+            $(".large_modal").on('click', function(e) {                 e.preventDefault();                 e.stopPropagation();-                dlgopen('', '', 800, 200, '', '', {-                    buttons: [-                        {text: <?php echo xlj('Close'); ?>, close: true, style: 'secondary btn-sm'}-                    ],-                    onClosed: 'refreshme',-                    allowResize: false,+                dlgopen('', '', 1000, 600, '', '', {+                    buttons: [{+                        text: <?php echo xlj('Close'); ?>,+                        close: true,+                        style: 'secondary btn-sm'+                    }],+                    allowResize: true,                     allowDrag: true,-                    dialogId: 'demreminder',+                    dialogId: '',                     type: 'iframe',                     url: $(this).attr('href')                 });             });-        });-        <?php } // end crw?>--        <?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_prw']) { ?>-        placeHtml("patient_reminders_fragment.php", "patient_reminders_ps_expand", false, true);-        <?php } // end prw?>--        <?php-        // Initialize for each applicable LBF form.-        $gfres = sqlStatement("SELECT grp_form_id FROM layout_group_properties WHERE " .-            "grp_form_id LIKE 'LBF%' AND grp_group_id = '' AND grp_repeats > 0 AND grp_activity = 1 " .-            "ORDER BY grp_seq, grp_title");-        while ($gfrow = sqlFetchArray($gfres)) { ?>-        $(<?php echo js_escape("#" . $gfrow['grp_form_id'] . "_ps_expand"); ?>).load("lbf_fragment.php?formname=" + <?php echo js_url($gfrow['grp_form_id']); ?>,-            {-                csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>-            }-        );-        <?php } ?>-        tabbify();--// modal for dialog boxes-        $(".large_modal").on('click', function (e) {-            e.preventDefault();-            e.stopPropagation();-            dlgopen('', '', 1000, 600, '', '', {-                buttons: [-                    {text: <?php echo xlj('Close'); ?>, close: true, style: 'secondary btn-sm'}-                ],-                allowResize: true,-                allowDrag: true,-                dialogId: '',-                type: 'iframe',-                url: $(this).attr('href')-            });-        }); -        $(".rx_modal").on('click', function (e) {-            e.preventDefault();-            e.stopPropagation();-            var title = <?php echo xlj('Amendments'); ?>;-            dlgopen('', 'editAmendments', 800, 300, '', title, {-                onClosed: 'refreshme',-                allowResize: true,-                allowDrag: true,-                dialogId: '',-                type: 'iframe',-                url: $(this).attr('href')+            $(".rx_modal").on('click', function(e) {+                e.preventDefault();+                e.stopPropagation();+                var title = <?php echo xlj('Amendments'); ?>;+                dlgopen('', 'editAmendments', 800, 300, '', title, {+                    onClosed: 'refreshme',+                    allowResize: true,+                    allowDrag: true,+                    dialogId: '',+                    type: 'iframe',+                    url: $(this).attr('href')+                });             });-        }); -// modal for image viewer-        $(".image_modal").on('click', function (e) {-            e.preventDefault();-            e.stopPropagation();-            dlgopen('', '', 400, 300, '', <?php echo xlj('Patient Images'); ?>, {-                allowResize: true,-                allowDrag: true,-                dialogId: '',-                type: 'iframe',-                url: $(this).attr('href')+            // modal for image viewer+            $(".image_modal").on('click', function(e) {+                e.preventDefault();+                e.stopPropagation();+                dlgopen('', '', 400, 300, '', <?php echo xlj('Patient Images'); ?>, {+                    allowResize: true,+                    allowDrag: true,+                    dialogId: '',+                    type: 'iframe',+                    url: $(this).attr('href')+                });             });-        }); -        $(".deleter").on('click', function (e) {-            e.preventDefault();-            e.stopPropagation();-            dlgopen('', '', 600, 360, '', '', {-                buttons: [-                    {text: <?php echo xlj('Close'); ?>, close: true, style: 'secondary btn-sm'}-                ],-                //onClosed: 'imdeleted',-                allowResize: false,-                allowDrag: false,-                dialogId: 'patdel',-                type: 'iframe',-                url: $(this).attr('href')+            $(".deleter").on('click', function(e) {+                e.preventDefault();+                e.stopPropagation();+                dlgopen('', '', 600, 360, '', '', {+                    buttons: [{+                        text: <?php echo xlj('Close'); ?>,+                        close: true,+                        style: 'secondary btn-sm'+                    }],+                    //onClosed: 'imdeleted',+                    allowResize: false,+                    allowDrag: false,+                    dialogId: 'patdel',+                    type: 'iframe',+                    url: $(this).attr('href')+                });             });-        }); -        $(".iframe1").on('click', function (e) {-            e.preventDefault();-            e.stopPropagation();-            dlgopen('', '', 350, 300, '', '', {-                buttons: [-                    {text: <?php echo xlj('Close'); ?>, close: true, style: 'secondary btn-sm'}-                ],-                allowResize: true,-                allowDrag: true,-                dialogId: '',-                type: 'iframe',-                url: $(this).attr('href')+            $(".iframe1").on('click', function(e) {+                e.preventDefault();+                e.stopPropagation();+                dlgopen('', '', 350, 300, '', '', {+                    buttons: [{+                        text: <?php echo xlj('Close'); ?>,+                        close: true,+                        style: 'secondary btn-sm'+                    }],+                    allowResize: true,+                    allowDrag: true,+                    dialogId: '',+                    type: 'iframe',+                    url: $(this).attr('href')+                });             });-        });-// for patient portal-        $(".small_modal").on('click', function (e) {-            e.preventDefault();-            e.stopPropagation();-            dlgopen('', '', 380, 200, '', '', {-                buttons: [-                    {text: <?php echo xlj('Close'); ?>, close: true, style: 'secondary btn-sm'}-                ],-                allowResize: true,-                allowDrag: true,-                dialogId: '',-                type: 'iframe',-                url: $(this).attr('href')+            // for patient portal+            $(".small_modal").on('click', function(e) {+                e.preventDefault();+                e.stopPropagation();+                dlgopen('', '', 380, 200, '', '', {+                    buttons: [{+                        text: <?php echo xlj('Close'); ?>,+                        close: true,+                        style: 'secondary btn-sm'+                    }],+                    allowResize: true,+                    allowDrag: true,+                    dialogId: '',+                    type: 'iframe',+                    url: $(this).attr('href')+                });             });++            function openReminderPopup() {+                top.restoreSession()+                dlgopen('', 'reminders', 500, 250, '', '', {+                    buttons: [{+                        text: <?php echo xlj('Close'); ?>,+                        close: true,+                        style: 'secondary btn-sm'+                    }],+                    allowResize: true,+                    allowDrag: true,+                    dialogId: '',+                    type: 'iframe',+                    url: $("#reminder_popup_link").attr('href')+                });+            }++            <?php if ($GLOBALS['patient_birthday_alert']) {+                // To display the birthday alert:+                //  1. The patient is not deceased+                //  2. The birthday is today (or in the past depending on global selection)+                //  3. The notification has not been turned off (or shown depending on global selection) for this year+                $birthdayAlert = new BirthdayReminder($pid, $_SESSION['authUserID']);+                if ($birthdayAlert->isDisplayBirthdayAlert()) {+                    ?>+                    // show the active reminder modal+                    dlgopen('', 'bdayreminder', 300, 170, '', false, {+                        allowResize: false,+                        allowDrag: true,+                        dialogId: '',+                        type: 'iframe',+                        url: $("#birthday_popup").attr('href')+                    });++                <?php } elseif ($active_reminders || $all_allergy_alerts) { ?>+                    openReminderPopup();+                <?php } ?>+            <?php } elseif ($active_reminders || $all_allergy_alerts) { ?>+                openReminderPopup();+            <?php } ?>++            // $(".card-title").on('click', "button", (e) => {+            //     console.debug("click");+            //     updateUserVisibilitySetting(e);+            // });         }); -        function openReminderPopup() {-            top.restoreSession()-            dlgopen('', 'reminders', 500, 250, '', '', {-                buttons: [-                    {text: <?php echo xlj('Close'); ?>, close: true, style: 'secondary btn-sm'}-                ],-                allowResize: true,-                allowDrag: true,-                dialogId: '',-                type: 'iframe',-                url: $("#reminder_popup_link").attr('href')+        /**+         * Change the preference to expand/collapse a given card.+         *+         * For the given e element, find the corresponding card body, determine if it is collapsed+         * or shown, and then save the state to the user preferences via an async fetch call POST'ing+         * the updated setting.+         *+         * @var e element The Button that was clicked to collapse/expand the card+         */+        async function updateUserVisibilitySetting(e) {+            const targetID = e.target.getAttribute("data-target");+            const target = document.querySelector(targetID);+            const targetStr = targetID.substring(1);++            let formData = new FormData();+            formData.append("csrf_token_form", <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>);+            formData.append("target", targetStr);+            formData.append("mode", (target.classList.contains("show")) ? 0 : 1);++            const response = await fetch("../../../library/ajax/user_settings.php", {+                method: "POST",+                credentials: 'same-origin',+                body: formData,             });++            const update = await response.text();+            return update;         } -        <?php if ($GLOBALS['patient_birthday_alert']) {-        // To display the birthday alert:-        //  1. The patient is not deceased-        //  2. The birthday is today (or in the past depending on global selection)-        //  3. The notification has not been turned off (or shown depending on global selection) for this year-            $birthdayAlert = new BirthdayReminder($pid, $_SESSION['authUserID']);-            if ($birthdayAlert->isDisplayBirthdayAlert()) {-                ?>-        // show the active reminder modal-        dlgopen('', 'bdayreminder', 300, 170, '', false, {-            allowResize: false,-            allowDrag: true,-            dialogId: '',-            type: 'iframe',-            url: $("#birthday_popup").attr('href')-        });+        // Update the User's visibility setting when the card header is clicked+        function cardTitleButtonClickListener() {+            const buttons = document.querySelectorAll(".card-title button[data-toggle='collapse']");+            console.debug(buttons);+            buttons.forEach((b) => {+                b.addEventListener("click", (e) => {+                    updateUserVisibilitySetting(e);+                });+            });+        } -            <?php } elseif ($active_reminders || $all_allergy_alerts) { ?>-        openReminderPopup();-        <?php }?>-        <?php } elseif ($active_reminders || $all_allergy_alerts) { ?>-        openReminderPopup();-        <?php }?>-    });--    // JavaScript stuff to do when a new patient is set.-    //-    function setMyPatient() {-        <?php-        if (isset($_GET['set_pid'])) {-            $date_of_death = is_patient_deceased($pid);-            if (!empty($date_of_death)) {-                $date_of_death = $date_of_death['date_deceased'];-            }-            ?>-        parent.left_nav.setPatient(<?php echo js_escape($result['fname'] . " " . $result['lname']) .-                "," . js_escape($pid) . "," . js_escape($result['pubpid']) . ",'',";-        if (empty($date_of_death)) {-            echo js_escape(" " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAgeDisplay($result['DOB_YMD']));-        } else {-            echo js_escape(" " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age at death') . ": " . oeFormatAge($result['DOB_YMD'], $date_of_death));-        }?>);-        var EncounterDateArray = new Array;-        var CalendarCategoryArray = new Array;-        var EncounterIdArray = new Array;-        var Count = 0;+        // JavaScript stuff to do when a new patient is set.+        //+        function setMyPatient() {             <?php-        //Encounter details are stored to javacript as array.-            $result4 = sqlStatement("SELECT fe.encounter,fe.date,openemr_postcalendar_categories.pc_catname FROM form_encounter AS fe " .-            " left join openemr_postcalendar_categories on fe.pc_catid=openemr_postcalendar_categories.pc_catid  WHERE fe.pid = ? order by fe.date desc", array($pid));-            if (sqlNumRows($result4) > 0) {-                while ($rowresult4 = sqlFetchArray($result4)) {?>-        EncounterIdArray[Count] = <?php echo js_escape($rowresult4['encounter']); ?>;-        EncounterDateArray[Count] = <?php echo js_escape(oeFormatShortDate(date("Y-m-d", strtotime($rowresult4['date'])))); ?>;-        CalendarCategoryArray[Count] = <?php echo js_escape(xl_appt_category($rowresult4['pc_catname'])); ?>;-        Count++;-                    <?php+            if (isset($_GET['set_pid'])) {+                $date_of_death = is_patient_deceased($pid);+                if (!empty($date_of_death)) {+                    $date_of_death = $date_of_death['date_deceased'];                 }-            }+                ?>+                parent.left_nav.setPatient(<?php echo js_escape($result['fname'] . " " . $result['lname']) .+                                                "," . js_escape($pid) . "," . js_escape($result['pubpid']) . ",'',";+                if (empty($date_of_death)) {+                    echo js_escape(" " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAgeDisplay($result['DOB_YMD']));+                } else {+                    echo js_escape(" " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age at death') . ": " . oeFormatAge($result['DOB_YMD'], $date_of_death));+                } ?>);+                var EncounterDateArray = new Array;+                var CalendarCategoryArray = new Array;+                var EncounterIdArray = new Array;+                var Count = 0;+                <?php+                //Encounter details are stored to javacript as array.+                $result4 = sqlStatement("SELECT fe.encounter,fe.date,openemr_postcalendar_categories.pc_catname FROM form_encounter AS fe " .+                    " left join openemr_postcalendar_categories on fe.pc_catid=openemr_postcalendar_categories.pc_catid  WHERE fe.pid = ? order by fe.date desc", array($pid));+                if (sqlNumRows($result4) > 0) {+                    while ($rowresult4 = sqlFetchArray($result4)) { ?>+                        EncounterIdArray[Count] = <?php echo js_escape($rowresult4['encounter']); ?>;+                        EncounterDateArray[Count] = <?php echo js_escape(oeFormatShortDate(date("Y-m-d", strtotime($rowresult4['date'])))); ?>;+                        CalendarCategoryArray[Count] = <?php echo js_escape(xl_appt_category($rowresult4['pc_catname'])); ?>;+                        Count++;+                        <?php+                    }+                }+                ?>+                parent.left_nav.setPatientEncounter(EncounterIdArray, EncounterDateArray, CalendarCategoryArray);+                <?php+            } // end setting new pid             ?>-        parent.left_nav.setPatientEncounter(EncounterIdArray, EncounterDateArray, CalendarCategoryArray);-            <?php-        } // end setting new pid ?>-        parent.left_nav.syncRadios();-        <?php if ((isset($_GET['set_pid'])) && (isset($_GET['set_encounterid'])) && (intval($_GET['set_encounterid']) > 0)) {-            $query_result = sqlQuery("SELECT `date` FROM `form_encounter` WHERE `encounter` = ?", array($encounter)); ?>-            encurl = 'encounter/encounter_top.php?set_encounter=' + <?php echo js_url($encounter);?> +'&pid=' + <?php echo js_url($pid);?>;-            parent.left_nav.setEncounter(<?php echo js_escape(oeFormatShortDate(date("Y-m-d", strtotime($query_result['date'])))); ?>, <?php echo js_escape($encounter); ?>, 'enc');-            top.restoreSession();-            parent.left_nav.loadFrame('enc2', 'enc', 'patient_file/' + encurl);-        <?php } // end setting new encounter id (only if new pid is also set) ?>-    }--    $(window).on('load', function () {-        setMyPatient();-    });+            parent.left_nav.syncRadios();+            <?php if ((isset($_GET['set_pid'])) && (isset($_GET['set_encounterid'])) && (intval($_GET['set_encounterid']) > 0)) {+                $query_result = sqlQuery("SELECT `date` FROM `form_encounter` WHERE `encounter` = ?", array($encounter)); ?>+                encurl = 'encounter/encounter_top.php?set_encounter=' + <?php echo js_url($encounter); ?> + '&pid=' + <?php echo js_url($pid); ?>;+                parent.left_nav.setEncounter(<?php echo js_escape(oeFormatShortDate(date("Y-m-d", strtotime($query_result['date'])))); ?>, <?php echo js_escape($encounter); ?>, 'enc');+                top.restoreSession();+                parent.left_nav.loadFrame('enc2', 'enc', 'patient_file/' + encurl);+            <?php } // end setting new encounter id (only if new pid is also set)+            ?>+        } -</script>+        $(window).on('load', function() {+            setMyPatient();+        }); -<style>-    #pnotes_ps_expand {-        height: auto;-        width: 100%;-    }+        document.addEventListener("DOMContentLoaded", () => {+            cardTitleButtonClickListener();+        });+    </script> -    <?php-    // This is for layout font size override.-    $grparr = array();-    getLayoutProperties('DEM', $grparr, 'grp_size');-    if (!empty($grparr['']['grp_size'])) {-        $FONTSIZE = round($grparr['']['grp_size'] * 1.333333);-        $FONTSIZE = round($FONTSIZE * 0.0625, 2);-        ?>-    /* Override font sizes in the theme. */-    #DEM .groupname {-        font-size: <?php echo attr($FONTSIZE); ?>rem;-    }+    <style>+        .card {+            box-shadow: 1px 1px 1px hsl(0 0% 0% / .2);+            border-radius: 0;+        } -    #DEM .label {-        font-size: <?php echo attr($FONTSIZE); ?>rem;-    }+        <?php+        // This is for layout font size override.+        $grparr = array();+        getLayoutProperties('DEM', $grparr, 'grp_size');+        if (!empty($grparr['']['grp_size'])) {+            $FONTSIZE = round($grparr['']['grp_size'] * 1.333333);+            $FONTSIZE = round($FONTSIZE * 0.0625, 2);+            ?> -    #DEM .data {-        font-size: <?php echo attr($FONTSIZE); ?>rem;-    }+        /* Override font sizes in the theme. */+        #DEM .groupname {+            font-size: <?php echo attr($FONTSIZE); ?>rem;+        } -    #DEM .data td {-        font-size: <?php echo attr($FONTSIZE); ?>rem;-    }+        #DEM .label {+            font-size: <?php echo attr($FONTSIZE); ?>rem;+        } -    <?php } ?>+        #DEM .data {+            font-size: <?php echo attr($FONTSIZE); ?>rem;+        } -</style>-<title><?php echo xlt("Dashboard{{patient file}}"); ?></title>+        #DEM .data td {+            font-size: <?php echo attr($FONTSIZE); ?>rem;+        } -<?php-$arrOeUiSettings = array(-    'heading_title' => xl('Medical Record Dashboard'),-    'include_patient_name' => true,-    'expandable' => false,-    'expandable_files' => array(),//all file names need suffix _xpd-    'action' => "",//conceal, reveal, search, reset, link or back-    'action_title' => "",-    'action_href' => "",//only for actions - reset, link or back-    'show_help_icon' => true,-    'help_file_name' => "medical_dashboard_help.php"-);-$oemr_ui = new OemrUI($arrOeUiSettings);-?>-</head>+        <?php } ?> :root {+            --white: #fff;+            --bg: hsl(0 0% 90%);+        } -<body class="mt-3 patient-demographics">-<div id="container_div" class="<?php echo $oemr_ui->oeContainer(); ?>">-    <a href='../reminder/active_reminder_popup.php' id='reminder_popup_link' style='display: none;' onclick='top.restoreSession()'></a>+        body {+            background: var(--bg) !important;+        } -    <a href='../birthday_alert/birthday_pop.php?pid=<?php echo attr_url($pid); ?>&user_id=<?php echo attr_url($_SESSION['authUserID']); ?>' id='birthday_popup' style='display: none;' onclick='top.restoreSession()'></a>-    <?php+        section {+            background: var(--white);+            margin-top: .25em;+            padding: .25em;+        } -    $thisauth = AclMain::aclCheckCore('patients', 'demo');-    if ($thisauth) {-        if ($result['squad'] && !AclMain::aclCheckCore('squads', $result['squad'])) {-            $thisauth = 0;+        .section-header-dynamic {+            border-bottom: none;         }-    }+    </style>+    <title><?php echo xlt("Dashboard{{patient file}}"); ?></title>+</head> +<body class="mt-3 patient-demographic bg-light">++    <?php     // Create and fire the patient demographics view event     $viewEvent = new ViewEvent($pid);     $viewEvent = $GLOBALS["kernel"]->getEventDispatcher()->dispatch(ViewEvent::EVENT_HANDLE, $viewEvent, 10);+    $thisauth = AclMain::aclCheckCore('patients', 'demo'); -    if (-        !$thisauth ||-        !$viewEvent->authorized()-    ) {-        echo "<p>(" . xlt('Demographics not authorized') . ")</p>\n";-        echo "</body>\n</html>\n";+    if (!$thisauth || !$viewEvent->authorized()) {+        echo $twig->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => "Medical Dashboard"]);         exit();-    }?>+    }+    ?> -    <?php-    if ($thisauth) {?>-    <div>-        <?php require_once("$include_root/patient_file/summary/dashboard_header.php"); ?>-    </div>+    <div id="container_div" class="<?php echo $oemr_ui->oeContainer(); ?> mb-2">+        <a href='../reminder/active_reminder_popup.php' id='reminder_popup_link' style='display: none' onclick='top.restoreSession()'></a>+        <a href='../birthday_alert/birthday_pop.php?pid=<?php echo attr_url($pid); ?>&user_id=<?php echo attr_url($_SESSION['authUserID']); ?>' id='birthday_popup' style='display: none;' onclick='top.restoreSession()'></a>         <?php-    } // $thisauth-    ?> -    <?php-    $list_id = "dashboard"; // to indicate nav item is active, count and give correct id-    // Collect the patient menu then build it-    $menuPatient = new PatientMenuRole();-    $menuPatient->displayHorizNavBarMenu();-    // Get the document ID of the patient ID card if access to it is wanted here.-    $idcard_doc_id = false;-    if ($GLOBALS['patient_id_category_name']) {-        $idcard_doc_id = get_document_by_catg($pid, $GLOBALS['patient_id_category_name']);-    }-    ?>-    <div style='margin-top: 10px' class="main"> <!-- start main content div -->-      <div class="row">-      <div class="col-md-8">-        <div class="demographics-box">-                            <?php-                            if (!$GLOBALS['hide_billing_widget']) { ?>-                                    <?php-                                    // Billing expand collapse widget-                                    $widgetTitle = xl("Billing");-                                    $widgetLabel = "billing";-                                    $widgetButtonLabel = xl("Edit");-                                    $widgetButtonLink = "return newEvt();";-                                    $widgetButtonClass = "";-                                    $linkMethod = "javascript";-                                    $bodyClass = "notab";-                                    $widgetAuth = false;-                                    $fixedWidth = false;-                                    if ($GLOBALS['force_billing_widget_open']) {-                                        $forceExpandAlways = true;-                                    } else {-                                        $forceExpandAlways = false;-                                    }+        if ($thisauth) {+            if ($result['squad'] && !AclMain::aclCheckCore('squads', $result['squad'])) {+                $thisauth = 0;+            }+        } -                                    expand_collapse_widget(-                                        $widgetTitle,-                                        $widgetLabel,-                                        $widgetButtonLabel,-                                        $widgetButtonLink,-                                        $widgetButtonClass,-                                        $linkMethod,-                                        $bodyClass,-                                        $widgetAuth,-                                        $fixedWidth,-                                        $forceExpandAlways-                                    );-                                    ?>-                                    <br />-                                    <?php-                                    //PATIENT BALANCE,INS BALANCE naina@capminds.com-                                    $patientbalance = get_patient_balance($pid, false);-                                    //Debit the patient balance from insurance balance-                                    $insurancebalance = get_patient_balance($pid, true) - $patientbalance;-                                    $totalbalance = $patientbalance + $insurancebalance;--                                    //Show current balance and billing note, if any.-                                    ?>-                                      <table>-                                        <tr><td>-                                        <span class='font-weight-bold text-danger'><?php echo xlt('Patient Balance Due') .-                                        " : " . text(oeFormatMoney($patientbalance)); ?></span></td></tr>-                                        <tr><td><span class='font-weight-bold text-danger'><?php echo xlt('Insurance Balance Due') .-                                        " : " . text(oeFormatMoney($insurancebalance)); ?></span></td></tr>-                                        <tr>-                                          <td>-                                            <span class='font-weight-bold text-danger'><?php echo xlt('Total Balance Due') .-                                            " : " . text(oeFormatMoney($totalbalance)); ?></span>-                                      </td>-                                    <?php if (!empty($result['billing_note'])) { ?>-                                        <tr>-                                          <td>-                                            <span class='font-weight-bold text-danger'><?php echo xlt('Billing Note') . ":" . text($result['billing_note']); ?></span>-                                          </td>-                                        </tr>-                                    <?php } ?>--                                    <?php if (!empty($result3['provider'])) {   // Use provider in case there is an ins record w/ unassigned insco ?>-                                        <tr>-                                          <td>-                                          <span class='font-weight-bold'><?php echo xlt('Primary Insurance') . ': ' . text($insco_name); ?></span>&nbsp;&nbsp;&nbsp;-                                        <?php if ($result3['copay'] > 0) { ?>-                                            <span class='font-weight-bold'><?php echo xlt('Copay') . ': ' . text($result3['copay']); ?></span>&nbsp;&nbsp;&nbsp;-                                        <?php } ?>-                                        <span class='font-weight-bold'><?php echo xlt('Effective Date') . ': ' . text(oeFormatShortDate($result3['effdate'])); ?></span>-                                      </td>-                                    </tr>-                                    <?php } ?>--                                  </table>-        </div>-        <?php  }-        // if anyone wants to render anything before the patient demographic list-                            $GLOBALS["kernel"]->getEventDispatcher()->dispatch(RenderEvent::EVENT_SECTION_LIST_RENDER_BEFORE, new RenderEvent($pid), 10);-                            ?>-        <?php if (AclMain::aclCheckCore('patients', 'demo')) { ?>-          <section>-              <?php-              // Demographics expand collapse widget-                $widgetTitle = xl("Demographics");-                $widgetLabel = "demographics";-                $widgetButtonLabel = xl("Edit");-                $widgetButtonLink = "demographics_full.php";-                $widgetButtonClass = "";-                $linkMethod = "html";-                $bodyClass = "";-                $widgetAuth = AclMain::aclCheckCore('patients', 'demo', '', 'write');-                $fixedWidth = false;-                expand_collapse_widget(-                    $widgetTitle,-                    $widgetLabel,-                    $widgetButtonLabel,-                    $widgetButtonLink,-                    $widgetButtonClass,-                    $linkMethod,-                    $bodyClass,-                    $widgetAuth,-                    $fixedWidth-                );-                ?>-              <div id="DEM">-                  <ul class="tabNav">-                      <?php display_layout_tabs('DEM', $result, $result2); ?>-                  </ul>-                  <div class="tabContainer">-                      <?php display_layout_tabs_data('DEM', $result, $result2); ?>-                  </div>-              </div>-            </section>-            <section>-                        <?php-                        $insurance_count = 0;-                        foreach (array('primary', 'secondary', 'tertiary') as $instype) {-                            $enddate = 'Present';-                            $query = "SELECT * FROM insurance_data WHERE " .-                                "pid = ? AND type = ? " .-                                "ORDER BY date DESC";-                            $res = sqlStatement($query, array($pid, $instype));-                            while ($row = sqlFetchArray($res)) {-                                if ($row['provider']) {-                                    $insurance_count++;-                                }-                            }+        if ($thisauth) :+            require_once("$include_root/patient_file/summary/dashboard_header.php");+        endif;++        $list_id = "dashboard"; // to indicate nav item is active, count and give correct id+        // Collect the patient menu then build it+        $menuPatient = new PatientMenuRole();+        $menuPatient->displayHorizNavBarMenu();+        // Get the document ID of the patient ID card if access to it is wanted here.+        $idcard_doc_id = false;+        if ($GLOBALS['patient_id_category_name']) {+            $idcard_doc_id = get_document_by_catg($pid, $GLOBALS['patient_id_category_name']);+        }+        ?>+        <div class="main">+            <!-- start main content div -->+            <div class="row">+                <div class="col-md-8">+                    <?php+                    if (!$GLOBALS['hide_billing_widget']) :+                        $forceBillingExpandAlways = ($GLOBALS['force_billing_widget_open']) ? true : false;+                        $patientbalance = get_patient_balance($pid, false);+                        $insurancebalance = get_patient_balance($pid, true) - $patientbalance;+                        $totalbalance = $patientbalance + $insurancebalance;+                        $id = "billing_ps_expand";+                        $viewArgs = [+                            'title' => 'Billing',+                            'id' => $id,+                            'initiallyCollapsed' => (getUserSetting($id) == 0) ? false : true,+                            'hideBtn' => true,+                            'patientBalance' => $patientbalance,+                            'insuranceBalance' => $insurancebalance,+                            'totalBalance' => $totalbalance,+                            'forceAlwaysOpen' => $forceBillingExpandAlways,+                        ];++                        if (!empty($result['billing_note'])) {+                            $viewArgs['billingNote'] = $result['billing_note'];                         } -                        if ($insurance_count > 0) {-                            // Insurance expand collapse widget-                            $widgetTitle = xl("Insurance");-                            $widgetLabel = "insurance";-                            $widgetButtonLabel = xl("Edit");-                            $widgetButtonLink = "demographics_full.php";-                            $widgetButtonClass = "";-                            $linkMethod = "html";-                            $bodyClass = "";-                            $widgetAuth = AclMain::aclCheckCore('patients', 'demo', '', 'write');-                            $fixedWidth = false;-                            expand_collapse_widget(-                                $widgetTitle,-                                $widgetLabel,-                                $widgetButtonLabel,-                                $widgetButtonLink,-                                $widgetButtonClass,-                                $linkMethod,-                                $bodyClass,-                                $widgetAuth,-                                $fixedWidth-                            );--                            if ($insurance_count > 0) {-                                ?>--                                <ul class="tabNav">-                                <?php-                                ///////////////////////////////// INSURANCE SECTION-                                $first = true;-                                foreach ($insurance_array as $instype) {-                                    $query = "SELECT * FROM insurance_data WHERE " .-                                        "pid = ? AND type = ? " .-                                        "ORDER BY date DESC";-                                    $res = sqlStatement($query, array($pid, $instype));--                                    $enddate = 'Present';--                                    while ($row = sqlFetchArray($res)) {-                                        if ($row['provider']) {-                                            $ins_description = ucfirst($instype);-                                            $ins_description = xl($ins_description);-                                            $ins_description .= strcmp($enddate, 'Present') != 0 ? " (" . xl('Old') . ")" : "";-                                            ?>-                                            <li <?php echo $first ? 'class="current"' : '' ?>><a href="#">-                                                    <?php echo text($ins_description); ?></a></li>-                                            <?php-                                            $first = false;-                                        }--                                        $enddate = $row['date'];-                                    }-                                }+                        if (!empty($result3['provider'])) {+                            $viewArgs['provider'] = true;+                            $viewArgs['insName'] = $insco_name;+                            $viewArgs['copay'] = $result3['copay'];+                            $viewArgs['effDate'] = $result3['effdate'];+                        } -                                // Display the eligibility tab-                                ?>-                                <li><a id='eligibility' href='#'><?php echo xlt('Eligibility'); ?></a></li>-                              </ul>-                                <?php } ?>--                            <div class="tabContainer">-                                <?php-                                $first = true;-                                foreach ($insurance_array as $instype) {-                                    $enddate = 'Present';--                                    $query = "SELECT * FROM insurance_data WHERE " .-                                        "pid = ? AND type = ? " .-                                        "ORDER BY date DESC";-                                    $res = sqlStatement($query, array($pid, $instype));-                                    while ($row = sqlFetchArray($res)) {-                                        if ($row['provider']) {-                                            ?>-                                            <div class="tab <?php echo $first ? 'current' : '' ?>">-                                                <table class="border-0 w-100">-                                                    <?php-                                                    $icobj = new InsuranceCompany($row['provider']);-                                                    $adobj = $icobj->get_address();-                                                    $insco_name = trim($icobj->get_name());-                                                    ?>-                                                    <tr>-                                                    <td class="align-top" colspan='3'>-                                                      <span class='text'>-                                                        <?php-                                                        if (strcmp($enddate, 'Present') != 0) {-                                                            echo xlt("Old") . " ";-                                                        }-                                                        ?>-                                                          <?php $tempinstype = ucfirst($instype);-                                                            echo xlt($tempinstype . ' Insurance'); ?>-                                                          <?php if (strcmp($row['date'], '0000-00-00') != 0) { ?>-                                                                <?php echo ' ' . xlt('from') . ' ' . $row['date']; ?>-                                                          <?php } ?>-                                                          <?php echo ' ' . xlt('until') . ' ';-                                                            echo (strcmp($enddate, 'Present') != 0) ? text($enddate) : xlt('Present'); ?>:</span>-                                                        </td>-                                                    </tr>-                                                    <tr>-                                                        <td class="align-top">-                                                          <span class='text'>-                                                            <?php-                                                            if ($insco_name) {-                                                                echo text($insco_name) . '<br />';-                                                                if (trim($adobj->get_line1())) {-                                                                    echo text($adobj->get_line1()) . '<br />';-                                                                    echo text($adobj->get_city() . ', ' . $adobj->get_state() . ' ' . $adobj->get_zip());-                                                                }-                                                            } else {-                                                                echo "<span class='text-danger font-weight-bold'>" . xlt('Unassigned') . "</span>";-                                                            }-                                                            ?>-                                                          <br />-                                                            <?php echo xlt('Policy Number'); ?>: <?php echo text($row['policy_number']) ?><br />-                                                            <?php echo xlt('Plan Name'); ?>: <?php echo text($row['plan_name']); ?><br />-                                                            <?php echo xlt('Group Number'); ?>: <?php echo text($row['group_number']); ?>-                                                          </span>-                                                        </td>-                                                        <td class="align-top">-                                                            <span class='font-weight-bold'><?php echo xlt('Subscriber'); ?>: </span><br />-                                                            <span class='text'><?php echo text($row['subscriber_fname'] . ' ' . $row['subscriber_mname'] . ' ' . $row['subscriber_lname']); ?>-                                                                <?php-                                                                if ($row['subscriber_relationship'] != "") {-                                                                    echo "(" . text($row['subscriber_relationship']) . ")";-                                                                }-                                                                ?>-                                                      <br />-                                                        <?php echo xlt('S.S.'); ?>:-                                                        <?php echo text($row['subscriber_ss']); ?><br />-                                                        <?php echo xlt('D.O.B.'); ?>:-                                                        <?php echo text($row['subscriber_DOB']); ?><br />-                                                        <?php echo xlt('Phone'); ?>:-                                                        <?php echo text($row['subscriber_phone']); ?>-                                                      </span>-                                                        </td>-                                                        <td class="align-top">-                                                            <span class='font-weight-bold'><?php echo xlt('Subscriber Address'); ?>: </span><br />-                                                            <span class='text'><?php echo text($row['subscriber_street']); ?><br />-                                                        <?php echo text($row['subscriber_city']); ?>-                                                                <?php-                                                                if ($row['subscriber_state'] != "") {-                                                                    echo ", ";-                                                                }--                                                                echo text($row['subscriber_state']); ?>-                                                                <?php-                                                                if ($row['subscriber_country'] != "") {-                                                                    echo ", ";-                                                                }--                                                                echo text($row['subscriber_country']); ?>-                                                                <?php echo " " . text($row['subscriber_postal_code']); ?></span>--                                                            <?php if (trim($row['subscriber_employer'])) { ?>-                                                                <br /><span class='font-weight-bold'><?php echo xlt('Subscriber Employer'); ?>: </span><br />-                                                                <span class='text'><?php echo text($row['subscriber_employer']); ?><br />-                                                                <?php echo text($row['subscriber_employer_street']); ?><br />-                                                                <?php echo text($row['subscriber_employer_city']); ?>-                                                                    <?php-                                                                    if ($row['subscriber_employer_city'] != "") {-                                                                        echo ", ";-                                                                    }--                                                                    echo text($row['subscriber_employer_state']); ?>-                                                                    <?php-                                                                    if ($row['subscriber_employer_country'] != "") {-                                                                        echo ", ";-                                                                    }--                                                                    echo text($row['subscriber_employer_country']); ?>-                                                                    <?php echo " " . text($row['subscriber_employer_postal_code']); ?>-                                                      </span>-                                                            <?php } ?>--                                                        </td>-                                                    </tr>-                                                    <tr>-                                                        <td>-                                                            <?php if ($row['copay'] != "") { ?>-                                                                <span class='font-weight-bold'><?php echo xlt('CoPay'); ?>: </span>-                                                                <span class='text'><?php echo text($row['copay']); ?></span>-                                                                <br />-                                                            <?php } ?>-                                                            <span class='font-weight-bold'><?php echo xlt('Accept Assignment'); ?>:</span>-                                                            <span class='text'>-                                                    <?php-                                                    if ($row['accept_assignment'] == "TRUE") {-                                                        echo xl("YES");-                                                    }-                                                    if ($row['accept_assignment'] == "FALSE") {-                                                        echo xl("NO");-                                                    }-                                                    ?>-                                                      </span>-                                                            <?php if (!empty($row['policy_type'])) { ?>-                                                                <br />-                                                                <span class='font-weight-bold'><?php echo xlt('Secondary Medicare Type'); ?>: </span>-                                                                <span class='text'><?php echo text($policy_types[$row['policy_type']]); ?></span>-                                                            <?php } ?>-                                                        </td>-                                                        <td class="align-top"></td>-                                                        <td class="align-top"></td>-                                                    </tr>--                                                </table>-                                            </div>-                                            <?php-                                        } // end if ($row['provider'])-                                        $enddate = $row['date'];-                                        $first = false;-                                    } // end while-                                } // end foreach--                                // Display the eligibility information-                                ?> <div class='tab'>-                                    <div class='tab-content pre-scrollable' style='width:695px; overflow-x: hidden;'>--                                <?php if ($GLOBALS['enable_oa']) { ?>-                                    <form method='post' action='./demographics.php'>-                                      <div>-                                        <button class='btn btn-success btn-sm btn-transmit float-right' name='status_update' value='true'><?php echo xlt("Update Status"); ?></button>-                                      </div><br />-                                    <?php if ($_POST['status_update'] === 'true') {-                                        unset($_POST['status_update']);-                                        $showEligibility = true;-                                        $ok = EDI270::requestEligibleTransaction($pid);-                                        if ($ok === true) {-                                            EDI270::showEligibilityInformation($pid, false);-                                        } else {-                                            echo $ok;-                                        }-                                    } else {-                                        EDI270::showEligibilityInformation($pid, true);-                                    } ?>-                                    </form>-                                <?php } else {-                                    EDI270::showEligibilityInformation($pid, true);-                                } ?>-                              </div>-                            </div>-                                <?php-                                ///////////////////////////////// END INSURANCE SECTION-                                ?>-                            </div>--                        <?php } // ?>-                    </section>-            <?php } // end if demographics authorized ?>--            <?php if (AclMain::aclCheckCore('patients', 'notes')) { ?>-            <section>-                    <?php-                    // Notes expand collapse widget-                    $widgetTitle = xl("Messages");-                    $widgetLabel = "pnotes";-                    $widgetButtonLabel = xl("Edit");-                    $widgetButtonLink = "pnotes_full.php?form_active=1";-                    $widgetButtonClass = "";-                    $linkMethod = "html";-                    $bodyClass = "notab";-                    $widgetAuth = AclMain::aclCheckCore('patients', 'notes', '', 'write');-                    $fixedWidth = false;-                    expand_collapse_widget(-                        $widgetTitle,-                        $widgetLabel,-                        $widgetButtonLabel,-                        $widgetButtonLink,-                        $widgetButtonClass,-                        $linkMethod,-                        $bodyClass,-                        $widgetAuth,-                        $fixedWidth-                    );-                    ?>-                    <br />-                    <div class="text ml-2"><div class="spinner-border spinner-border-sm" role="status"><span class="sr-only"><?php echo xlt("Loading"); ?>...</span></div></div>-                    <br />-                </div>-              </section>-    <?php } // end if notes authorized ?>--    <?php if (AclMain::aclCheckCore('patients', 'reminder') && $GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_prw']) { ?>-    <section>-          <?php-    // patient reminders collapse widget-            $widgetTitle = xl("Patient Reminders");-            $widgetLabel = "patient_reminders";-            $widgetButtonLabel = xl("Edit");-            $widgetButtonLink = "../reminder/patient_reminders.php?mode=simple&patient_id=" . attr_url($pid);-            $widgetButtonClass = "";-            $linkMethod = "html";-            $bodyClass = "notab";-            $widgetAuth = AclMain::aclCheckCore('patients', 'reminder', '', 'write');-            $fixedWidth = false;-            expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);-            ?>-    <br />-    <div class="text ml-2"><div class="spinner-border spinner-border-sm" role="status"><span class="sr-only"><?php echo xlt("Loading"); ?>...</span></div></div>-    <br />-  </div>-  </section>-<?php } //end if prw is activated  ?>--<?php if (AclMain::aclCheckCore('patients', 'disclosure')) { ?>-    <section>-            <?php-            // disclosures expand collapse widget-            $widgetTitle = xl("Disclosures");-            $widgetLabel = "disclosures";-            $widgetButtonLabel = xl("Edit");-            $widgetButtonLink = "disclosure_full.php";-            $widgetButtonClass = "";-            $linkMethod = "html";-            $bodyClass = "notab";-            $widgetAuth = AclMain::aclCheckCore('patients', 'disclosure', '', 'write');-            $fixedWidth = false;-            expand_collapse_widget(-                $widgetTitle,-                $widgetLabel,-                $widgetButtonLabel,-                $widgetButtonLink,-                $widgetButtonClass,-                $linkMethod,-                $bodyClass,-                $widgetAuth,-                $fixedWidth-            );-            ?>-            <br />-            <div class="text ml-2"><div class="spinner-border spinner-border-sm" role="status"><span class="sr-only"><?php echo xlt("Loading"); ?>...</span></div></div>-            <br />-      </section>-<?php } // end if disclosures authorized ?>--<?php if ($GLOBALS['amendments'] && AclMain::aclCheckCore('patients', 'amendment')) { ?>-    <section>-            <?php // Amendments widget-            $widgetTitle = xlt('Amendments');-            $widgetLabel = "amendments";-            $widgetButtonLabel = xlt("Edit");-            $widgetButtonLink = $GLOBALS['webroot'] . "/interface/patient_file/summary/list_amendments.php?id=" . attr_url($pid);-            $widgetButtonClass = "rx_modal";-            $linkMethod = "html";-            $bodyClass = "summary_item small";-            $widgetAuth = AclMain::aclCheckCore('patients', 'amendment', '', 'write');-            $fixedWidth = false;-            expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);-            $sql = "SELECT * FROM amendments WHERE pid = ? ORDER BY amendment_date DESC";-            $result = sqlStatement($sql, array($pid));--            if (sqlNumRows($result) == 0) { ?>-              <p class="font-weight-bold text"><?php echo xlt('None{{Amendment}}'); ?></p>-            <?php } while ($row = sqlFetchArray($result)) { ?>-                &nbsp;&nbsp;-                <a class='<?php echo attr($widgetButtonClass); ?>' href='<?php echo $GLOBALS['webroot'] . "/interface/patient_file/summary/add_edit_amendments.php?id=" . attr_url($row['amendment_id']); ?>' onclick='top.restoreSession()'><?php echo text($row['amendment_date']) . "&nbsp; " . text($row['amendment_desc']); ?></a><br />-            <?php } ?>-    </section>-<?php } // end amendments authorized ?>--<?php if (AclMain::aclCheckCore('patients', 'lab')) { ?>-        <section>-            <?php // labdata expand collapse widget-            $widgetTitle = xl("Labs");-            $widgetLabel = "labdata";-            $widgetButtonLabel = xl("Trend");-            $widgetButtonLink = "../summary/labdata.php";#"../encounter/trend_form.php?formname=labdata";-            $widgetButtonClass = "";-            $linkMethod = "html";-            $bodyClass = "notab";-            // check to see if any labdata exist-            $spruch = "SELECT procedure_report.date_collected AS date " .-                "FROM procedure_report " .-                "JOIN procedure_order ON  procedure_report.procedure_order_id = procedure_order.procedure_order_id " .-                "WHERE procedure_order.patient_id = ? " .-                "ORDER BY procedure_report.date_collected DESC ";-            $existLabdata = sqlQuery($spruch, array($pid));-            if ($existLabdata) {-                $widgetAuth = true;-            } else {-                $widgetAuth = false;-            }+                        echo $twig->getTwig()->render('patient/card/billing.html.twig', $viewArgs);+                    endif; // End the hide_billing_widget++                    // if anyone wants to render anything before the patient demographic list+                    $GLOBALS["kernel"]->getEventDispatcher()->dispatch(RenderEvent::EVENT_SECTION_LIST_RENDER_BEFORE, new RenderEvent($pid), 10);++                    if (AclMain::aclCheckCore('patients', 'demo')) :+                        // Render the Demographics box+                        $viewArgs = [+                            'title' => "Demographics",+                            'id' => "demographics_ps_expand",+                            'btnText' => "Edit",+                            'btnLink' => "demographics_full.php",+                            'linkMethod' => "html",+                            'auth' => ACLMain::aclCheckCore('patients', 'demo', '', 'write'),+                            'requireRestore' => (!isset($_SESSION['patient_portal_onsite_two'])) ? true : false,+                            'initiallyCollapsed' => getUserSetting("demographics_ps_expand") == true ? true : false,+                            'tabID' => "DEM",+                            'result' => $result,+                            'result2' => $result2,+                        ];+                        echo $twig->getTwig()->render('patient/card/tab_base.html.twig', $viewArgs);++                        // Insurance+                        $insArr = [];+                        $sql = "SELECT * FROM insurance_data WHERE pid = ? AND type IN(?) ORDER BY date DESC";+                        $params[] = $pid;+                        $params[] = implode(", ", $insurance_array);+                        $res = sqlStatement($sql, $params);+                        while ($row = sqlFetchArray($res)) {+                            $insCount = ($row['provider']) ? $insCount++ : $insCount;+                            if ($row['provider']) {+                                $row['isOld'] = (strcmp($enddate, 'Present') != 0) ? true : false;+                                $icobj = new InsuranceCompany($row['provider']);+                                $adobj = $icobj->get_address();+                                $insco_name = trim($icobj->get_name());+                                $row['insco'] = [+                                    'name' => trim($icobj->get_name()),+                                    'address' => [+                                        'line1' => $adobj->get_line1(),+                                        'line2' => $adobj->get_line2(),+                                        'city' => $adobj->get_city(),+                                        'state' => $adobj->get_state(),+                                        'postal' => $adobj->get_zip(),+                                        'country' => $adobj->get_country()+                                    ],+                                ];+                                $row['policy_type'] = (!empty($row['policy_type'])) ? $policy_types[$row['policy_type']] : false;+                            }+                            $row['dispFromDate'] = ((strcmp($row['date'], '0000-00-00') != 0) || $row['date'] == "") ? true : false;+                            $mname = ($row['subscriber_mname'] != "") ? $row['subscriber_mname'] : "";+                            $row['subscriber_full_name'] = str_replace("%mname%", $mname, "{$row['subscriber_fname']} %mname% {$row['subscriber_lname']}");+                            $insArr[] = $row;+                        } -            $fixedWidth = false;-            expand_collapse_widget(-                $widgetTitle,-                $widgetLabel,-                $widgetButtonLabel,-                $widgetButtonLink,-                $widgetButtonClass,-                $linkMethod,-                $bodyClass,-                $widgetAuth,-                $fixedWidth-            );-            ?>-            <br />-            <div class="text ml-2"><div class="spinner-border spinner-border-sm" role="status"><span class="sr-only"><?php echo xlt("Loading"); ?>...</span></div></div>-            <br />-          </div>-        </section>-<?php } // end labs authorized ?>--<?php if ($vitals_is_registered && AclMain::aclCheckCore('patients', 'med')) { ?>-    <section>-            <?php // vitals expand collapse widget-            $widgetTitle = xl("Vitals");-            $widgetLabel = "vitals";-            $widgetButtonLabel = xl("Trend");-            $widgetButtonLink = "../encounter/trend_form.php?formname=vitals";-            $widgetButtonClass = "";-            $linkMethod = "html";-            $bodyClass = "notab";-            // check to see if any vitals exist-            $existVitals = sqlQuery("SELECT * FROM form_vitals WHERE pid=?", array($pid));-            if ($existVitals) {-                $widgetAuth = true;-            } else {-                $widgetAuth = false;-            }+                        if ($GLOBALS["enable_oa"]) {+                            if ($_POST['status_update'] === 'true') {+                                unset($_POST['status_update']);+                                $showEligibility = true;+                                $ok = EDI270::requestEligibility($pid);

I just checked, this code exists on master, script is up to date

robertdown

comment created time in 10 days

PullRequestReviewEvent

push eventrobertdown/openemr

Robert Down

commit sha 7fe7ebf6065c399296bf6ae97cdc030772d43253

Fixing all the missed escapes per the review of #4623

view details

push time in 10 days