Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openemr fix 5665 vitals being squashed #5668

Conversation

adunsulag
Copy link
Sponsor Member

@adunsulag adunsulag commented Aug 5, 2022

Fixes #5665
Prevent the form from being squashed up and move the historical data into its own section further down in the form. Fix some minor twig issues.

Big overhaul of vitals from changing it from smarty to twig format. Cleaned up a lot of the rendering as well so we can both easily extend the vitals form and handle additional fields. This is prep work to make
the form responsive.

Added some additional extension to twig so we could handle the weird date formats for the vital forms

below added by bradymiller:
Up For Grabs demo (includes the standard demo data) for this PR is at: https://www.open-emr.org/wiki/index.php/Development_Demo#Epsilon_-_Up_For_Grabs_Demo

Big overhaul of vitals from changing it from smarty to twig format.
Cleaned up a lot of the rendering as well so we can both easily extend
the vitals form and handle additional fields.  This is prep work to make
the form responsive.

Added some additional extension to twig so we could handle the wierd
date formats for the vital forms.
Prevent the form from being squashed up and move the historical data
into its own section further down in the form.  Fix some minor twig
issues.
@adunsulag
Copy link
Sponsor Member Author

@stephenwaite I'd love your feedback on this if you want to give it a whirl and see if you think it addresses the problems that Nerik was having.

Forgot to remove the smarty controller class now that we are no longer
using any of the smarty templates.
@sjpadgett
Copy link
Sponsor Member

I wonder how important the historical table view is to clinicians? From my experience with my doctors they seem to always bring up a graph.
Still though, good idea to put a link to history. clever.

@bradymiller
Copy link
Sponsor Member

Up For Grabs demo (includes the standard demo data) for this PR is at: https://www.open-emr.org/wiki/index.php/Development_Demo#Epsilon_-_Up_For_Grabs_Demo

@bradymiller
Copy link
Sponsor Member

@sjpadgett , getting to historical view is very helpful and dependent on specialist. For myself, I usually just care about weight changes over time, which is one of the first things i look at when prepping.

@bradymiller
Copy link
Sponsor Member

bradymiller commented Aug 6, 2022

On testing on the up for grabs demo.

Note the timestamps are messed up for the demo patients and old demo data; this is not a new issue, so can disregard that.

The graphing appears to not be working, for example, should see the bp data graphed here:
image

(can see graphing when click on 'Click here to view and graph all vitals.' in patient summary vitals widget; if have more than 1 data point fro BP then it will show bp; and can click on other rows to see other data graphed )

@adunsulag
Copy link
Sponsor Member Author

@bradymiller Thanks for catching that, I'll work on a fix for the graphing.

@bradymiller
Copy link
Sponsor Member

bradymiller commented Aug 7, 2022

@adunsulag , disregard my report of the broken vitals graphing. It is working the same as prior to your changes. The reason it was not working in my testing is that graph goes blank if vitals are too close together (ie. less than 1 minute), which is the same behavior as prior to this PR (ie. a preexisting bug). I'll do a more detailed code review of this later today will goal of getting this into patch 2 to give it a bit more time for testing (planning to release patch 1 today).

@@ -21,8 +21,10 @@
use OpenEMR\Common\Uuid\UuidRegistry;
use OpenEMR\Services\VitalsService;
use OpenEMR\Services\ListService;
use OpenEMR\Common\Twig\TwigContainer;
use Twig\Environment;
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't see where class in above line is used


class C_FormVitals extends Controller
class C_FormVitals
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2DV

<head>
<title>{{ "Vitals"|xlt }}</title>
{{ setupHeader(["datetime-picker","reason-code-widget"]) }}
<!--Update the version (v flag) to cache bust if you modify this file -->
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can drop above comment

console.error("Failed to find vitalsForm object to initialize javascript vitals form");
}
</script>
<!--Update the version (v flag) to cache bust if you modify this file -->
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can drop above comment

</div>
{% endif %}
<div class="col-sm-12">
<form id="vitalsForm" name="vitals" method="post" action="{{ FORM_ACTION }}/interface/forms/vitals/save.php">
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attr

<td colspan='2' class="text-center pt-2">
{% endif %}
<input type="button" class="btn btn-primary" id="pdfchart" value='{{ "Growth-Chart"|xla }} ({{ "PDF"|xlt }})'>
<input type="button" class="btn btn-primary" id="htmlchart" value='{{ "Growth-Chart"|xla }} ({{ "HTML"|xlt }})'>
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xla for the PDF and HTML above

{% if vitalDetails is not null and option.id == vitalDetails.get_interpretation_option_id() %}
<option selected="selected" value="{{ option.id|attr }}">{{ option.title|xlt }}</option>
{% else %}
<option {% if option.is_default %}selected="selected"{% endif%} value="{{ option.id|attr }}">{{ option.title }}</option>
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xlt option.title

@bradymiller
Copy link
Sponsor Member

review completed :)

@bradymiller bradymiller merged commit 93b996d into openemr:master Sep 11, 2022
bradymiller pushed a commit that referenced this pull request Sep 11, 2022
* Convert Vitals form from smarty to twig

Big overhaul of vitals from changing it from smarty to twig format.
Cleaned up a lot of the rendering as well so we can both easily extend
the vitals form and handle additional fields.  This is prep work to make
the form responsive.

Added some additional extension to twig so we could handle the wierd
date formats for the vital forms.

* Fix styles

* Fixes #5665 vitals form

Prevent the form from being squashed up and move the historical data
into its own section further down in the form.  Fix some minor twig
issues.

* Fix css styles

* Remove SMARTY controller class

Forgot to remove the smarty controller class now that we are no longer
using any of the smarty templates.
@adunsulag adunsulag deleted the openemr-fix-5665-vitals-responsive branch April 5, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Vitals Form To Prevent Inputs From Being Squashed
4 participants