Skip to content

Commit

Permalink
Merge pull request openemr#7246 from sjpadgett/cherry_picks
Browse files Browse the repository at this point in the history
Cherry picks 7.0.3 to 7.0.2 patch 2
  • Loading branch information
sjpadgett authored Feb 22, 2024
2 parents 16e1837 + 8378da5 commit e4d8d0d
Show file tree
Hide file tree
Showing 50 changed files with 2,730 additions and 1,934 deletions.
2 changes: 1 addition & 1 deletion interface/forms/LBF/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ function warehouse_changed(sel) {
"JOIN form_encounter AS e2 ON " .
"e2.pid = e1.pid AND (e2.date < e1.date OR (e2.date = e1.date AND e2.encounter <= e1.encounter)) " .
"JOIN shared_attributes AS sa ON " .
"sa.pid = e2.pid AND sa.encounter = e2.encounter AND sa.field_id = ?" .
"sa.pid = e2.pid AND sa.encounter = e2.encounter AND sa.field_id = ? " .
"WHERE e1.pid = ? AND e1.encounter = ? " .
"ORDER BY e2.date DESC, e2.encounter DESC LIMIT 1",
array($field_id, $pid, $visitid)
Expand Down
886 changes: 452 additions & 434 deletions interface/logview/logview.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion interface/main/tabs/menu/menus/standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
{
"label": "Manage Modules",
"menu_id": "adm0",
"target": "pat",
"target": "adm",
"url": "/interface/modules/zend_modules/public/Installer",
"children": [],
"requirement": 0,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$classLoader->registerNamespaceIfNotExists("OpenEMR\\Modules\\FaxSMS\\", __DIR__ . DIRECTORY_SEPARATOR . 'src');
*/

class ModuleManagerAfterActionListener extends AbstractModuleActionListener
class ModuleManagerListener extends AbstractModuleActionListener
{
public $service;
private $authUser;
Expand Down Expand Up @@ -75,9 +75,9 @@ public static function getModuleNamespace(): string
* Required method to return this class object,
* so it is instantiated in Laminas Manager.
*
* @return ModuleManagerAfterActionListener
* @return ModuleManagerListener
*/
public static function initListenerSelf(): ModuleManagerAfterActionListener
public static function initListenerSelf(): ModuleManagerListener
{
return new self();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
*/

use OpenEMR\Core\AbstractModuleActionListener;
use OpenEMR\Modules\WenoModule\Services\ModuleService;

/* Allows maintenance of background tasks depending on Module Manager action. */

class ModuleManagerAfterActionListener extends AbstractModuleActionListener
class ModuleManagerListener extends AbstractModuleActionListener
{
public function __construct()
{
Expand Down Expand Up @@ -73,9 +74,9 @@ public static function getModuleNamespace(): string
* Required method to return this class object,
* so it is instantiated in Laminas Manager.
*
* @return ModuleManagerAfterActionListener
* @return ModuleManagerListener
*/
public static function initListenerSelf(): ModuleManagerAfterActionListener
public static function initListenerSelf(): ModuleManagerListener
{
return new self();
}
Expand All @@ -95,20 +96,41 @@ private function install($modId, $currentActionStatus): mixed
* @param $currentActionStatus
* @return mixed
*/
private function enable($modId, $currentActionStatus): mixed
private function preenable($modId, $currentActionStatus): mixed
{
$rtn = $this->setTaskState('1');
$modService = new ModuleService();
if ($modService->isWenoConfigured()) {
$modService::setModuleState($modId, '0', '0');
return $currentActionStatus;
}
$modService::setModuleState($modId, '0', '1');
return $currentActionStatus;
}

/**
* @param $modId
* @param $currentActionStatus
* @return mixed
*/
private function enable($modId, $currentActionStatus): mixed
{
$modService = new ModuleService();
if ($modService->isWenoConfigured()) {
$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.");
}

/**
* @param $modId
* @param $currentActionStatus
* @return mixed
*/
private function disable($modId, $currentActionStatus): mixed
{
$rtn = $this->setTaskState('0');
ModuleService::setModuleState($modId, '0', '0');
return $currentActionStatus;
}

Expand Down Expand Up @@ -162,14 +184,4 @@ function getModuleRegistry($modId, $col = '*'): array

return $registry;
}

/**
* @param $flag
* @return mixed
*/
private function setTaskState($flag): mixed
{
$sql_next = "UPDATE `background_services` SET `active` = ? WHERE `name` = ? OR `name` = ?";
return sqlQuery($sql_next, array($flag, 'WenoExchange', 'WenoExchangePharmacies'));
}
}
2 changes: 1 addition & 1 deletion interface/modules/custom_modules/oe-module-weno/info.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Weno EZ Integration Module
Weno EZ Integration eRx Module v1.2.0
17 changes: 11 additions & 6 deletions interface/modules/custom_modules/oe-module-weno/moduleConfig.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<?php

/**
* Config Module.
* Call the module setup page if present.
* Included in all modules and called by Module Manager.
*
* package OpenEMR
* link http://www.open-emr.org
* author Sherwin Gaddis <[email protected]>
* copyright Copyright (c )2021. Sherwin Gaddis <[email protected]>
* license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*
* @package OpenEMR Module
* @link http://www.open-emr.org
* @author Jerry Padgett <[email protected]>
* @copyright Copyright (c) 2023-24 Jerry Padgett <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/

require_once dirname(__FILE__, 4) . '/globals.php';

$module_config = 1;
?>

<iframe src="templates/weno_setup.php?module_config=1" style="border:none;height:100vh;width:100%;"></iframe>
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
* @global EventDispatcher $eventDispatcher Injected by the OpenEMR module loader;
*/

$bootstrap = new Bootstrap($eventDispatcher, $GLOBALS['kernel']);
$bootstrap = new Bootstrap($eventDispatcher);
$bootstrap->subscribeToEvents();
Loading

0 comments on commit e4d8d0d

Please sign in to comment.