From add592efa4ad1c34691e07c23d5cc9f9ee72a075 Mon Sep 17 00:00:00 2001 From: juggernautsei Date: Tue, 21 May 2024 07:05:26 -0400 Subject: [PATCH] Not working to install --- .../ModuleManagerListener.php | 123 +++++++++--------- .../public/claims.php | 111 ++++++++-------- .../public/debug-info.php | 12 +- .../oe-module-claimrev-connect/public/era.php | 18 ++- .../public/index.php | 32 ++--- .../public/setup.php | 42 +++--- .../public/x12Tracker.php | 55 +++----- .../src/Services/ModuleServices.php | 83 ++++++++++++ 8 files changed, 259 insertions(+), 217 deletions(-) create mode 100644 interface/modules/custom_modules/oe-module-claimrev-connect/src/Services/ModuleServices.php diff --git a/interface/modules/custom_modules/oe-module-claimrev-connect/ModuleManagerListener.php b/interface/modules/custom_modules/oe-module-claimrev-connect/ModuleManagerListener.php index 6926d8670dc..77e81f97296 100644 --- a/interface/modules/custom_modules/oe-module-claimrev-connect/ModuleManagerListener.php +++ b/interface/modules/custom_modules/oe-module-claimrev-connect/ModuleManagerListener.php @@ -31,6 +31,7 @@ */ use OpenEMR\Core\AbstractModuleActionListener; +use OpenEMR\Modules\ClaimRevConnector\Services\ModuleServices; /* Allows maintenance of background tasks depending on Module Manager action. */ @@ -86,17 +87,17 @@ public static function initListenerSelf(): ModuleManagerListener * @param $currentActionStatus * @return mixed */ -// private function install($modId, $currentActionStatus): mixed -// { -// $modService = new ModuleServices(); -// /* setting the active ui flag here will allow the config button to show -// * before enable. This is a good thing because it allows the user to -// * configure the module before enabling it. However, if the module is disabled -// * this flag is reset by MM. -// */ -// $modService::setModuleState($modId, '0', '1'); -// return $currentActionStatus; -// } + private function install($modId, $currentActionStatus): mixed + { + $modService = new ModuleServices(); + /* setting the active ui flag here will allow the config button to show + * before enable. This is a good thing because it allows the user to + * configure the module before enabling it. However, if the module is disabled + * this flag is reset by MM. + */ + $modService::setModuleState($modId, '0', '1'); + return $currentActionStatus; + } /** * @param $modId @@ -118,38 +119,38 @@ private function help_requested($modId, $currentActionStatus): mixed * @param $currentActionStatus * @return mixed */ -// private function preenable($modId, $currentActionStatus): mixed -// { -// return $currentActionStatus; -// } + private function preenable($modId, $currentActionStatus): mixed + { + return $currentActionStatus; + } /** * @param $modId * @param $currentActionStatus * @return mixed */ -// private function enable($modId, $currentActionStatus): mixed -// { -// $modService = new ModuleServices(); -// if ($modService->isClaimRevConfigured()) { -// $modService::setModuleState($modId, '1', '0'); -// return $currentActionStatus; -// } -// $modService::setModuleState($modId, '1', '1'); -// return xlt("Weno eRx Service is not configured. Please configure Weno eRx Service in the Weno Module Setup."); -// } + private function enable($modId, $currentActionStatus): mixed + { + $modService = new ModuleServices(); + if ($modService->isClaimRevConfigured()) { + $modService::setModuleState($modId, '1', '0'); + return $currentActionStatus; + } + $modService::setModuleState($modId, '1', '1'); + return xlt("Claim Rev Service is not configured. Please configure Claim Rev Service in the Admin Config."); + } /** * @param $modId * @param $currentActionStatus * @return mixed */ -// private function disable($modId, $currentActionStatus): mixed -// { -// // allow config button to show before enable. -// ModuleServices::setModuleState($modId, '0', '1'); -// return $currentActionStatus; -// } + private function disable($modId, $currentActionStatus): mixed + { + // allow config button to show before enable. + ModuleServices::setModuleState($modId, '0', '1'); + return $currentActionStatus; + } /** * @param $modId @@ -168,48 +169,48 @@ private function unregister($modId, $currentActionStatus): mixed * @param $currentActionStatus * @return mixed */ -// private function reset_module($modId, $currentActionStatus): mixed -// { -// $rtn = true; -// $modService = new ModuleServices(); -// $logMessage = ''; // Initialize an empty string to store log messages -// -// if (!$modService::getModuleState($modId)) { -// -// $sql = "DELETE FROM `globals` WHERE `gl_name` LIKE 'oe_claimrev%'"; -// $rtn = sqlQuery($sql); -// $logMessage .= "DELETE FROM `globals`: " . (empty($rtn) ? "Success" : "Failed") . "\n"; -// -// $sql = "DROP TABLE IF EXISTS `mod_claimrev_eligibility`"; -// $rtn = sqlQuery($sql); -// $logMessage .= "DROP TABLE `mod_claimrev_eligibility`: " . (empty($rtn) ? "Success" : "Failed") . "\n"; -// -// error_log(text($logMessage)); -// } -// -// // return log messages to the MM to show user. -// return text($logMessage); -// } + private function reset_module($modId, $currentActionStatus): mixed + { + $rtn = true; + $modService = new ModuleServices(); + $logMessage = ''; // Initialize an empty string to store log messages + + if (!$modService::getModuleState($modId)) { + + $sql = "DELETE FROM `globals` WHERE `gl_name` LIKE 'oe_claimrev%'"; + $rtn = sqlQuery($sql); + $logMessage .= "DELETE FROM `globals`: " . (empty($rtn) ? "Success" : "Failed") . "\n"; + + $sql = "DROP TABLE IF EXISTS `mod_claimrev_eligibility`"; + $rtn = sqlQuery($sql); + $logMessage .= "DROP TABLE `mod_claimrev_eligibility`: " . (empty($rtn) ? "Success" : "Failed") . "\n"; + + error_log(text($logMessage)); + } + + // return log messages to the MM to show user. + return text($logMessage); + } /** * @param $modId * @param $currentActionStatus * @return mixed */ -// private function install_sql($modId, $currentActionStatus): mixed -// { -// return $currentActionStatus; -// } + private function install_sql($modId, $currentActionStatus): mixed + { + return $currentActionStatus; + } /** * @param $modId * @param $currentActionStatus * @return mixed */ -// private function upgrade_sql($modId, $currentActionStatus): mixed -// { -// return $currentActionStatus; -// } + private function upgrade_sql($modId, $currentActionStatus): mixed + { + return $currentActionStatus; + } /** * Grab all Module setup or columns values. diff --git a/interface/modules/custom_modules/oe-module-claimrev-connect/public/claims.php b/interface/modules/custom_modules/oe-module-claimrev-connect/public/claims.php index c58fe85b7f8..05739b0e1f9 100644 --- a/interface/modules/custom_modules/oe-module-claimrev-connect/public/claims.php +++ b/interface/modules/custom_modules/oe-module-claimrev-connect/public/claims.php @@ -15,7 +15,6 @@ use OpenEMR\Common\Acl\AclMain; use OpenEMR\Common\Twig\TwigContainer; use OpenEMR\Modules\ClaimRevConnector\ClaimsPage; - use OpenEMR\Core\Header; $tab = "claims"; @@ -28,13 +27,11 @@ - - + <?php echo xlt("ClaimRev Connect - Claims"); ?> -
-
+
-
+
-
+
@@ -57,10 +54,10 @@
- -
+ +
- +
@@ -77,22 +74,22 @@
- +
- +
-
+
- +
-
- - + + + @@ -110,18 +107,18 @@ - + - + + ?> - + + errors) { ?> @@ -312,16 +309,16 @@ ?> - - - - + + + +
@@ -140,7 +137,7 @@
- : + :
@@ -154,7 +151,7 @@
- : + :
@@ -166,7 +163,7 @@
- : + :
@@ -175,56 +172,56 @@
-
+
- : + :
- payerName); ?> + payerName); ?>
- : + :
- payerNumber); ?> + payerNumber); ?>
- : + :
- payerControlNumber); ?> + payerControlNumber); ?>
- : + :
- providerFirstName); ?> providerLastName); ?> + providerFirstName); ?> providerLastName); ?>
- : + :
- providerNpi); ?> + providerNpi); ?>
- : + :
pLastName); ?>, pFirstName); ?> @@ -235,30 +232,30 @@ :
- birthDate, 0, 10)); ?> + birthDate, 0, 10)); ?>
- : + :
- patientGender); ?> + patientGender); ?>
- : + :
- memberNumber); ?> + memberNumber); ?>
- : + :
traceNumber); ?> @@ -266,38 +263,38 @@
- : + :
- payerControlNumber); ?> + payerControlNumber); ?>
- : + :
- billedAmount); ?> + billedAmount); ?>
- : + :
- payerPaidAmount); ?> + payerPaidAmount); ?>
- : + :
- serviceDate, 0, 10)); ?> / serviceDateEnd, 0, 10)); ?> + serviceDate, 0, 10)); ?> / serviceDateEnd, 0, 10)); ?>
-
- - + + diff --git a/interface/modules/custom_modules/oe-module-claimrev-connect/public/debug-info.php b/interface/modules/custom_modules/oe-module-claimrev-connect/public/debug-info.php index a15693f2431..83cf65ddd98 100644 --- a/interface/modules/custom_modules/oe-module-claimrev-connect/public/debug-info.php +++ b/interface/modules/custom_modules/oe-module-claimrev-connect/public/debug-info.php @@ -15,7 +15,6 @@ use OpenEMR\Common\Acl\AclMain; use OpenEMR\Common\Twig\TwigContainer; use OpenEMR\Modules\ClaimRevConnector\ConnectivityInfo; - use OpenEMR\Core\Header; $tab = "connectivity"; @@ -28,12 +27,10 @@ - - + <?php echo xlt("ClaimRev Connect - Account"); ?> -
@@ -42,9 +39,9 @@
-

+

    - +
  • : client_authority); ?>
  • : clientId); ?>
  • : client_scope); ?>
  • @@ -52,14 +49,13 @@
  • : defaultAccount); ?>
  • : hasToken); ?>
-
+
-
diff --git a/interface/modules/custom_modules/oe-module-claimrev-connect/public/era.php b/interface/modules/custom_modules/oe-module-claimrev-connect/public/era.php index a4ed88b920c..ab0063cb011 100644 --- a/interface/modules/custom_modules/oe-module-claimrev-connect/public/era.php +++ b/interface/modules/custom_modules/oe-module-claimrev-connect/public/era.php @@ -44,7 +44,7 @@ - +