From 34826d4122c3074a5d91dd1dbf135c9a9c6082e0 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Thu, 25 Jan 2024 15:43:43 -0500 Subject: [PATCH 01/17] Hide dashboard cards option --- .../patient_file/summary/demographics.php | 34 ++++++++++++++----- library/lists.inc.php | 10 ++++++ sql/7_0_1-to-7_0_2_upgrade.sql | 13 +++++++ sql/7_0_2-to-7_0_3_upgrade.sql | 12 +++++++ sql/database.sql | 10 ++++++ 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 341b69c684c..11af265c978 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -74,6 +74,7 @@ // want smart support in their system. $smartLaunchController = new SMARTLaunchController($GLOBALS["kernel"]->getEventDispatcher()); $smartLaunchController->registerContextEvents(); +$activeCards = getActiveDashboardCards(); /** * @var EventDispatcher @@ -1079,7 +1080,9 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=allergy')" ]; echo "
"; - echo $t->render('patient/card/allergies.html.twig', $viewArgs); + if (in_array('card_allergies', $activeCards)) { + echo $t->render('patient/card/allergies.html.twig', $viewArgs); + } echo "
"; } @@ -1103,7 +1106,9 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medical_problem')" ]; echo "
"; + if (in_array('card_medicalproblems', $activeCards)) { echo $t->render('patient/card/medical_problems.html.twig', $viewArgs); + } echo "
"; } @@ -1125,7 +1130,9 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medication')" ]; echo "
"; + if (in_array('card_medication', $activeCards)) { echo $t->render('patient/card/medication.html.twig', $viewArgs); + } echo "
"; } @@ -1152,8 +1159,7 @@ function filterActiveIssues(array $i): array 'auth' => false, 'rxList' => $rxArr, ]; - - echo $t->render('patient/card/erx.html.twig', $viewArgs); + echo $t->render('patient/card/erx.html.twig', $viewArgs); } $id = "prescriptions_ps_expand"; @@ -1455,7 +1461,10 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + if (in_array('card_patientreminders', $activeCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } + endif; //end if prw is activated if (AclMain::aclCheckCore('patients', 'disclosure')) : @@ -1476,7 +1485,9 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + if (in_array('card_disclosure', $activeCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } endif; // end if disclosures authorized if ($GLOBALS['amendments'] && AclMain::aclCheckCore('patients', 'amendment')) : @@ -1504,7 +1515,10 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - echo $twig->getTwig()->render('patient/card/amendments.html.twig', $viewArgs); + if (in_array('card_amendments', $activeCards)) { + echo $twig->getTwig()->render('patient/card/amendments.html.twig', $viewArgs); + } + endif; // end amendments authorized if (AclMain::aclCheckCore('patients', 'lab')) : @@ -1532,7 +1546,9 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + if (in_array('card_lab', $activeCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } endif; // end labs authorized if ($vitals_is_registered && AclMain::aclCheckCore('patients', 'med')) : @@ -1555,7 +1571,9 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + if (in_array('card_vitals', $activeCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } endif; // end vitals // if anyone wants to render anything after the patient demographic list diff --git a/library/lists.inc.php b/library/lists.inc.php index a1a27fb3ade..173fd5459f2 100644 --- a/library/lists.inc.php +++ b/library/lists.inc.php @@ -142,3 +142,13 @@ function setListTouch($patient_id, $type) sqlStatement("INSERT INTO `lists_touch` ( `pid`,`type`,`date` ) VALUES ( ?, ?, NOW() )", array($patient_id,$type)); } } + +function getActiveDashboardCards() +{ + $hideList = []; + $ret = sqlStatement("SELECT option_id FROM list_options WHERE list_id = 'Hide_Dashboard_Cards' AND activity = '1'"); + while ($row = sqlFetchArray($ret)) { + $hideList[] = $row['option_id']; + } + return $hideList; +} diff --git a/sql/7_0_1-to-7_0_2_upgrade.sql b/sql/7_0_1-to-7_0_2_upgrade.sql index 177ee53f415..14592f1d1e6 100644 --- a/sql/7_0_1-to-7_0_2_upgrade.sql +++ b/sql/7_0_1-to-7_0_2_upgrade.sql @@ -614,3 +614,16 @@ CREATE TABLE `fee_schedule` ( UNIQUE KEY `ins_plan_code_mod_type_date` (`insurance_company_id`, `plan`, `code`, `modifier`, `type`, `effective_date`) ) ENGINE=InnoDb AUTO_INCREMENT=1; #EndIf + +#IfNotRow2D list_options list_id lists option_id default_open_tabs +-- Create new list Default Open Tabs +INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 1); +#EndIf diff --git a/sql/7_0_2-to-7_0_3_upgrade.sql b/sql/7_0_2-to-7_0_3_upgrade.sql index f5b978f9e44..af9b3d9f933 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -113,3 +113,15 @@ ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; #EndIf +#IfNotRow2D list_options list_id lists option_id default_open_tabs +-- Create new list Default Open Tabs +INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 1); +#EndIf diff --git a/sql/database.sql b/sql/database.sql index 500aef7e010..7e981a93ae1 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -13638,3 +13638,13 @@ INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default` INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES('nationality_with_country', 'YE', 'Yemeni', '2480', '0', '0', '', 'Yemen', 'YEM:887'); INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES('nationality_with_country', 'ZM', 'Zambian', '2490', '0', '0', '', 'Zambia', 'ZMB:894'); INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES('nationality_with_country', 'ZW', 'Zimbabwean', '2500', '0', '0', '', 'Zimbabwe', 'ZWE:716'); + +INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 1); From 12863d1cc4550d2b9ac87b947e26c1030ddfddd2 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Thu, 25 Jan 2024 17:22:11 -0500 Subject: [PATCH 02/17] PSR 01 --- interface/patient_file/summary/demographics.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 11af265c978..80635fffe4d 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -1106,9 +1106,9 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medical_problem')" ]; echo "
"; - if (in_array('card_medicalproblems', $activeCards)) { - echo $t->render('patient/card/medical_problems.html.twig', $viewArgs); - } + if (in_array('card_medicalproblems', $activeCards)) { + echo $t->render('patient/card/medical_problems.html.twig', $viewArgs); + } echo "
"; } @@ -1130,9 +1130,9 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medication')" ]; echo "
"; - if (in_array('card_medication', $activeCards)) { - echo $t->render('patient/card/medication.html.twig', $viewArgs); - } + if (in_array('card_medication', $activeCards)) { + echo $t->render('patient/card/medication.html.twig', $viewArgs); + } echo "
"; } @@ -1464,7 +1464,6 @@ function filterActiveIssues(array $i): array if (in_array('card_patientreminders', $activeCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } - endif; //end if prw is activated if (AclMain::aclCheckCore('patients', 'disclosure')) : @@ -1518,7 +1517,6 @@ function filterActiveIssues(array $i): array if (in_array('card_amendments', $activeCards)) { echo $twig->getTwig()->render('patient/card/amendments.html.twig', $viewArgs); } - endif; // end amendments authorized if (AclMain::aclCheckCore('patients', 'lab')) : From 78ab5a98cbeb84b81da248937a07a29f08aedcf4 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Thu, 25 Jan 2024 23:51:22 -0500 Subject: [PATCH 03/17] Correction in copy paste --- sql/7_0_2-to-7_0_3_upgrade.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/7_0_2-to-7_0_3_upgrade.sql b/sql/7_0_2-to-7_0_3_upgrade.sql index af9b3d9f933..e03dcf0f956 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -113,8 +113,8 @@ ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; #EndIf -#IfNotRow2D list_options list_id lists option_id default_open_tabs --- Create new list Default Open Tabs +#IfNotRow2D list_options list_id lists option_id Hide_Dashboard_Cards +-- Create new list Hide Dashboard Cards INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 1); INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 1); From 144e4cf28f66d1da3b04a8c6c8ca7af122d8c856 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Fri, 26 Jan 2024 01:49:14 -0500 Subject: [PATCH 04/17] Adding documentation of feature --- Documentation/help_files/medical_dashboard_help.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/help_files/medical_dashboard_help.php b/Documentation/help_files/medical_dashboard_help.php index 0a869a37157..eb3feb778b0 100644 --- a/Documentation/help_files/medical_dashboard_help.php +++ b/Documentation/help_files/medical_dashboard_help.php @@ -162,6 +162,11 @@

