I followed the the help for functions SUBTRACTDATES and ADDDATES and am able to get the calculation to work, but of course it is never just that simple and I am looking at something like the following
SUBTRACTDATES(str(._todaysdate),"0","0","365") > LASTOBSDATE("obsterm")
I put this equation in a visibility field to tell a provider to take action if the lastobsdate("obsterm") was over 365 days ago, or show the results of the observation if it is less than 365 days. What I thought the equation was telling the form to do is "if today's date is greater than 365 days from the lastobsdate then...action" but it is apparently the opposite. Anyone know why, for example, 10/04/2013 minus 365days is greater than 09/04/2013 in Centricity?
Does Centricity still countdown? I thought all this was taken care of before Y2K... I am definitely confused
I would use duration days for this
DURATIONDAYS(LASTOBSDATE("obsterm"),str(._TODAYSDATE)) >365
Thank you for the suggestion. Definitely less confusing and more straight to the point.
Still... what's the deal with my original inquiry? Anyone with insight?
I am pretty sure both of those functions return strings, not dates, so its about the same as saying "apples" > "oranges". The only fields I can think of that are an actual date data type is the document.clinicaldate and ._TODAYSDATE, and to use either in just about any function you need to convert them to strings with str(). I dont know of any function that converts strings to dates but it may exist
I think val() can convert string to date like it does for numbers