Date Macro Query

Hi,

We would like to insert dates into some macros that are relative to another date...

That is... we would like a macro that reads something like...

"Please take Fluffy back to your regular vet on Monday 14th September to have her stitches removed"

where

"Monday 14th September" is generated by taking the visit date and adding 10 days....

We have other variations of this where we would like to take a date and add 3 days or 6 weeks etc.

Is this possible and if so, can someone provide guidance as to how I could achieve this.

Thanks,

Adrian

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Date Macro Query

Adrian - do you want this in a macro (to use in emails) or do you want to build a patient letter?

If the latter, you could use OO Writer's Date field with an offset - see below. Regards, Tim G

Re: Date Macro Query

Hi Tim,

We would prefer to use this in a macro... Why? Because we are trying to encourage staff to write discharge statements and the such in notes and then copy and paste into the discharge letter.

This means we can make alterations prior to a letter being generated. At the moment if we generate a letter and want to make changes it is a giant pain and the updated letter is rarely uploaded back into the medical history.

It also means we are not limited by the auto-time out feature when writing a letter (no apply button in this screen to keep the session alive). It also means the discharge statements are in the history that is emailed to the regular vet without having to include other attachments.

Is it possible in a macro?

Thanks,

Adrian

Re: Date Macro Query

This isn't supported. It would need a function like:

date:add(date, interval, units)

E.g.:

date:add($visit.startTime, 1, 'year')

date:add($visit.startTime, 2, 'weeks')

date:add($visit.startTime, 10, 'days')

 

Alternatively, the function could support the relative date format E.g.

date:add($visit.startTime, '1y')

date:add($visit.startTime, '2w')

date:add($visit.startTime, '10d')

I'm not sure what you mean by:

"we are not limited by the auto-time out feature when writing a letter (no apply button in this screen to keep the session alive)"

Also note that there is a project to edit documents such as letters via OpenOffice and have them saved in the patient history. More details here.

Re: Date Macro Query

Hi

- Macro Date Function - Can this please be costed.

- The auto-time out. The auto-log off feature we requested and paid for logs a user out after a period of inactivity. This is great as it for the most part ensures the user logged in is the actual user and so billing, logs, and the such are attributed to the correct person. However when putting an input field into a letter (see screenshot) there is no way to "save". So if you walk away from inputting something for 30 min (our current log out time) you loose everything you have written. 

- I am aware of the document editing project. We have put we feel a fair amount of money into OVPMS and at the moment we can't commit to this one. Putting it simply we would like to see others step up and fund this project.

Re: Date Macro Query

The date function is trivial, and not worth setting up a project. Raised as https://openvpms.atlassian.net/browse/OVPMS-1661

Whilst not ideal, if you press enter in an input field, it will synchronise with the server and keep the session alive.

Re: Date Macro Query

Hi,

That is appreciated. Thanks,

Adrian

Syndicate content