I have a form (VFE) that I need to insert the previous values in every time the patient comes in and also update if any changes are made. It will insert the previous value, but if I change the value it keeps inserting the initial value. The form is using check boxes and edit fields. Please help and thanks in advance.
Probably need to see the form and/or an example.
When adding a field to a VFE form, you can define it as "New Observation (default previous)", which is what I do often to start with the previous data. Note, typically the OBS term will not be stored unless you edit/change it. Or, you can add a button to force "write" the OBS term.
What I did to combat this issue is not pull in the previous values unless the user presses a button to tell it to do so. Aside from that, the observations are "new Obs"
The button being programmed as such
{
if OBSPREV("Chief Cmplnt") "" AND OBSNOW("Chief Cmplnt") == "" AND DURATIONDAYS(LAST_SIGNED_OBS_DATE("Chief Cmplnt"), str(._TODAYSDATE)) <=100
then OBSNOW("Chief Cmplnt",OBSPREV("Chief Cmplnt"))
ELSE ""
ENDIF
}
I added the date to it so that we couldn't pull in anything that is ridiculously old.