Recall SchedDate columb blank

This forum is for programmers who have questions about the source code.
Post Reply
tomle
Posts: 55
Joined: Sat Sep 12, 2009 11:28 pm

Recall SchedDate columb blank

Post by tomle » Sat Dec 05, 2009 2:23 pm

Hi Jordan,

The query below that retrieves the appointment date is not return any result because the where clause

"WHERE appointment.AptNum=procedurelog.AptNum" is not equal since the procedurelog.AptNum is always 0.


SELECT recall.*,(SELECT MIN(appointment.AptDateTime) FROM appointment,procedurelog,recalltrigger WHERE appointment.AptNum=procedurelog.AptNum
AND appointment.AptDateTime > NOW()
AND procedurelog.CodeNum=recalltrigger.CodeNum
AND recall.PatNum=procedurelog.PatNum
AND recalltrigger.RecallTypeNum=recall.RecallTypeNum
AND (appointment.AptStatus=1
OR appointment.AptStatus=4))
FROM recall
WHERE patnum = 445;

any idea?

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Recall SchedDate columb blank

Post by jordansparks » Sat Dec 05, 2009 2:58 pm

Where is this query coming from? From our website? From our code? From the forum?

Also, why wouldn't the AptNum of the procedure be set? Seems like it would be if the procedure is attached to a future appt.
Jordan Sparks, DMD
http://www.opendental.com

tomle
Posts: 55
Joined: Sat Sep 12, 2009 11:28 pm

Re: Recall SchedDate columb blank

Post by tomle » Sat Dec 05, 2009 3:07 pm

Hi,

It is from the V 6.8.19 source code.

I just followed the code to see why the SchedDate in the Recal panel of the Family module was not showing the date of the next recall when the Hyg booked an appoinment.


>Seems like it would be if the procedure is attached to a future appt.

Ah. Got it.

where would the SchedDate be set then? When I print out the recallList.DateSchedule.ToStrin... it shows the date as 0001/01/01

tomle
Posts: 55
Joined: Sat Sep 12, 2009 11:28 pm

Re: Recall SchedDate columb blank

Post by tomle » Sat Dec 05, 2009 3:14 pm

Hi Jordan,

Ok, I saw the code flow now. So to see the schedule date for next recall, the procedure has to be attached to the appointment?

Thanks.

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Recall SchedDate columb blank

Post by jordansparks » Sat Dec 05, 2009 3:19 pm

Yes, right. That's the only way the program knows if the appointment is a recall appt or some other kind of appt.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply