I am currently trying to create a letter that will pull all previous appointments by status. We have a practice that needs this for the no shows and patient cancels appointments. I am getting data back, but not all. Example, patient has 3 patient cancels and only one is listing. Any Help would be greatly appreciated. Or if someone has an easier way to print a patients appointment history.....
Are you using
{APPTS_BY_STATUS("canceled")}
as this should list them out for you
You may need to code to find previous/future cancellations. I have the following quicktext to print out the next appointment. I am looking for a "shceduled" appointment today or in the future; sometimes there may be stray appointments that were never arrived.
The variable fps is for the first-pass - So I can grab the first value that meets the selection criteria.
{global apls = getfield(APPTS_BY_STATUS("scheduled","FULL"),"\r","")
global apsz = size(apls)
global nxtap = ""
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+str(HRET);fps=0
else "" endif
else "" endif
endif
endfor
nxtap
}
Yes I am using that, and our canceled is named Patient Cancelled. Just replaced our named one for the canned version. But it is only pulling through 1 result instead of the multiple ones listed within the patient registration. What would be the best way to format it to pull all the Patient Cancelled appointments?
Use this will give you all cancelled appts:
{APPTS_BY_STATUS("canceled")}