I have a date field where I am writing to an obs term in a VFE form. What I am wondering is if there is a way I can write this same field to two obs terms?
I am using a date field, updating a New Observation of NBDELIVDATE. The translation by default is listed below. I would also like to have it write to the obs term EDD FINAL.
{CFMT(OBSNOW("NBDELIVDATE"), "", "Delivery Date ", "B", "
")}
Any ideas?
Thanks!
Yes. Create a watcher expression on your form so that every time you update the NBDELIVDATE obs term, the same date will also be populated in the EDD FINAL Obs term. Make sure you precede the statement with an exclamation point "!" Basically it checks to see if there is a value populated in the NBDELIVDATE obs term, and if so, will populate the EDD FINAL obs term with same value.
Here is the code to include in the function area of your form:
//Watcher expression executes when form loads and when OBS term is updated
{
!if (OBSNOW("NBDELIVDATE")<> "") then OBSNOW("EDD FINAL", OBSNOW("NBDELIVDATE"))
}
Thank you - I will try that. I have never used a watcher function before so this could be interesting.
See the additional note about including a preceding exclamation point (that's what makes it a watcher expression). The expression should run every time you load the form and when you update the original OBS term.
Somewhat unrelated to the original question (which I believe is already answered appropriately), I am wondering a bit about the reason for wanting to populate the "EDD FINAL" observation in this way.
Generally I believe the "EDD FINAL" is the final "estimated" due date based on multiple estimates (e.g. LMP and US) which might give different individual estimates. Usually this is determined during the pregnancy and may be adjusted if another more accurate estimate becomes available. This is different from the actual delivery date. Once a patient has delivered it seems strange to want to update the "estimate" with the date that the delivery actually occurred. You aren't really estimating any more...