Hello Fellow CHUG Members,
I'm new to Centricity EMR 9.8 and Visual Form Editor.
I'm wondering if there is anyone out there who is willing to share how I could have the system pull the appointment date and time. We do not want or need the appointment type just the date and time.
Thank you in advance for any help you may be able share.
Much Appreciation,
Emma Parker
I have the following coding in my banner to learn the next and last appts. It displays the date, although I guess it could be augmented to include times.
{global apls = getfield(APPTS_BY_STATUS("scheduled","FULL"),"\r","")
global apsz = size(apls)
global nxtap = ""
global nextappt = ""
fps = 1
for count = 1, count < apsz, count = count + 1
do
datedelim =match(apls[count],"/")
if datedelim > 0 then
appt_dt = sub(apls[count],datedelim-2,10)
days = DURATIONDAYS(str(._TODAYSDATE),appt_dt)
if val(days) >= 0 then
if fps = 1
then nxtap=appt_dt;fps=0
else "" endif
else "" endif
endif
endfor
nextappt=nxtap
global apptlisting = getfield(APPTS_BY_STATUS("ARRIVED","FULL"),"\r","")
global apptsize = size(apptlisting)
global lastappt2 = ""
for count = 1, count < apptsize, count = count + 1
do
datedelim =match(apptlisting[count],"/")
if datedelim > 0 then
appt_date = sub(apptlisting[count],datedelim-2,10)
days = DURATIONDAYS(str(._TODAYSDATE),appt_date)
if val(days) <=0 then lastappt2 = appt_date else lastappt2 = "" endif
else ""
endif
endfor
}
** banner coding here for most of it, then **
Last Appt: {if lastappt2 = "" then "None" else lastappt2 endif} Next Appt: {if nextappt = "" then "None" else nextappt endif}
I use this function for a quicktext for nursing to add to the end of the visit for their/provider reference.
{fn futureAppt(status,display){
global appt = ""
global apptstring = ""
global apptdate = ""
global apptarray
global appts = getfield(APPTS_BY_STATUS(status,display),"\r","")
for i = 1, i 0 then
apptstring = apptstring + appt
else ""
endif
endfor
if apptstring =="" then "No appointments scheduled." else
return apptstring
endif
}}
{futureAppt("scheduled","FULL")}