DateDue and DatePrevious columns in recall table

This forum is for programmers who have questions about the source code.
Post Reply
awadh
Posts: 23
Joined: Tue Apr 21, 2020 6:09 pm

DateDue and DatePrevious columns in recall table

Post by awadh » Tue Jul 06, 2021 12:04 am

Hi there,
I find that values in DateDue and DatePrevious in recall table very confusing. And the database schema documentation is not helping me either.

Very often values in DateDue and DatePrevious are '0001-01-01' after running Recall report. If DateDue is calulated bsed on last appointment it should always have valid date as far as I understand.

Is there any documentation that explains the logic on how dates are set in these fields?

Awadh

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: DateDue and DatePrevious columns in recall table

Post by dcrider » Tue Jul 06, 2021 7:53 am

https://www.opendental.com/OpenDentalDo ... xml#recall

DateDue:
It will usually be the same as DateDueCalc unless user has changed it.
DateDueCalc:
It can be blank (0001-01-01) if no appropriate triggers.
Someone from OD will probably have to chime in as to what exactly those triggers are, but based on the above, '0001-01-01' can reasonably be expected as a value in those reports. You could always filter out that date.

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: DateDue and DatePrevious columns in recall table

Post by joes » Tue Jul 06, 2021 9:23 am

DatePrevious is calculated from the most recent ProcDate amongst all trigger procedures with a status of Complete (C), Existing Current Provider (EC), or Existing Other Provider (EO) for the given patient and recall type. It defaults to the minimum date (0001-01-01) if the patient has no trigger procedures in one of those states.

As dcrider mentioned, the DateDue is usually the same as DateDueCalc unless a user has overridden it on the Edit Recall window. DateDuleCalc is the DatePrevious + the RecallInterval, but it will also be set to 0001-01-01 if DatePrevious is 0001-01-01.

The Edit Recall manual page where the Due Date can be set: https://www.opendental.com/manual/recall.html
The Edit Recall Type manual page where Trigger Procedures are set: https://www.opendental.com/manual/recalltypes.html
Joe Sullivan
Open Dental Software
http://www.opendental.com

awadh
Posts: 23
Joined: Tue Apr 21, 2020 6:09 pm

Re: DateDue and DatePrevious columns in recall table

Post by awadh » Thu Jul 08, 2021 6:06 pm

Thank you for the reply Dcridera and Joe, Much appreciated.
All triggers seem to look OK to me. Anyway, i now have a pointer and will keep looking into it closely.

Additional question: When will a patient drop out of the recall list.
If I have sent a text as part of recall to a patient and patient has subsequently made an appointment. I would have thought OD will not show that patient in the recall list anymore. But I can still see that patient in the recall list.


Awadh

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: DateDue and DatePrevious columns in recall table

Post by joes » Thu Jul 15, 2021 9:43 am

Does the appointment have one of the trigger procedures for the recall on it? The patient should be removed from the recall list when a trigger procedure is scheduled.
Joe Sullivan
Open Dental Software
http://www.opendental.com

Post Reply