Openemr fix #5255 forms reason code (#5263)
commit9f90c9b84c6235f51cf3ddc35d5e3f2d663b1876
authorStephen Nielson <stephen@nielson.org>
Sat, 30 Apr 2022 22:17:43 +0000 (30 16:17 -0600)
committerGitHub <noreply@github.com>
Sat, 30 Apr 2022 22:17:43 +0000 (30 16:17 -0600)
treef01b1dd7c8aaca768ff3a3932d02ac8cb8f785ac
parent7bf4b48174a4947178b2be35067b3e77fe41ad63
Openemr fix #5255 forms reason code (#5263)

* Fixes #5255 observation forms reason codes

Added support for reason code, reason_status, and reason_description for
the observation form as well as for the vitals_form.

Fixed the observation form to use a datetime selector instead of just a
regular date field.

Implemented a reason code widget script that allows us to implement the
code selector and hide/display of the reason container based upon the
launch button.

Refactored a lot of the javascript i the observation and vitals form
into separate javascript files to simplify debugging and to make it
easier to work with.

Added reason_code, reason_status, and reason_description to the
vital_form_details table.

Added a callback function parameter to the dialog so that you can pass a
callback that doesn't have to exist in the global document window.

* Added error log if header assets are missing.

Made it so if we attempt to include a header asset file that does not
exist in the config.yaml that it writes an error out to the log that the
includes did not match.

* Style fixes

* Added comments to fix style problems

* Bug Fixes, Code Review Changes #5255

Fixed a bug in the dialog where string callbacks were not executing.

Fixed text,attr escaping in multiple files from code reviews.

Added top.restoreSession everywhere we instantiated the code finder dialog.

Added a new smarty function assetVersionNumber that can be used to grab
the version number in the smarty template.

Added comments to the columns for vital_form_details to explain their
purpose.  Added the new columns into the database.sql file for fresh
install.

* Fixing css styles
26 files changed:
config/config.yaml
interface/forms/observation/new.php
interface/forms/observation/observation.js [new file with mode: 0644]
interface/forms/observation/save.php
interface/forms/observation/templates/observation_actions.php [new file with mode: 0644]
interface/forms/observation/templates/observation_reason_row.php [new file with mode: 0644]
interface/forms/vitals/C_FormVitals.class.php
interface/forms/vitals/templates/vitals/general_new.html
interface/forms/vitals/templates/vitals/vitals_actions.tpl [new file with mode: 0644]
interface/forms/vitals/templates/vitals/vitals_notes.tpl
interface/forms/vitals/templates/vitals/vitals_reason_row.tpl [new file with mode: 0644]
interface/forms/vitals/templates/vitals/vitals_temp_method.tpl
interface/forms/vitals/templates/vitals/vitals_textbox.tpl
interface/forms/vitals/templates/vitals/vitals_textbox_conversion.tpl
interface/forms/vitals/vitals.css [new file with mode: 0644]
interface/forms/vitals/vitals.js [moved from interface/forms/vitals/templates/vitals/vitals_javascript_functions.tpl with 63% similarity]
library/dialog.js
library/js/reasonCodeWidget.js [new file with mode: 0644]
library/smarty/plugins/function.assetVersionNumber.php [new file with mode: 0644]
sql/6_1_0-to-7_0_0_upgrade.sql
sql/database.sql
src/Common/Forms/FormVitalDetails.php
src/Common/Forms/FormVitals.php
src/Common/Forms/ReasonStatusCodes.php [new file with mode: 0644]
src/Core/Header.php
src/Services/VitalsService.php