From 43c0e8e6224415653963ce57434a3e1e79a397e3 Mon Sep 17 00:00:00 2001 From: teryhill Date: Wed, 27 Apr 2016 13:57:11 -0400 Subject: [PATCH] Control the patient delete button with a global entry, defaults to off set default to off --- interface/patient_file/summary/demographics.php | 2 +- library/globals.inc.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index dd81a84eb..7c87e5445 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -519,7 +519,7 @@ $(window).load(function() { htmlspecialchars(getPatientName($pid),ENT_NOQUOTES) . ""; - if (acl_check('admin', 'super')) { + if (acl_check('admin', 'super') && $GLOBALS['allow_pat_delete']) { echo "" . "".htmlspecialchars(xl('Delete'),ENT_NOQUOTES). diff --git a/library/globals.inc.php b/library/globals.inc.php index da5663343..8716c38f3 100644 --- a/library/globals.inc.php +++ b/library/globals.inc.php @@ -1,4 +1,4 @@ - // // This program is free software; you can redistribute it and/or @@ -743,6 +743,14 @@ $GLOBALS_METADATA = array( xl('Enable amendments feature') ), + 'allow_pat_delete' => array( + xl('Allow Administrators to Delete Patients'), + 'bool', // data type + '0', // default = false + xl('Allow Administrators to Delete Patients') + + ), + ), // Report Tab // -- 2.11.4.GIT