I was wondering if you could give your thoughts about improving ObsAcrossEncounter widgets in order to be possible to control the datetime format for date column (widget default) and also have the possibility to display the ecnounter provider name.
Maybe the widget app configuration could have something like:
While I like to have the ability to specify the datetime format, I also think that there should be a way to say that we want either date only or date + time while inheriting UIFR’s global format for datetimes (here or here).
Thanks for your insights. Just a few questions so that I can open an improvement that covers your topics:
1. Have a default config for dateTimeFormat across all the widgets
There are some widgets that have already this option (dateFormat) : Programs List, Program Status, Programs History. So here there is no need to change anything.
About other widgets we can add dateFormat or dateTimeFormat.
I think we should add dateFormat to next widgets:
ObsGraph
RecentVisitByEncounterType
And dateTimeFormat for:
Obs Across Encounters
Bahmni Appointments Widget
Next widgets don’t seem to have dates or use different time measure (eg. Today 11:15), so no actions are needed:
The Latest Obs for Concept List will have a date format to display the value of the Obs which has a date value, it is similar to the Obs Across Encounter widget
I am not sure about the Dispensed Medication widget maybe @mogoodrich may be of help there.
What is the determination between dateFormat and dateTimeFormat?
@ssmusoke are you sure about latest obs for concept list? Because I only see next format for each concept date:
Unless you are talking about date format of date concepts:
dateFormat should be used when we want the config to have ‘DD-MM-YYYY’ or ‘DD.MMM.YYYY’ and dateTimeFormat when the config should have ‘DD-MM-YYYY HH:mm:ss’ or ‘DD.MMM.YYYY HH:mm’.
If we use dateTimeFormat conotation on obsgraph widget config, for instance, it may lead the user into error. In other words, the user can use ‘DD-MM-YYYY HH:mm:ss’ in the configuration and we will have a datetime format in the graphics, which doesn’t seem to make much sense to me.
@ifernandes I was thinking of the concept date, and seems like everything is probably for dateFormat - we can start with that and see how else others use the widgets