diff --git a/Documentation/help_files/medical_dashboard_help.php b/Documentation/help_files/medical_dashboard_help.php index 0a869a37157..24d10871113 100644 --- a/Documentation/help_files/medical_dashboard_help.php +++ b/Documentation/help_files/medical_dashboard_help.php @@ -162,6 +162,11 @@

+ +

+ +

.

+

.

.

diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 341b69c684c..b9686f4c0b3 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(); +$hiddenCards = getHiddenDashboardCards(); /** * @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', $hiddenCards)) { + 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 "
"; - echo $t->render('patient/card/medical_problems.html.twig', $viewArgs); + if (!in_array('card_medicalproblems', $hiddenCards)) { + 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 "
"; - echo $t->render('patient/card/medication.html.twig', $viewArgs); + if (!in_array('card_medication', $hiddenCards)) { + 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,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_patientreminders', $hiddenCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } endif; //end if prw is activated if (AclMain::aclCheckCore('patients', 'disclosure')) : @@ -1476,7 +1484,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', $hiddenCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } endif; // end if disclosures authorized if ($GLOBALS['amendments'] && AclMain::aclCheckCore('patients', 'amendment')) : @@ -1504,7 +1514,9 @@ 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', $hiddenCards)) { + echo $twig->getTwig()->render('patient/card/amendments.html.twig', $viewArgs); + } endif; // end amendments authorized if (AclMain::aclCheckCore('patients', 'lab')) : @@ -1532,7 +1544,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', $hiddenCards)) { + echo $twig->getTwig()->render('patient/card/loader.html.twig', $viewArgs); + } endif; // end labs authorized if ($vitals_is_registered && AclMain::aclCheckCore('patients', 'med')) : @@ -1555,7 +1569,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', $hiddenCards)) { + 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/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 a1a27fb3ade..b21ba2561de 100644 --- a/library/lists.inc.php +++ b/library/lists.inc.php @@ -142,3 +142,14 @@ function setListTouch($patient_id, $type) sqlStatement("INSERT INTO `lists_touch` ( `pid`,`type`,`date` ) VALUES ( ?, ?, NOW() )", array($patient_id,$type)); } } + +function getHiddenDashboardCards() +{ + $hiddenList = []; + $ret = sqlStatement("SELECT gl_value FROM `globals` WHERE `gl_name` = 'hide_dashboard_cards'"); + while ($row = sqlFetchArray($ret)) { + $hiddenList[] = $row['gl_value']; + } + + return $hiddenList; +} 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..2d4b2259858 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,4 @@ 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 + 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..57204f48274 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -112,4 +112,8 @@ #IfMissingColumn form_encounter last_update ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; #EndIf +#IfNotRow4D supported_external_dataloads load_type CQM_VALUESET load_source NIH_VSAC load_release_date 2023-05-04 load_filename ec_only_cms_20230504.xml.zip +INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES + ('CQM_VALUESET', 'NIH_VSAC', '2023-05-04', 'ec_only_cms_20230504.xml.zip', 'b77b3c2a88d23de0ec427c1cfc5088ce'); +#EndIf diff --git a/sql/database.sql b/sql/database.sql index 500aef7e010..7c48893b58b 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -13638,3 +13638,18 @@ 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'); + +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