From feec55a37122d18271d67fb39e415dda4694c9ff Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Wed, 7 Feb 2024 13:01:40 -0800 Subject: [PATCH] feat: add Real World Testing Report for 2024 (#7210) --- interface/main/tabs/menu/menus/standard.json | 12 +++ interface/reports/rwt_2024_report.php | 90 +++++++++++++++++++ .../documents/custom_menus/Custom.json | 12 +++ 3 files changed, 114 insertions(+) create mode 100644 interface/reports/rwt_2024_report.php diff --git a/interface/main/tabs/menu/menus/standard.json b/interface/main/tabs/menu/menus/standard.json index dd22eec3ea5..ed413f6c374 100644 --- a/interface/main/tabs/menu/menus/standard.json +++ b/interface/main/tabs/menu/menus/standard.json @@ -1453,6 +1453,18 @@ ], "global_req": "enable_amc" }, + { + "label": "2024 Real World Testing Report", + "menu_id": "rep0", + "target": "rep", + "url": "/interface/reports/rwt_2024_report.php", + "children": [], + "requirement": 0, + "acl_req": [ + "admin", + "super" + ] + }, { "label": "2023 Real World Testing Report", "menu_id": "rep0", diff --git a/interface/reports/rwt_2024_report.php b/interface/reports/rwt_2024_report.php new file mode 100644 index 00000000000..b6832b9afe1 --- /dev/null +++ b/interface/reports/rwt_2024_report.php @@ -0,0 +1,90 @@ + + * @copyright Copyright (c) 2022 Brady Miller + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ + +require_once("../globals.php"); + +use OpenEMR\Common\Acl\AclMain; +use OpenEMR\Common\Csrf\CsrfUtils; +use OpenEMR\Common\Twig\TwigContainer; +use OpenEMR\Core\Header; +use OpenEMR\Reports\RealWorldTesting; + +if (!AclMain::aclCheckCore('admin', 'super')) { + echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl('2024 Real World Testing Report')]); + exit; +} + +if (!empty($_POST)) { + if (!CsrfUtils::verifyCsrfToken($_POST['csrf_token_form'], 'rwt_2024_report')) { + CsrfUtils::csrfNotVerified(); + } +} + +// dates for this report are hard-coded (see header for details) +$begin_date = '2024-04-01'; +$end_date = '2024-09-30'; + +// can override dates below for development/testing purposes +// $begin_date = '2022-10-01'; +// $end_date = '2022-12-01'; +?> + + + + + <?php echo xlt('2024 Real World Testing Report'); ?> + + + + + + + + + + +
+ ' /> +
+ +
+
+ +
+ +
+ +
+
+
+ renderReport(); ?> +
+ + + + + diff --git a/sites/default/documents/custom_menus/Custom.json b/sites/default/documents/custom_menus/Custom.json index dd22eec3ea5..ed413f6c374 100644 --- a/sites/default/documents/custom_menus/Custom.json +++ b/sites/default/documents/custom_menus/Custom.json @@ -1453,6 +1453,18 @@ ], "global_req": "enable_amc" }, + { + "label": "2024 Real World Testing Report", + "menu_id": "rep0", + "target": "rep", + "url": "/interface/reports/rwt_2024_report.php", + "children": [], + "requirement": 0, + "acl_req": [ + "admin", + "super" + ] + }, { "label": "2023 Real World Testing Report", "menu_id": "rep0",