We are looking for code to grey fields out if these fields do not need to be completed during an encounter. For example, if the height and weight has been completed in the 6 months, we want the field to be unavailable, however, if it has been past 6 months, we want the field to be available. I am in the intermediate VFE training course right now and I think there is a way to do this, but we haven't reached that point yet.
Thanks in advance
Amanda Koenig
I would think the way to do this would be to layer a data display field over the edit field with a visibility region and the visibility region would check for a signed obs term with a date within the last six months.
David Shower
OU Tulsa School of Community Medicine
Put this in the Visibility Field:
DURATIONDAYS(OBSANY("HEIGHT"),str(._TODAYSDATE)) >= 180
This will work, I use it for protocols etc in the forms.
Hope this helps.
That did help..Thanks. I am hoping you can assist with one more thing. We are using the same coding on a visibility field for BP measurements; however I also want the BP fields to show if the patient has hypertension in their past medical history. I tried the code below but something is not right. Any ideas?
(OBSPREV("BP systolic") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("BP systolic"), STR(._TODAYSDATE))>=90)
OR match(OBSREV("PAST MED HX"), "Hypertension")>0
Typo in 'OBSPREV' in the last part
@ gibsonmi…. Thank you…you are absolutely correct I had a typo!
(OBSPREV("BP systolic") == ""
OR DURATIONDAYS(LAST_SIGNED_OBS_DATE("BP systolic"), STR(._TODAYSDATE))>=90)
OR match(OBSPREV("PAST MED HX"), "Hypertension")>0
Thank you all for your assistance. The form is working perfectly.
You are very welcome!