From 557ec66061a8c3f93e84b6bb7ffe3fe0a068872c Mon Sep 17 00:00:00 2001 From: Jerry Padgett Date: Wed, 9 Oct 2024 13:20:25 -0400 Subject: [PATCH] More Changes and Fixes Modules (#7755) * More Changes and Fixes Modules - add update to log sync for erx changes - rename Weno Provider ID to Weno User ID in Users * tune up demographics styling track sync status * ensure fetchEncounterQuestionnaireForm form is enabled. * fix questionnaire assessment to handle actions from document module ensure clear encounter for save from documents fix edit list feesheet limit of 40 codes on save add save alert to lists edit fix demographics patient documents calling templates directly, activity history and restyle fix portal patient ledger and restyle * add delete per row to portal audit table add password show toggle to portal and core login * validate repsponsible party --- .../questionnaire_assessments.php | 29 +- .../forms/questionnaire_assessments/save.php | 4 + .../library/rc_sms_notification.php | 29 +- .../src/Controller/AppDispatch.php | 8 +- .../src/Controller/RCFaxClient.php | 6 +- .../src/Services/LogDataInsert.php | 37 + .../src/Services/LogImportBuild.php | 25 +- .../src/Services/TransmitProperties.php | 3 + .../templates/weno_fragment.php | 4 +- .../oe-module-weno/templates/weno_users.php | 4 +- .../patient_file/summary/demographics.php | 6 +- interface/super/edit_list.php | 992 +++++++++--------- interface/usergroup/user_admin.php | 2 +- portal/import_template.php | 3 - portal/index.php | 165 +-- portal/lib/doc_lib.php | 41 +- portal/lib/download_template.php | 2 +- .../Controller/AppBasePortalController.php | 2 +- .../Controller/OnsiteDocumentController.php | 8 + .../scripts/app/onsiteactivityviews.js | 84 +- portal/patient/scripts/app/onsitedocuments.js | 114 +- portal/patient/scripts/view.js | 47 +- .../OnsiteActivityViewListView.tpl.php | 32 +- .../templates/OnsiteDocumentListView.tpl.php | 70 +- .../patient/templates/PatientListView.tpl.php | 2 +- portal/report/pat_ledger.php | 705 +++++++------ .../DocumentTemplateService.php | 9 +- src/Services/QuestionnaireService.php | 2 +- templates/login/base.html.twig | 12 + .../login/partials/input/password.html.twig | 7 +- 30 files changed, 1361 insertions(+), 1093 deletions(-) diff --git a/interface/forms/questionnaire_assessments/questionnaire_assessments.php b/interface/forms/questionnaire_assessments/questionnaire_assessments.php index 50dd1d15abe..fcd65fd3b1f 100644 --- a/interface/forms/questionnaire_assessments/questionnaire_assessments.php +++ b/interface/forms/questionnaire_assessments/questionnaire_assessments.php @@ -38,6 +38,11 @@ $questionnaire_form = $_GET['questionnaire_form'] ?? null; $repository_item = $_POST['select_item'] ?? null; +$isModule = ($_REQUEST['formOrigin'] ?? null) == 2; +$isDashboard = ($_REQUEST['formOrigin'] ?? null) == 1; +if ($isModule) { + $questionnaire_form = $_GET['formname'] ?? null; +} if ($isPortal) { $questionnaire_form = $_GET['formname'] ?? null; } @@ -74,10 +79,11 @@ $q_json = ''; $lform = ''; $form_name = ''; + // By name is for new form from repository. if (empty($formid) && !empty($questionnaire_form) && $questionnaire_form != 'New Questionnaire') { // since we are here then user is authorized for a pre-approved questionnaire form. $is_authorized = true; - if ($isPortal) { + if ($isPortal || $isModule) { if (is_numeric($questionnaire_form)) { $q = $service->fetchQuestionnaireById((int)$questionnaire_form); } else { @@ -90,6 +96,9 @@ $lform = $q['lform'] ?: ''; $mode = 'new_form'; $form_name = $q['name'] ?: ''; + if (empty($q_json) && empty($lform)) { + throw (new Exception(xl("Unable to find questionnaire form" . ' ' . $questionnaire_form))); + } } // This is for newly selected questionnaire from repository dropdown. if (!empty($repository_item) && $questionnaire_form == 'New Questionnaire') { @@ -99,7 +108,6 @@ $form_name = $q['name'] ?: ''; $mode = 'new_repository_form'; } - if (!$isPortal) { $do_warning = checkUserSetting('disable_form_disclaimer', '1') === true ? 0 : 1; } @@ -107,7 +115,8 @@ $q_list = $service->getQuestionnaireList(true); } } catch (Exception $e) { - die(xlt("Can not continue with reason.") . '
' . text($e->getMessage())); + $msg = "

" . xlt("Can not continue") . ": " . text($e->getMessage()) . "

"; + die($msg); } /* where to put the LOINC statement , and the statement itself */ $top_note = true; // default to top if not set in configuration @@ -153,9 +162,12 @@ $theme = 'dark'; } -$container = 'container-fluid'; -if (!empty($GLOBALS['questionnaire_display_fullscreen'] ?? 0)) { +if ($isModule || $isDashboard || $isPortal) { + $container = 'container-fluid'; +} elseif (!empty($GLOBALS['questionnaire_display_fullscreen'] ?? 0)) { $container = 'container'; +} else { + $container = 'container-fluid'; } ?> @@ -166,6 +178,11 @@ <?php echo xlt('Questionnaire'); ?> + - -
- - - -