Patient Summary Widgets Sprint

Very fruitful sprint! Thanks @raff, @ssmusoke, @adamg, @tmarzeion and @SolDevelo for making this happen. :tropical_drink:

@ssmusoke if you could organise the remaining reference application 2.6 work and hand it over to such capable hands, we would have the release in the next month. :smile:

2 Likes

I’m trying to reproduce the version currently running on qa-refapp.openmrs.org. Can anyone tell me which branches to checkout for both openmrs-core and the reference app?

Thanks!

For openmrs-core, use this: https://github.com/openmrs/openmrs-core/tree/2.0.x You can get the reference application modules from here: https://ci.openmrs.org/browse/REFAPP-OMODDISTRO-5883/artifact

Thank you!

@raff I would like to be able to add age and location based filtering for the widgets similar to Displaying HTML entry forms based on login session in reference application

I wanted advice on how to get that implemented as I am JS handicapped - this is before I create a JIRA ticket.

I’m not quite sure I understand. Do you want to show/hide widgets based on a login location? Do you mean patient’s age?

@raff exactly - as there are some widgets we need to configure which are applicable to infants not adults, and vice versa. The location is also important as there is some information for an Mother to Child Clinic location which is not applicable in the general OPD or HIV clinic…

Okay. I see @darius implemented that feature for extensions. Do I read it right that the logic for extensions was not implemented in javascript rather it was made a part of an extension config through the require field and handled by appframework? Would it make sense to do the same for an app definition i.e. add the require field?

Actually, @ssmusoke, did you try adding

"require": "sessionLocation.uuid=='6351fcf4-e311-4a19-90f9-35667d99a8af'"

e.g. at line https://github.com/openmrs/openmrs-module-coreapps/blob/master/omod/src/main/resources/apps/dashboardWidgets_app.json#L18 ?

@raff Thank you let me try it and get back to you with feedback - this would be totally awesome!!!

@raff Another question - how can I change the date format for the data displayed - currently it is yyyy-mm-dd which is the MySQL format, but different from what is used across the UI - e.g. leveraging the global property uiframework.formatter.dateFormat

@ssmusoke, it needs to be ticketed. Currently, it’s hardcoded at https://github.com/openmrs/openmrs-module-coreapps/blob/master/omod/src/main/webapp/resources/scripts/fragments/dashboardwidgets/visitbyencountertype/visitbyencountertype.html#L3, but it can be easily extracted into a config of a widget, which could be set to default from uiframework.formatter.dateFormat gp.

@raff done at https://issues.openmrs.org/browse/RA-1343

@raff ping did you ever get a chance to look into this? if you do one I can complete the rest

@raff ping again now that you have successfully released 2.0.5 :smile:

@ssmusoke, it’s on my TODO for Monday.

1 Like

@raff ping in case you were able to get to this :slight_smile:

@ssmusoke, fixed.

1 Like

@raff I would like to get a sense of what it would take to be able to add dashboard widgets to other modules other than coreapps - starting point would be if they are based on the dashboard widgets. I have a workflow that would allow for use of this feature hence providing a testing platform.

Created https://issues.openmrs.org/browse/RA-1359 for this

@raff I have been using the Recent Visits widget and it seems to show encounters that have been voided.

Created https://issues.openmrs.org/browse/RA-1371 (so far I only see encounters but I am not sure about the obs)

@darius I have looked into this feature and it seems to only apply to extensions.

Any ideas of how I can make it work for apps like the widgets like https://github.com/openmrs/openmrs-module-coreapps/blob/master/omod/src/main/resources/apps/dashboardWidgets_app.json

UPDATE: On further investigation, I see that the require attribute is set for Extension class not ExtensionPoints - however the difference is not clear to me