Skip to content

Commit

Permalink
Cleanup lform directory and bug fixes (#6083)
Browse files Browse the repository at this point in the history
* Cleanup lform directory
- Remove un-needed files left over by previous version of LHC-Forms

* - Update project to version 33.1.2
This fixes a rendering bug that errors in a render routine. Was introduced after v33.0.0.
See CHANGELOG

* - fix encounter delete to lookup correct questionnaire form name.

* - patch out append score to answers and re-build. LHC-Form.
Project admin just confirmed they are adding this change to project next release.

* - Quick fix to previous PR where elementIcon var is not in scope for an action set by click handler init.

* - fix missing date_created in ccda module settings for author
change user for authID as string

* - o'yeah the version bump
  • Loading branch information
sjpadgett committed Jan 14, 2023
1 parent 1d23ff6 commit 100f90e
Show file tree
Hide file tree
Showing 29 changed files with 1,512 additions and 11,301 deletions.
1,457 changes: 1,457 additions & 0 deletions interface/forms/questionnaire_assessments/lforms/CHANGELOG.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

2,379 changes: 0 additions & 2,379 deletions interface/forms/questionnaire_assessments/lforms/webcomponent/lhc-forms.es5.js

This file was deleted.

Large diffs are not rendered by default.

3,246 changes: 0 additions & 3,246 deletions interface/forms/questionnaire_assessments/lforms/webcomponent/main-es2015.js

This file was deleted.

This file was deleted.

2,324 changes: 0 additions & 2,324 deletions interface/forms/questionnaire_assessments/lforms/webcomponent/main-es5.js

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 7 additions & 2 deletions interface/patient_file/encounter/delete_form.php
Expand Up @@ -95,8 +95,13 @@

<p>
<?php
$formdir = $_GET["formname"];
$formName = getFormNameByFormdir($formdir);
$formdir = $_GET["formname"] ?? '';
$form_id = $_GET["id"] ?? 0;
if ($formdir == 'questionnaire_assessments') {
$formName = sqlQuery("SELECT form_name FROM forms WHERE id = ? AND deleted = 0", array($form_id));
} else {
$formName = getFormNameByFormdir($formdir);
}
echo xlt('You are about to delete the following form from this encounter') . ': ' . text(xl_form_title($formName["form_name"]));
?>
</p>
Expand Down
8 changes: 8 additions & 0 deletions sql/7_0_0-to-7_0_1_upgrade.sql
Expand Up @@ -278,3 +278,11 @@ UPDATE `registry` SET `category` = 'Orders' WHERE `directory` = 'procedure_order
#IfMissingColumn insurance_data date_end
ALTER TABLE `insurance_data` ADD `date_end` date NULL;
#EndIf

#IfNotColumnType user user VARCHAR(255)
ALTER TABLE `form_questionnaire_assessments` CHANGE `user` `user` VARCHAR(255) NULL DEFAULT NULL;
#EndIf

#IfMissingColumn module_configuration date_created
ALTER TABLE `module_configuration` ADD COLUMN `date_created` DATETIME DEFAULT NULL COMMENT 'Datetime the record was created';
#EndIf
3 changes: 2 additions & 1 deletion sql/database.sql
Expand Up @@ -6923,6 +6923,7 @@ CREATE TABLE `module_configuration` (
`date_added` DATETIME DEFAULT NULL COMMENT 'Datetime the record was initially created',
`updated_by` BIGINT(20) DEFAULT NULL COMMENT 'users.id the user that last modified this record',
`date_modified` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'Datetime the record was last modified',
`date_created` DATETIME DEFAULT NULL COMMENT 'Datetime the record was created',
PRIMARY KEY (`module_config_id`)
) ENGINE=InnoDB;

Expand Down Expand Up @@ -13219,7 +13220,7 @@ CREATE TABLE `form_questionnaire_assessments` (
`date` datetime DEFAULT current_timestamp(),
`response_id` TEXT COMMENT 'The foreign id to the questionnaire_response repository',
`pid` bigint(21) NOT NULL DEFAULT 0,
`user` bigint(21) DEFAULT NULL,
`user` varchar(255) DEFAULT NULL,
`groupname` varchar(255) DEFAULT NULL,
`authorized` tinyint(4) NOT NULL DEFAULT 0,
`activity` tinyint(4) NOT NULL DEFAULT 1,
Expand Down
8 changes: 6 additions & 2 deletions src/OeUI/OemrUI.php
Expand Up @@ -499,6 +499,8 @@ private function headerActionJs($arrAction = array())
$action_top_js = <<<SHWTOP
<script>
$(function () {
let element = document.querySelector('a#show_hide i');
let elementIcon = document.querySelector('a#show_hide i');
$labels
$actionClasses
$('#show_hide').click(function () {
Expand Down Expand Up @@ -541,8 +543,10 @@ private function headerActionJs($arrAction = array())
// Because the hideaway is probably shown by default for a reason like in the billing manager
if (shouldDisplay) {
document.querySelector('.hideaway').classList.remove('d-none');
elementIcon.classList.remove(showActionClass);
elementIcon.classList.add(hideActionClass);
if (document.getElementById(showActionClass) && document.getElementById(hideActionClass)) {
elementIcon.classList.remove(showActionClass);
elementIcon.classList.add(hideActionClass);
}
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -28,7 +28,7 @@
// is a database change in the course of development. It is used
// internally to determine when a database upgrade is needed.
//
$v_database = 484;
$v_database = 485;

// Access control version identifier, this is to be incremented whenever there
// is a access control change in the course of development. It is used
Expand Down

0 comments on commit 100f90e

Please sign in to comment.