we have a need for current date and time fields in document templates, i’d suggest {date} and {time} - time would be hour:min:sec, but could refine by modifying time to indicate if seconds are needed {time:hr-min)
before I implement this in the file interface/patient_file/download_template.php I wondered if anyone else has already done this, to save me the time (no pun intended!!)
Remember if adding replace tags that not only do you need to add in portal/lib/download_template.php but, portal/patient/templates/OnsiteDocumentListView.tpl.php parser as well.
Please don’t name date or time but something more unique as these are functions in language.
the documentation says that {DOS} is 'date of service' - I hadn't
understood what that would generate, The code
(download_template.php) uses ‘service date’ from the patient’s
encounter record, so I assume this is the date of an encounter.
but meanwhile i've implemented two new fields:
{CurrentTime} current time in hh:mm 24 hour clock format
{CurrentDate} current date in ISO format yyyy-mm-dd
with modifiers as follows
{CurrentDate:global} use the format specified in global settings
locale/date display format
{CurrentDate:mm/dd/yyyy}
{CurrentDate:dd/mm/yyyy}
{CurrentDate:YYYY-mm-dd} - for completeness as it’s one of the
options in ‘display format’, this is the same as the default
the parameters are all case insensitive, any parameter that is not
recognised is ignored to give the default.
I'd like to contribute this to OpenEMR, and my next task is to read
the documentation to see how to do this.
Does all this look good to you?
thanks for your help
ruth
Hi @ruth,
Looks great to me. I’m actually doing considerable mods in portal now. Mainly scaling down Profile demographics, refix exclude in portal layout option and work in Secure Messaging. Ya might take a look.
So if you do a Pull Request, you’ll need to resolve some conflicts in patientdata.js if you had to touch that file as i’ll prob bring my PR in tonight or tomorrow.
Otherwise if you’re first, then i’ll review yours and resolve my conflicts no problem.
Or, you can send me files and i’ll get them in my PR for first v6 patch. Up to you and thanks. Not sure why I didn’t include as a base tag! Laziness would be my guess!
Also soon to come, storing and managing templates by categories and patient thereby alleviating the need to work from default templates and better patient management.
Or something like that!
Oh, and SMS hooks from Dashboard Mail/Secure messaging.