From 00c2b3fd9a7eea5310daeaab017fba251467b914 Mon Sep 17 00:00:00 2001 From: gabordikan Date: Thu, 9 May 2024 17:11:13 +0200 Subject: [PATCH 1/8] fixed DM+D import routines --- protected/commands/ImportDrugsCommand.php | 14 +++++++++-- .../migrations/data/dmd_import/delete.sql | 25 ++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/protected/commands/ImportDrugsCommand.php b/protected/commands/ImportDrugsCommand.php index dde42e7fb4..ef44901742 100644 --- a/protected/commands/ImportDrugsCommand.php +++ b/protected/commands/ImportDrugsCommand.php @@ -149,7 +149,7 @@ public function getHelp() private function _getImportDir() { - return getenv('DMD_EXTRACT_FOLDER') ?? Yii::getPathOfAlias('application') . '/data/dmd_data'; + return getenv('DMD_EXTRACT_FOLDER') ?: Yii::getPathOfAlias('application') . '/data/dmd_data'; } public function getParams($params) @@ -473,6 +473,10 @@ public function createInsertSqlCommands($xmlArray, $type, $tablesData) $k = array_keys($rows); + if (!isset($k[0])) { + continue; + } + if ($k[0] == '0') { $subsubnode = $rows; } else { @@ -482,7 +486,13 @@ public function createInsertSqlCommands($xmlArray, $type, $tablesData) $multipleValues = ''; $multipleValuesMaxCount = 100; $multipleValuesCurrentCount = 0; - $rowCount = sizeof($subsubnode); + + + if (is_null($subsubnode)) { + continue; + } + + $rowCount = count($subsubnode); foreach ($subsubnode as $rowIndex => $oneRow) { if ($limit <= $i++ && $limit != 0) { break; diff --git a/protected/migrations/data/dmd_import/delete.sql b/protected/migrations/data/dmd_import/delete.sql index 824a2eb12c..45fd11ffdc 100644 --- a/protected/migrations/data/dmd_import/delete.sql +++ b/protected/migrations/data/dmd_import/delete.sql @@ -5,6 +5,8 @@ SELECT id FROM medication_set WHERE `name` = 'DM+D AMP' OR `name` = 'DM+D VMP' OR `name` = 'DM+D VTM'; +DELETE FROM medication_set_item_taper WHERE medication_set_item_id in (select id from medication_set_item WHERE medication_id IN (SELECT id FROM medication WHERE source_type='DM+D')); + DELETE FROM medication_set_item WHERE medication_set_id IN (SELECT id FROM tmp_delete_from_sets); DELETE FROM medication_set_item WHERE medication_id IN (SELECT id FROM medication WHERE source_type='DM+D'); @@ -15,8 +17,14 @@ DELETE FROM medication_set_auto_rule_set_membership WHERE target_medication_set_ DELETE FROM medication_set_auto_rule_set_membership WHERE source_medication_set_id IN (SELECT id FROM tmp_delete_from_sets); +DELETE FROM medication_set_auto_rule_medication_taper WHERE medication_set_auto_rule_id in (SELECT id FROM medication_set_auto_rule_medication WHERE medication_id IN (SELECT id FROM medication WHERE source_type='DM+D')); + DELETE FROM medication_set_auto_rule_medication WHERE medication_id IN (SELECT id FROM medication WHERE source_type='DM+D'); +DELETE FROM event_medication_use WHERE prescription_item_id in (SELECT rmu.id FROM event_medication_use rmu LEFT JOIN medication rm ON rm.id = rmu.medication_id WHERE rm.source_type = 'DM+D'); + +DELETE FROM ophdrprescription_item_taper WHERE item_id in (SELECT rmu.id FROM event_medication_use rmu LEFT JOIN medication rm ON rm.id = rmu.medication_id WHERE rm.source_type = 'DM+D'); + DELETE rmu FROM event_medication_use rmu LEFT JOIN medication rm ON rm.id = rmu.medication_id WHERE rm.source_type = 'DM+D'; DELETE FROM medication_search_index WHERE medication_id IN (SELECT id FROM medication WHERE source_type = 'DM+D'); @@ -24,13 +32,28 @@ DELETE FROM medication WHERE source_type = 'DM+D'; DELETE FROM medication_set WHERE `name` IN ('DM+D AMP', 'DM+D VMP', 'DM+D VTM'); DELETE FROM medication_attribute_assignment; ALTER TABLE medication_attribute_assignment AUTO_INCREMENT = 1; + +DELETE FROM medication_set_auto_rule_attribute where medication_attribute_option_id in (SELECT id FROM medication_attribute_option); + DELETE FROM medication_attribute_option; ALTER TABLE medication_attribute_option AUTO_INCREMENT = 1; DELETE FROM medication_attribute; ALTER TABLE medication_attribute AUTO_INCREMENT = 1; DELETE FROM medication_form WHERE source_type = 'DM+D'; + +DELETE FROM medication_set_item WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D'); +DELETE FROM medication_set_auto_rule_medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D'); +DELETE FROM medication_set_auto_rule_medication where medication_id in (SELECT id FROM medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D')); +DELETE FROM medication_search_index where medication_id in (SELECT id FROM medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D')); +DELETE FROM medication_set_item where medication_id in (SELECT id FROM medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D')); +DELETE FROM event_medication_use WHERE prescription_item_id in (SELECT id FROM event_medication_use where medication_id in (SELECT id FROM medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D'))); +DELETE FROM event_medication_use where medication_id in (SELECT id FROM medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D')); +DELETE FROM medication WHERE default_route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D'); +DELETE FROM event_medication_use where route_id in (SELECT id FROM medication_route WHERE source_type = 'DM+D'); + + DELETE FROM medication_route WHERE source_type = 'DM+D'; DROP TABLE tmp_delete_from_sets; -COMMIT; \ No newline at end of file +COMMIT; From 4404e73ac2c8db8ffbe9d040873e3260f4797d20 Mon Sep 17 00:00:00 2001 From: gabordikan Date: Fri, 10 May 2024 09:11:58 +0200 Subject: [PATCH 2/8] readme file added --- README.md | 79 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 8651cfd4c8..b188a4cd48 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,72 @@ -[![CodeFactor](https://www.codefactor.io/repository/github/openeyes/openeyes/badge)](https://www.codefactor.io/repository/github/openeyes/openeyes) +
OpenEyes logo
-OpenEyes -======== -Introduction ------------- +# OpenEyes + +OpenEyes™ is the leading open source Electronic Patient Record (EPR) for ophthalmology. + +- [View Website](https://openeyes.apperta.org/) +- [Report an issue](https://github.com/AppertaFoundation/openeyes/issues/new) +- [Request feature](https://openeyes.apperta.org/) + +## Table of contents + +- [Description](#Description) +- [Disclaimer](#Disclaimer) +- [Setup](#Setup) +- [Issues and support](#issues-and-support) +- [Resources](#Resources) +- [Contributing](#Contributing) +- [Copyright and license](#Copyright-and-license) + -OpenEyes is a collaborative, open source, project led by the OpenEyes Foundation (http://www.openeyes.org.uk/). The goal is to produce a framework which will allow the rapid, and continuous development of an electronic patient record (EPR for ophthalmology in particular and eye care in general). Clinical and technical contributions are made by Hospitals, Institutions, Academic departments, Companies, and Individuals. +------------ +# Description +OpenEyes is a collaborative, open source, project led by the Apperta Foundation (http://openeyes.apperta.org). The goal is to produce a framework which will allow the rapid, and continuous development of an electronic patient record (EPR for ophthalmology in particular and eye care in general). Clinical and technical contributions are made by Hospitals, Institutions, Academic departments, Companies, and Individuals. The initial focus is on Ophthalmology, but the design is sufficiently flexible to be used for any clinical specialty. -Ophthalmic units of any size, from a single practitioner to a large eye hospital, should be able to make use of the structure, design, and code to produce a functional, easy to use EPR at minimal cost. By sharing experience, pooling ideas, and distributing development effort, it is expected that the range and capability of OpenEyes will evolve rapidly. OpenEyes should also be of values for use by -non-medical staff such as optometrists in the delivery of share programs of eye care. +Ophthalmic units of any size, from a single practitioner to a large eye hospital, should be able to make use of the structure, design, and code to produce a functional, easy to use EPR at minimal cost. By sharing experience, pooling ideas, and distributing development effort, it is expected that the range and capability of OpenEyes will evolve rapidly. OpenEyes should also be of value for use by non-medical staff such as optometrists in the delivery of shared programs of eye care. -Disclaimer +# Disclaimer ---------- -OpenEyes is provided under an GNU Affero GPL v3.0 (AGPL v3.0) license and all terms of that license apply (https://www.gnu.org/licenses/agpl-3.0.en.html). Use of the OpenEyes software or code is entirely at user risk. The Apperta Foundation does not accept any responsibility for loss or damage to any person, property or reputation as a result of using the software or code. No warranty is provided by any party, implied or otherwise. For use of the software or code. This software and code is not guaranteed safe to use in a clinical environment; any user is advised to undertake a safety assessment to confirm that deployment matches local clinical safety requirements. +OpenEyes is provided under an GNU Affero GPL v3.0 (AGPL v3.0) license and all terms of that license apply (https://www.gnu.org/licenses/agpl-3.0.en.html). Use of the OpenEyes software or code is entirely at user risk. The Apperta Foundation does not accept any responsibility for loss or damage to any person, property or reputation as a result of using the software or code. No warranty is provided by any party, implied or otherwise, for use of the software or code. This software and code is not guaranteed safe to use in a clinical environment; any user is advised to undertake a safety assessment to confirm that deployment matches local clinical safety requirements. -Resources +# Setup --------- -This is the main repository for development of the core OpenEyes framework. Event type modules are being developed in other repositories both by ourselves and third party developers. The [OpenEyes Project Overview](https://github.com/appertafoundation/OpenEyes/wiki#project-overview) provides a list of currently stable modules. You may also be interested in our [EyeDraw repository](https://github.com/appertafoundation/EyeDraw) - this code is used by OpenEyes but may also be used independently. - -The principal source of information on OpenEyes is [the OpenEyes website](http://www.openeyes.org.uk) +Detailed installation instructions to build each version can be found on the project wiki page [here](https://github.com/AppertaFoundation/openeyes/wiki/Installation-Instructions-v4.0.3). + +# Issues and support -If you're interested in the OpenEyes project, or for general enquiries, email: +Issues in the core should be logged through the [github issues system](https://github.com/AppertaFoundation/openeyes/issues/new). -You can find us on twitter at: http://twitter.com/openeyes_oef - -Developers, developers, developers! ------------------------------------ +Please be aware that no service level agreement exists for the open source project and no support can be given via github. The team will do their best to fix any critical issues reported, but no guarantees are given. -If you need to share repositories with members of the core development team, you can find them listed as _organizational members_ at: +Official implementation and support is available from our Accredited Professional Services Partner Network. A list of available partners can be found at the following link [openeyes.apperta.org](openeyes.apperta.org). + +# Resources +--------- -OpenEyes follows the [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) model for git branches. As such, the stable release branch is always on master. For bleeding edge development, use the develop branch. +This is the main repository for development of the core OpenEyes framework. Event type modules are being developed in other repositories both by ourselves and Accredited Contributors. You may also be interested in our [EyeDraw repository](https://github.com/appertafoundation/EyeDraw); this code is used by OpenEyes but may also be used independently. -We are beginning to evolve some documentation for developers on [our github wiki](https://github.com/appertafoundation/OpenEyes/wiki) including [coding guidelines](https://github.com/appertafoundation/openeyes/wiki/Coding-Guidelines), [working with the core team](https://github.com/appertafoundation/openeyes/wiki/Working-With-The-Core-Team) and our [Event type module development guide](https://github.com/appertafoundation/openeyes/wiki/Event-Type-Module-Development-Guide). +The principal source of information on OpenEyes is [the OpenEyes website](http://openeyes.apperta.org) -Issues in the core should be logged through the [github issues system](https://github.com/appertafoundation/OpenEyes/issues) for the moment. Though please be aware that no service level agreement exists for the open source project and no support can be given via github. The team will do their best to fix any critical issues reported, but no gaurantees are given. For official support, with Service Level Agreements on resolution times, please contact our commercial partner, [ABEHR Digital](http://abehr.com) +If you're interested in the OpenEyes project, or for general enquiries, email: -Setup ---------- -To make life easier and also help ensure consistency in environments we use Docker. Full setup instructions can be found in the [appertaopeneyes docker hub repository](https://hub.docker.com/r/appertaopeneyes/web-allin1) +You can find us on twitter at: http://twitter.com/openeyes_oef -Once the build has finished you can access OpenEyes using the link: +# Contributing +----------------------------------- -[http://localhost](http://localhost) +If you are thinking of making a contribution to OpenEyes please contact our team at . -**Note:** [Google Chrome](https://www.google.com/chrome/) is the *only* supported browser for OpenEyes. +If you need to share repositories with members of the core development team, you can find them listed as _organizational members_ at: -**Note:** There are many options/variables/tags avilable in the Docker conatiner. If the options are omitted then default values are used. More information can be found on the [docker hub page](https://hub.docker.com/r/appertaopeneyes/web-allin1) +OpenEyes follows the [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) model for git branches. As such, the stable release branch is always on master. For bleeding edge development, use the develop branch. +----------------------------------- +# Copyright and license +- Code and documentation copyright 2019–2024 the [Apperta Foundation](https://apperta.org/) +- Code released under the [GNU Affero General Public License v3.0](https://github.com/AppertaFoundation/openeyes/blob/master/LICENSE) +- Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/). \ No newline at end of file From a412930ac05d74d774f9bad0520e2af49759b4d6 Mon Sep 17 00:00:00 2001 From: gabordikan Date: Fri, 10 May 2024 09:12:21 +0200 Subject: [PATCH 3/8] login screen changes --- protected/config/core/common.php | 188 ++++++++++++++++++++++--------- protected/views/base/_brand.php | 51 ++++----- protected/views/site/login.php | 27 ++--- 3 files changed, 171 insertions(+), 95 deletions(-) diff --git a/protected/config/core/common.php b/protected/config/core/common.php index 06f3e16886..5406e988be 100644 --- a/protected/config/core/common.php +++ b/protected/config/core/common.php @@ -1,20 +1,20 @@ . - * - * @link http://www.openeyes.org.uk - * - * @author OpenEyes - * @copyright Copyright (c) 2020 Apperta Foundation - * @license http://www.gnu.org/licenses/agpl-3.0.html The GNU Affero General Public License V3.0 - */ +* OpenEyes. +* +* (C) Apperta Foundation, 2020 +* This file is part of OpenEyes. +* OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +* OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. +* You should have received a copy of the GNU Affero General Public License along with OpenEyes in a file titled COPYING. If not, see . +* +* @link http://www.openeyes.org.uk +* +* @author OpenEyes +* @copyright Copyright (c) 2020 Apperta Foundation +* @license http://www.gnu.org/licenses/agpl-3.0.html The GNU Affero General Public License V3.0 +*/ // If the old db.conf file (pre docker) exists, use it. Else read environment variable, else read docker secrets // Note, docker secrets are the recommended approach for docker environments @@ -80,18 +80,6 @@ 'OEModule' => 'application.modules', ), - 'modules' => array( - // Gii tool - 'gii' => array( - 'class' => 'system.gii.GiiModule', - 'password' => 'openeyes', - 'ipFilters' => array('127.0.0.1'), - ), - 'oldadmin', - 'Admin', - 'Api' - ), - // Application components 'components' => array( 'assetManager' => array( @@ -112,7 +100,7 @@ ), 'cacheBuster' => array( 'class' => 'CacheBuster', - 'time' => '202101041029', + 'time' => '202104011657', ), 'clientScript' => array( 'class' => 'ClientScript', @@ -359,6 +347,11 @@ 'specialty_sort' => array(130, 'SUP'), 'hos_num_regex' => !empty(trim(getenv('OE_HOS_NUM_REGEX'))) ? getenv('OE_HOS_NUM_REGEX') : '/^([0-9]{1,9})$/', 'pad_hos_num' => !empty(trim(getenv('OE_HOS_NUM_PAD'))) ? getenv('OE_HOS_NUM_PAD') : '%07s', + 'nhs_num_label' => !empty(trim(getenv('OE_NHS_NUM_LABEL'))) ? getenv('OE_NHS_NUM_LABEL') : null, + 'hos_num_label' => !empty(trim(getenv('OE_HOS_NUM_LABEL'))) ? getenv('OE_HOS_NUM_LABEL') : null, + // Parameter for short labels in patient panel, or anywhere real estate is at a premium + 'nhs_num_label_short' => !empty(trim(getenv('OE_NHS_NUM_LABEL_SHORT'))) ? getenv('OE_NHS_NUM_LABEL_SHORT') : null, + 'hos_num_label_short' => !empty(trim(getenv('OE_HOS_NUM_LABEL_SHORT'))) ? getenv('OE_HOS_NUM_LABEL_SHORT') : null, 'profile_user_can_edit' => true, 'profile_user_show_menu' => true, 'profile_user_can_change_password' => strtolower(getenv("PW_ALLOW_CHANGE")) == "false" ? false : true, @@ -452,6 +445,18 @@ 'position' => 10, 'restricted' => array('TaskViewGp', 'TaskCreateGp'), ), + 'analytics' => array( + 'title' => 'Analytics', + 'uri' => '/Analytics/analyticsReports', + 'position' => 11, + ), + 'patient_import' => array( + 'title' => 'Import Patients', + 'uri' => 'csv/upload?context=patients', + 'position' => 47, + 'requires_setting' => array('setting_key' => 'enable_patient_import', 'required_value' => 'on'), + 'restricted' => array('admin'), + ), /* //TODO: not yet implemented 'worklist' => array( @@ -665,43 +670,41 @@ 'nhs_num_status' => 'hidden' ], // Set the parameter below to true if you want to use practitioner praactice associations feature - 'use_contact_practice_associate_model' => false, + 'use_contact_practice_associate_model' => !empty(trim(getenv('OE_USE_CPA_MODEL'))) ? filter_var(getenv('OE_USE_CPA_MODEL'), FILTER_VALIDATE_BOOLEAN) : false, // Set the parameter below to indicate whether PAS is being used or not 'pas_in_use' => true, // List the visibility of elements in the Patient Panel Popup - Demographics. Setting them as true or false 'demographics_content' => [ - 'mobile' => true, - 'next_of_kin' => true, - 'pas' => true, + 'mobile' => !empty(trim(getenv('OE_DEMOGRAPHICS_MOBILE'))) ? filter_var(getenv('OE_DEMOGRAPHICS_MOBILE'), FILTER_VALIDATE_BOOLEAN) : true, + 'next_of_kin' => !empty(trim(getenv('OE_DEMOGRAPHICS_NOK'))) ? filter_var(getenv('OE_DEMOGRAPHICS_NOK'), FILTER_VALIDATE_BOOLEAN) : true, + 'pas' => !empty(trim(getenv('OE_DEMOGRAPHICS_PAS'))) ? filter_var(getenv('OE_DEMOGRAPHICS_PAS'), FILTER_VALIDATE_BOOLEAN) : true, ], // allow null check is to set whether duplicate checks for patient are to be performed on null RVEEh UR number or any further added patient identifiers 'patient_identifiers' => array( 'RVEEH_UR' => array( - 'code' => 'RVEEH_UR', - 'label' => 'Patient Identifier', - 'unique' => true, - 'allow_null_check' => false, + 'code' => !empty(trim(getenv('OE_PATIENT_IDENTIFIER_CODE'))) ? getenv('OE_PATIENT_IDENTIFIER_CODE') : 'RVEEH_UR', + 'label' => !empty(trim(getenv('OE_PATIENT_IDENTIFIER_LABEL'))) ? getenv('OE_PATIENT_IDENTIFIER_LABEL') : 'Patient Identifier', + 'unique' => !empty(trim(getenv('OE_PATIENT_IDENTIFIER_UNIQUE'))) ? filter_var(getenv('OE_PATIENT_IDENTIFIER_UNIQUE'), FILTER_VALIDATE_BOOLEAN) : true, + 'allow_null_check' => !empty(trim(getenv('OE_PATIENT_IDENTIFIER_ALLOW_NULL'))) ? filter_var(getenv('OE_PATIENT_IDENTIFIER_ALLOW_NULL'), FILTER_VALIDATE_BOOLEAN) : false ) ), 'canViewSummary' => true, - 'default_country' => 'United Kingdom', + 'default_country' => !empty(trim(getenv('OE_DEFAULT_COUNTRY'))) ? getenv('OE_DEFAULT_COUNTRY') : null, 'default_patient_import_context' => 'Historic Data Entry', 'default_patient_import_subspecialty' => 'GL', // Add elements that need to be excluded from the admin sidebar in settings - 'exclude_admin_structure_param_list' => array( - // 'Worklist', - ), - 'oe_version' => '4.0', - // Replace the term "GP" in the UI with whatever is specified in gp_label. E.g, in Australia they are called "Practioners", not "GPs" - 'gp_label' => 'GP', + 'exclude_admin_structure_param_list' => getenv('OE_EXCLUDE_ADMIN_STRUCT_LIST') ? explode(",", getenv('OE_EXCLUDE_ADMIN_STRUCT_LIST')) : array(''), + 'oe_version' => '4.0.3', + 'gp_label' => !empty(trim(getenv('OE_GP_LABEL'))) ? getenv('OE_GP_LABEL') : null, + 'general_practitioner_label' => !empty(trim(getenv('OE_GENERAL_PRAC_LABEL'))) ? getenv('OE_GENERAL_PRAC_LABEL') : null, // number of days in the future to retrieve worklists for the automatic dashboard render (0 by default in v3) 'worklist_dashboard_future_days' => 0, // page size of worklists - recommended to be very large by default, as paging is not generally needed here 'worklist_default_pagination_size' => 1000, //// days of the week to be ignored when determining which worklists to render - Mon, Tue etc 'worklist_dashboard_skip_days' => array('NONE'), - 'tech_support_provider' => !empty(trim(getenv(@'OE_TECH_SUPPORT_PROVIDER'))) ? getenv(@'OE_TECH_SUPPORT_PROVIDER') : 'Apperta Foundation', - 'tech_support_url' => !empty(trim(getenv('OE_TECH_SUPPORT_URL'))) ? getenv('OE_TECH_SUPPORT_URL') : 'http://www.apperta.org', + 'tech_support_provider' => !empty(trim(getenv(@'OE_TECH_SUPPORT_PROVIDER'))) ? htmlspecialchars(getenv(@'OE_TECH_SUPPORT_PROVIDER')) : null, + 'tech_support_url' => !empty(trim(getenv('OE_TECH_SUPPORT_URL'))) ? getenv('OE_TECH_SUPPORT_URL') : null, 'pw_restrictions' => array( 'min_length' => getenv('PW_RES_MIN_LEN') ?: 8, 'min_length_message' => getenv('PW_RES_MIN_LEN_MESS') ? htmlspecialchars(getenv('PW_RES_MIN_LEN_MESS')) : 'Passwords must be at least 8 characters long', @@ -735,20 +738,101 @@ 'softlocked' = user cannot log in even with valid password, but gets annother set of tries in 10 mins 'locked' = user cannot log in even with valid password, Invalid statuses will act as 'locked' */ - 'pw_tries' => null !== getenv('PW_STAT_TRIES') ? getenv('PW_STAT_TRIES') : 10, //number of password tries - 'pw_tries_failed' => null !== getenv('PW_STAT_TRIES_FAILED') ? getenv('PW_STAT_TRIES_FAILED') : 'softlocked', //password status after number of tries exceeded - 'pw_softlock_timeout' => null !== getenv('PW_SOFTLOCK_TIMEOUT') ? getenv('PW_SOFTLOCK_TIMEOUT') : '10 mins', //time before user can try again after softlocking account - 'pw_days_stale' => null !== getenv('PW_STAT_DAYS_STALE') ? getenv('PW_STAT_DAYS_STALE') : '0', //number of days before password stales - e.g. '15 days' - 0 to disable , also supports months, years, hours, mins and seconds - 'pw_days_expire' => null !== getenv('PW_STAT_DAYS_EXPIRE') ? getenv('PW_STAT_DAYS_EXPIRE') : '0', //number of days before password expires - e.g, '30 days' - 0 to disable - 'pw_days_lock' => null !== getenv('PW_STAT_DAYS_LOCK') ? getenv('PW_STAT_DAYS_LOCK') : '0', //number of days before password locks - e.g., '45 days' - 0 to disable - 'pw_admin_pw_change' => null !== getenv('PW_STAT_ADMIN_CHANGE') ? getenv('PW_STAT_ADMIN_CHANGE') : 'stale', //password status after password changed by admin - not recommended to be set to locked + 'pw_tries' => false !== getenv('PW_STAT_TRIES') ? getenv('PW_STAT_TRIES') : 10, //number of password tries + 'pw_tries_failed' => false !== getenv('PW_STAT_TRIES_FAILED') ? getenv('PW_STAT_TRIES_FAILED') : 'softlocked', //password status after number of tries exceeded + 'pw_softlock_timeout' => false !== getenv('PW_SOFTLOCK_TIMEOUT') ? getenv('PW_SOFTLOCK_TIMEOUT') : '10 mins', //time before user can try again after softlocking account + 'pw_days_stale' => false !== getenv('PW_STAT_DAYS_STALE') ? getenv('PW_STAT_DAYS_STALE') : '0', //number of days before password stales - e.g. '15 days' - 0 to disable , also supports months, years, hours, mins and seconds + 'pw_days_expire' => false !== getenv('PW_STAT_DAYS_EXPIRE') ? getenv('PW_STAT_DAYS_EXPIRE') : '0', //number of days before password expires - e.g, '30 days' - 0 to disable + 'pw_days_lock' => false !== getenv('PW_STAT_DAYS_LOCK') ? getenv('PW_STAT_DAYS_LOCK') : '0', //number of days before password locks - e.g., '45 days' - 0 to disable + 'pw_admin_pw_change' => false !== getenv('PW_STAT_ADMIN_CHANGE') ? getenv('PW_STAT_ADMIN_CHANGE') : 'stale', //password status after password changed by admin - not recommended to be set to locked ), 'training_mode_enabled' => getenv('OE_TRAINING_MODE') ? strtolower(getenv('OE_TRAINING_MODE')) : null, 'watermark_short' => getenv('OE_USER_BANNER_SHORT') ?: null, 'watermark' => getenv('OE_USER_BANNER_LONG') ?: null, 'watermark_admin_short' => getenv('OE_ADMIN_BANNER_SHORT') ?: null, - 'watermark_admin' => getenv('OE_ADMIN_BANNER_LONG') ?: null, + 'watermark_admin' => getenv('OE_ADMIN_BANNER_LONG') ?: null, + 'enable_default_support_text' => true ), ); +$modules = array( + // Gii tool + // 'gii' => array( + // 'class' => 'system.gii.GiiModule', + // 'password' => 'openeyes', + // 'ipFilters' => array('127.0.0.1'), + // ), + 'oldadmin', + 'Admin', + 'Api', + 'eyedraw', + 'OphCiExamination' => array('class' => '\OEModule\OphCiExamination\OphCiExaminationModule'), + 'OphCoCorrespondence', + 'OphCiPhasing', + 'OphTrIntravitrealinjection', + 'OphCoTherapyapplication', + 'OphDrPrescription', + 'OphTrConsent', + 'OphTrOperationnote', + 'OphTrOperationbooking', + 'OphTrLaser', + 'PatientTicketing' => array('class' => '\OEModule\PatientTicketing\PatientTicketingModule'), + 'OphInVisualfields', + 'OphInBiometry', + 'OphCoMessaging' => array('class' => '\OEModule\OphCoMessaging\OphCoMessagingModule'), + 'PASAPI' => array('class' => '\OEModule\PASAPI\PASAPIModule'), + 'OphInLabResults', + 'OphCoCvi' => array('class' => '\OEModule\OphCoCvi\OphCoCviModule'), + 'Genetics', + 'OphInDnasample', + 'OphInDnaextraction', + 'OphInGeneticresults', + 'OphCoDocument', + 'OphCiDidNotAttend', + 'OphGeneric', + 'OECaseSearch', + 'OETrial', + 'SSO', + 'OphOuCatprom5', + 'OphTrOperationchecklists', + 'OphDrPGDPSD', +); + + +// deal with any custom modules added for the local deployment - which are set in /config/modules.conf (added via docker) +// Gracefully ignores file if it is missing +$custom_modules = explode(" ", trim(str_replace(["modules=(", ")", "'", "openeyes ", "eyedraw "], "", @file_get_contents("/config/modules.conf")))); +if (!empty($custom_modules)) { + $final_custom_modules = array(); + foreach ($custom_modules as $module) { + if (!empty($module)) { + $mod_split = explode("=", $module); + if (sizeof($mod_split) > 1) { + $final_custom_modules[$mod_split[0]] = array('class' => $mod_split[1]); + } else { + $final_custom_modules[] = (string)$mod_split[0]; + } + } + } + $modules = array_unique(array_merge($modules, $final_custom_modules), SORT_REGULAR); +} + +$config["modules"] = $modules; + +/** + * Setup the local_users parameter. If the environment variable named OE_LOCAL_USERS is set then use it as an override. + * else, default to the standard array + * The OE_LOCAL_USERS environment variable should be a comma separated string + */ +$local_users = !empty(trim(getenv('OE_LOCAL_USERS'))) ? getenv('OE_LOCAL_USERS') : 'admin, api, docman_user, payload_processor'; +$config["params"]["local_users"] = explode(',', $local_users); + +/** + * Setup the special_users parameter. If the environment variable named OE_SPECIAL_USERS is set then use it as an override. + * else, default to the standard array + * The OE_SPECIAL_USERS environment variable should be a comma separated string + */ +$special_users = !empty(trim(getenv('OE_SPECIAL_USERS'))) ? getenv('OE_SPECIAL_USERS') : 'api'; +$config["params"]["special_users"] = explode(',', $special_users); + return $config; diff --git a/protected/views/base/_brand.php b/protected/views/base/_brand.php index 67160f44e5..e57cea9e51 100644 --- a/protected/views/base/_brand.php +++ b/protected/views/base/_brand.php @@ -5,20 +5,22 @@ * * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 * (C) OpenEyes Foundation, 2011-2013 + * (C) Apperta Foundation CIC 2014 - Present * This file is part of OpenEyes. * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. * You should have received a copy of the GNU Affero General Public License along with OpenEyes in a file titled COPYING. If not, see . * - * @link http://www.openeyes.org.uk + * @link http://openeyes.apperta.org * - * @author OpenEyes - * @copyright Copyright (c) 2011-2013, OpenEyes Foundation + * @author OpenEyes + * @copyright Copyright (c) 2024 Apperta Foundation CIC * @license http://www.gnu.org/licenses/agpl-3.0.html The GNU Affero General Public License V3.0 */ + $logoUrl = Yii::app()->assetManager->getPublishedUrl(Yii::getPathOfAlias('application.assets.newblue'), true) . '/svg/oe-logo.svg'; $settings = new SettingMetadata(); -$tech_support_provider = Yii::App()->params['tech_support_provider'] ? htmlspecialchars(Yii::App()->params['tech_support_provider']): htmlspecialchars($settings->getSetting('tech_support_provider')); +$tech_support_provider = Yii::App()->params['tech_support_provider'] ? htmlspecialchars(Yii::App()->params['tech_support_provider']) : htmlspecialchars($settings->getSetting('tech_support_provider')); $tech_support_url = Yii::App()->params['tech_support_url'] ? htmlspecialchars(Yii::App()->params['tech_support_url']) : htmlspecialchars($settings->getSetting('tech_support_url')) ?> -
-

Feedback

-

Send us feedback or suggestions.

-
-

Legal

OpenEyes is released under the AGPL3 license and is free to download and use.

-

OpenEyes is maintained by the Apperta Foundation. find out more at openeyes.org.uk

-

Technical support is provided by .

+

OpenEyes is under the custodianship of the Apperta Foundation. Find out more at openeyes.apperta.org

+

No warranty is provided by any part, implied or otherwise, for use of this software for versions deployed without an Accredited Professional Services Parter.

Support

-

- Need Help?  - params['helpdesk_phone'] || Yii::app()->params['helpdesk_email']) : ?> - params['helpdesk_phone'] ? htmlspecialchars(Yii::app()->params['helpdesk_phone']): null ?> - params['helpdesk_email'] ? htmlspecialchars(Yii::app()->params['helpdesk_email']): null ?> - params['helpdesk_hours'] ? "
(". htmlspecialchars(Yii::app()->params['helpdesk_hours']) . ")" : null ?> - - - -

+ params['enable_default_support_text']){ ?> +

Paid for support and maintenance is available from our Accredited Professional Services Partner network.
A list of available partners can be found at the following link openeyes.apperta.org

+ +

+ params['helpdesk_phone'] || Yii::app()->params['helpdesk_email']) : ?> + params['helpdesk_phone'] ? Yii::app()->params['helpdesk_phone'] : null ?> + params['helpdesk_email'] ? Yii::app()->params['helpdesk_email'] : null ?> + params['helpdesk_hours'] ? "
(" . Yii::app()->params['helpdesk_hours'] . ")" : null ?> + + + +

+

Version: params['oe_version'] ?>

-

© OpenEyes

-

- - Served by - -

+

Copyright© Apperta Foundation CIC

@@ -117,4 +112,4 @@ }); }); - \ No newline at end of file + diff --git a/protected/views/site/login.php b/protected/views/site/login.php index 7e09d039cb..c29dc16124 100644 --- a/protected/views/site/login.php +++ b/protected/views/site/login.php @@ -2,12 +2,13 @@ $this->pageTitle = ((string)SettingMetadata::model()->getSetting('use_short_page_titles') != "on" ? Yii::app()->name . ' - ' : '') . 'Login'; $settings = new SettingMetadata(); $tech_support_provider = Yii::App()->params['tech_support_provider'] ? htmlspecialchars(Yii::App()->params['tech_support_provider']) : htmlspecialchars($settings->getSetting('tech_support_provider')); -$tech_support_url = Yii::App()->params['tech_support_url'] ? htmlspecialchars(Yii::App()->params['tech_support_url']) : htmlspecialchars($settings->getSetting('tech_support_url')) +$tech_support_url = Yii::App()->params['tech_support_url'] ? htmlspecialchars(Yii::App()->params['tech_support_url']) : htmlspecialchars($settings->getSetting('tech_support_url')); ?>