Question about Appointment table

This forum is for programmers who have questions about the source code.

Question about Appointment table

Postby serenityfamilydental » Thu Dec 06, 2018 12:15 pm

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
serenityfamilydental
 
Posts: 11
Joined: Mon Apr 13, 2015 6:27 pm

Re: Question about Appointment table

Postby jsalmon » Thu Dec 06, 2018 3: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
User avatar
jsalmon
 
Posts: 1428
Joined: Tue Nov 30, 2010 1:33 pm

Re: Question about Appointment table

Postby serenityfamilydental » Mon Dec 10, 2018 7: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
serenityfamilydental
 
Posts: 11
Joined: Mon Apr 13, 2015 6:27 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 6 guests