+ +

+ +

.

+

.

.

From 74aefdcc74994fad79ef560222be827ef76df502 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Fri, 1 Mar 2024 08:13:48 -0500 Subject: [PATCH 05/17] Updates completed --- .../help_files/medical_dashboard_help.php | 2 +- .../patient_file/summary/demographics.php | 18 +++++++++--------- interface/super/edit_list.php | 7 +++++++ library/lists.inc.php | 2 +- sql/7_0_2-to-7_0_3_upgrade.sql | 16 ++++++++-------- sql/database.sql | 16 ++++++++-------- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/Documentation/help_files/medical_dashboard_help.php b/Documentation/help_files/medical_dashboard_help.php index eb3feb778b0..24d10871113 100644 --- a/Documentation/help_files/medical_dashboard_help.php +++ b/Documentation/help_files/medical_dashboard_help.php @@ -163,7 +163,7 @@

-

+

.

diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 80635fffe4d..e927ec8ead0 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -74,7 +74,7 @@ // want smart support in their system. $smartLaunchController = new SMARTLaunchController($GLOBALS["kernel"]->getEventDispatcher()); $smartLaunchController->registerContextEvents(); -$activeCards = getActiveDashboardCards(); +$hiddenCards = getHiddenDashboardCards(); /** * @var EventDispatcher @@ -1080,7 +1080,7 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=allergy')" ]; echo "
"; - if (in_array('card_allergies', $activeCards)) { + if (in_array('card_allergies', $hiddenCards)) { echo $t->render('patient/card/allergies.html.twig', $viewArgs); } echo "
"; @@ -1106,7 +1106,7 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medical_problem')" ]; echo "
"; - if (in_array('card_medicalproblems', $activeCards)) { + if (in_array('card_medicalproblems', $hiddenCards)) { echo $t->render('patient/card/medical_problems.html.twig', $viewArgs); } echo "
"; @@ -1130,7 +1130,7 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medication')" ]; echo "
"; - if (in_array('card_medication', $activeCards)) { + if (in_array('card_medication', $hiddenCards)) { echo $t->render('patient/card/medication.html.twig', $viewArgs); } echo "
"; @@ -1461,7 +1461,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_patientreminders', $activeCards)) { + if (in_array('card_patientreminders', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; //end if prw is activated @@ -1484,7 +1484,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_disclosure', $activeCards)) { + if (in_array('card_disclosure', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; // end if disclosures authorized @@ -1514,7 +1514,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_amendments', $activeCards)) { + if (in_array('card_amendments', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/amendments.html.twig', $viewArgs); } endif; // end amendments authorized @@ -1544,7 +1544,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_lab', $activeCards)) { + if (in_array('card_lab', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; // end labs authorized @@ -1569,7 +1569,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_vitals', $activeCards)) { + if (in_array('card_vitals', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; // end vitals diff --git a/interface/super/edit_list.php b/interface/super/edit_list.php index 0410baf89d4..3023c6bdca0 100644 --- a/interface/super/edit_list.php +++ b/interface/super/edit_list.php @@ -1283,6 +1283,13 @@ function lister() {      + + + + + + + diff --git a/library/lists.inc.php b/library/lists.inc.php index 173fd5459f2..68d8aa2661f 100644 --- a/library/lists.inc.php +++ b/library/lists.inc.php @@ -143,7 +143,7 @@ function setListTouch($patient_id, $type) } } -function getActiveDashboardCards() +function getHiddenDashboardCards() { $hideList = []; $ret = sqlStatement("SELECT option_id FROM list_options WHERE list_id = 'Hide_Dashboard_Cards' AND activity = '1'"); diff --git a/sql/7_0_2-to-7_0_3_upgrade.sql b/sql/7_0_2-to-7_0_3_upgrade.sql index e03dcf0f956..60a6000787c 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -116,12 +116,12 @@ ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURREN #IfNotRow2D list_options list_id lists option_id Hide_Dashboard_Cards -- Create new list Hide Dashboard Cards INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 0); #EndIf diff --git a/sql/database.sql b/sql/database.sql index 7e981a93ae1..25a1dfd4115 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -13640,11 +13640,11 @@ INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default` INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES('nationality_with_country', 'ZW', 'Zimbabwean', '2500', '0', '0', '', 'Zimbabwe', 'ZWE:716'); INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 1); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 1); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 0); From 7e67c31ec59f0b747995064134f20a01b80031f6 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Fri, 1 Mar 2024 19:21:37 -0500 Subject: [PATCH 06/17] Updates completed - a NOT missing --- interface/patient_file/summary/demographics.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index e927ec8ead0..2f197fa1876 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -1080,7 +1080,7 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=allergy')" ]; echo "
"; - if (in_array('card_allergies', $hiddenCards)) { + if (!in_array('card_allergies', $hiddenCards)) { echo $t->render('patient/card/allergies.html.twig', $viewArgs); } echo "
"; From e3651b9c98983edc690584f7924a422fc0ff6450 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Fri, 1 Mar 2024 19:32:27 -0500 Subject: [PATCH 07/17] Updates completed - #IfNotRow lists option_id --- sql/7_0_2-to-7_0_3_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/7_0_2-to-7_0_3_upgrade.sql b/sql/7_0_2-to-7_0_3_upgrade.sql index 60a6000787c..7fc7198f950 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -113,7 +113,7 @@ ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; #EndIf -#IfNotRow2D list_options list_id lists option_id Hide_Dashboard_Cards +#IfNotRow lists option_id Hide_Dashboard_Cards -- Create new list Hide Dashboard Cards INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 0); From 25a8813f58be1478e990d9f6baa05415e7bed37f Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Sun, 3 Mar 2024 17:35:25 -0500 Subject: [PATCH 08/17] Updates completed - in_array changes --- interface/patient_file/summary/demographics.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 2f197fa1876..b9686f4c0b3 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -1106,7 +1106,7 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medical_problem')" ]; echo "
"; - if (in_array('card_medicalproblems', $hiddenCards)) { + if (!in_array('card_medicalproblems', $hiddenCards)) { echo $t->render('patient/card/medical_problems.html.twig', $viewArgs); } echo "
"; @@ -1130,7 +1130,7 @@ function filterActiveIssues(array $i): array 'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=medication')" ]; echo "
"; - if (in_array('card_medication', $hiddenCards)) { + if (!in_array('card_medication', $hiddenCards)) { echo $t->render('patient/card/medication.html.twig', $viewArgs); } echo "
"; @@ -1461,7 +1461,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_patientreminders', $hiddenCards)) { + if (!in_array('card_patientreminders', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; //end if prw is activated @@ -1484,7 +1484,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_disclosure', $hiddenCards)) { + if (!in_array('card_disclosure', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; // end if disclosures authorized @@ -1514,7 +1514,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_amendments', $hiddenCards)) { + if (!in_array('card_amendments', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/amendments.html.twig', $viewArgs); } endif; // end amendments authorized @@ -1544,7 +1544,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_lab', $hiddenCards)) { + if (!in_array('card_lab', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; // end labs authorized @@ -1569,7 +1569,7 @@ function filterActiveIssues(array $i): array 'prependedInjection' => $dispatchResult->getPrependedInjection(), 'appendedInjection' => $dispatchResult->getAppendedInjection(), ]; - if (in_array('card_vitals', $hiddenCards)) { + if (!in_array('card_vitals', $hiddenCards)) { echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); } endif; // end vitals From 53f42ba411263de3eb8bc71cfc6fa12b1cf57a69 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Wed, 20 Mar 2024 02:05:36 -0400 Subject: [PATCH 09/17] This is the overhaul Jerry requested --- interface/super/edit_globals.php | 16 ++++++++++++++++ library/globals.inc.php | 7 ++++++- library/lists.inc.php | 9 +++++---- sql/7_0_2-to-7_0_3_upgrade.sql | 24 +++++++++++++++--------- sql/database.sql | 23 ++++++++++++++--------- src/Services/Globals/GlobalSetting.php | 3 +++ 6 files changed, 59 insertions(+), 23 deletions(-) diff --git a/interface/super/edit_globals.php b/interface/super/edit_globals.php index e0a80a861fc..facafaba9b3 100644 --- a/interface/super/edit_globals.php +++ b/interface/super/edit_globals.php @@ -645,6 +645,22 @@ function checkBackgroundServices() echo "\n"; } echo " \n"; + } elseif ($fldtype == GlobalSetting::DATA_TYPE_MULTI_DASHBOARD_CARDS) { + $res = sqlStatement("SELECT * FROM dashboard_card_visibility"); + echo " \n"; } elseif ($fldtype == GlobalSetting::DATA_TYPE_COLOR_CODE) { if ($userMode) { $globalTitle = $globalValue; diff --git a/library/globals.inc.php b/library/globals.inc.php index 9ec4d304e9b..b2b8c66911b 100644 --- a/library/globals.inc.php +++ b/library/globals.inc.php @@ -191,7 +191,12 @@ function gblTimeZones() 'style_light.css', xl('Pick a general theme (need to logout/login after changing this setting).') ), - + 'hide_dashboard_cards' => array( + xl('Hide cards on patient dashboard'), + 'm_dashboard_cards', + '', + xl('Select the cards you want to hide on the patient dashboard.') + ), 'window_title_add_patient_name' => array( xl('Add Patient Name To Window Title'), 'bool', // data type diff --git a/library/lists.inc.php b/library/lists.inc.php index 68d8aa2661f..b21ba2561de 100644 --- a/library/lists.inc.php +++ b/library/lists.inc.php @@ -145,10 +145,11 @@ function setListTouch($patient_id, $type) function getHiddenDashboardCards() { - $hideList = []; - $ret = sqlStatement("SELECT option_id FROM list_options WHERE list_id = 'Hide_Dashboard_Cards' AND activity = '1'"); + $hiddenList = []; + $ret = sqlStatement("SELECT gl_value FROM `globals` WHERE `gl_name` = 'hide_dashboard_cards'"); while ($row = sqlFetchArray($ret)) { - $hideList[] = $row['option_id']; + $hiddenList[] = $row['gl_value']; } - return $hideList; + + return $hiddenList; } diff --git a/sql/7_0_2-to-7_0_3_upgrade.sql b/sql/7_0_2-to-7_0_3_upgrade.sql index 7fc7198f950..b3db31d1eb3 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -113,15 +113,21 @@ ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; #EndIf +#IfNotTable dashboard_card_visibility +CREATE TABLE IF NOT EXISTS dashboard_card_visibility ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `card_abrev `VARCHAR(75) NOT NULL, + `card_name` VARCHAR(75) NOT NULL +)Engine=InnoDB; +#EndIfTable + #IfNotRow lists option_id Hide_Dashboard_Cards -- Create new list Hide Dashboard Cards -INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 0); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_allergies', 'Allergies'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_amendments', 'Amendments'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_disclosure', 'Disclosures'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_lab', 'Lab'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_medicalproblems', 'Medical Problems'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_medication', 'Medication'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_vitals', 'Vitals'); #EndIf diff --git a/sql/database.sql b/sql/database.sql index 25a1dfd4115..7c48893b58b 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -13639,12 +13639,17 @@ INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default` INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES('nationality_with_country', 'ZM', 'Zambian', '2490', '0', '0', '', 'Zambia', 'ZMB:894'); INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES('nationality_with_country', 'ZW', 'Zimbabwean', '2500', '0', '0', '', 'Zimbabwe', 'ZWE:716'); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES ('lists', 'Hide_Dashboard_Cards', 'Hide Dashboard Cards'); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`activity`) VALUES ('Hide_Dashboard_Cards', 'card_allergies', 'Allergies', 10, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_amendments', 'Amendments', 60, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_disclosure', 'Disclosures', 50, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_lab', 'Lab', 70, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medicalproblems', 'Medical Problems', 20, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_medication', 'Medication', 30, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_rx', 'Prescriptions', 40, 0); -INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `activity`) VALUES ('Hide_Dashboard_Cards', 'card_vitals', 'Vitals', 80, 0); +DROP TABLE IF EXISTS `dashboard_card_visibility`; +CREATE TABLE IF NOT EXISTS dashboard_card_visibility ( + `id` INTEGER PRIMARY KEY AUTO_INCREMENT, + `card_abrev` VARCHAR(75) NOT NULL, + `card_name` VARCHAR(75) NOT NULL +)Engine=InnoDB; + +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_allergies', 'Allergies'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_amendments', 'Amendments'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_disclosure', 'Disclosures'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_lab', 'Lab'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_medicalproblems', 'Medical Problems'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_medication', 'Medication'); +INSERT INTO `dashboard_card_visibility` (`id`, `card_abrev`, `card_name`) VALUES (NULL, 'card_vitals', 'Vitals'); diff --git a/src/Services/Globals/GlobalSetting.php b/src/Services/Globals/GlobalSetting.php index c270ebec4a7..71f50508c0e 100644 --- a/src/Services/Globals/GlobalSetting.php +++ b/src/Services/Globals/GlobalSetting.php @@ -42,6 +42,9 @@ class GlobalSetting // multiple select language selector const DATA_TYPE_MULTI_LANGUAGE_SELECT = "m_lang"; + // multiple select dashboard cards + const DATA_TYPE_MULTI_DASHBOARD_CARDS = "m_dashboard_cards"; + // list of default visits in OpenEMR const DATA_TYPE_DEFAULT_VISIT_CATEGORY = "default_visit_category"; // CSS Theme selector From 2a75c716812f2cb827ddbfb2b5fbadaec197f7a7 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Wed, 20 Mar 2024 02:40:49 -0400 Subject: [PATCH 10/17] PSR again and again and again --- interface/super/edit_globals.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/super/edit_globals.php b/interface/super/edit_globals.php index facafaba9b3..2bd72e165e7 100644 --- a/interface/super/edit_globals.php +++ b/interface/super/edit_globals.php @@ -645,7 +645,7 @@ function checkBackgroundServices() echo "\n"; } echo " \n"; - } elseif ($fldtype == GlobalSetting::DATA_TYPE_MULTI_DASHBOARD_CARDS) { + } elseif ($fldtype == GlobalSetting::DATA_TYPE_MULTI_DASHBOARD_CARDS) { $res = sqlStatement("SELECT * FROM dashboard_card_visibility"); echo " \n"; - } elseif ($fldtype == GlobalSetting::DATA_TYPE_MULTI_DASHBOARD_CARDS) { - $res = sqlStatement("SELECT * FROM dashboard_card_visibility"); - echo " \n"; } elseif ($fldtype == GlobalSetting::DATA_TYPE_COLOR_CODE) { if ($userMode) { $globalTitle = $globalValue;