Question about Appointment table

This forum is for programmers who have questions about the source code.
Post Reply
serenityfamilydental
Posts: 14
Joined: Mon Apr 13, 2015 6:27 pm

Question about Appointment table

Post by serenityfamilydental » Thu Dec 06, 2018 11:15 am

Hi, if an appointment is changed, e.g. scheduled time changed, AptNum should still be the same, right?
If I need to cancel an appointment, then simply delete the row with AptNum=XXX, right?

I would like expert to confirm. Thanks, Sean

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Question about Appointment table

Post by jsalmon » Thu Dec 06, 2018 2:43 pm

serenityfamilydental wrote:Hi, if an appointment is changed, e.g. scheduled time changed, AptNum should still be the same, right?
Correct, the AptNum will stay the same in this and most other scenarios when editing the appointment.
serenityfamilydental wrote:If I need to cancel an appointment, then simply delete the row with AptNum=XXX, right?
No. When deleting an appointment you should clean up the other entities that have a link back to the appointment you are deleting (e.g. procedures, apptfields, etc). I highly recommend invoking our Appointments.Delete() instead of doing it yourself when trying to delete appointments.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

serenityfamilydental
Posts: 14
Joined: Mon Apr 13, 2015 6:27 pm

Re: Question about Appointment table

Post by serenityfamilydental » Mon Dec 10, 2018 6:48 am

Thanks a lot for your reply. Please point me to the syntax of Appointments.Delete().

If I cannot deleted simply, I should be able to mark it Broken just by UPDATE appointmentSET AptStatus = 5 WHERE AptNum=XXX, right?

If I want to mark appointment as confirmed or texted, can I simply do UPDATE appointment SET Confirmed = 21 WHERE AptNum= xxx (confirmed)
UPDATE appointment SET Confirmed = 256 WHERE AptNum=XXX (texted)

I would like to know there is no complication If I do that. Appreciate your help.

Thanks,

Sean

Post Reply