Page 1 of 1

Scheduling a Planned Appointment

Posted: Sun Jun 12, 2022 9:03 pm
by rinse-dental
Is scheduling a "Planned" appointment as easy as using APPOINTMENTS PUT to assign an available datetime (via GetSlots) and setting the status to "Scheduled"?

Re: Scheduling a Planned Appointment

Posted: Mon Jun 13, 2022 11:07 am
by SLeon
Using a Planned appointment to make a Scheduled appointment has many moving parts. Appointments PUT (update) does not provide all of the functionality you would need. Open Dental makes a second appointment (Scheduled) and retains the original (Planned) appointment. This relationship is linked via the Appointment.NextAptNum field on the new appointment to the PK of the planned appointment. The associated procedures are also linked/moved between the two.

For these reasons, we will implement a new API method that creates a Scheduled appointment from a previously existing Planned one. Developers will simply need to supply the AptNum of the Planned appointment, and the AptDateTime, ProvNum, and Op returned from Appointments GET Slots. All other linking will be handled automatically. This would be used in conjunction with the ChartModules GET PlannedAppts method I describe in your other forum post.

Re: Scheduling a Planned Appointment

Posted: Mon Jun 13, 2022 3:01 pm
by rinse-dental
Hey, great! Both the GetPlannedApts and an API to schedule a planned appt would be great. Please let me know where you think this falls in your schedule. Much appreciated!

Re: Scheduling a Planned Appointment

Posted: Mon Jun 13, 2022 3:05 pm
by SLeon
We will begin implementation of both of these methods by the end of this week.

Re: Scheduling a Planned Appointment

Posted: Fri Jun 17, 2022 9:12 am
by SLeon
We have just completed a new API method to schedule a Planned appointment: Appointments POST SchedulePlanned.

The recommended workflow for scheduling is as follows:

1. Get the AptNum of the Planned appointment you would like to schedule.
  • This can be done with Appointments GET (single/multiple), ChartModules GET PlannedAppts (in development), or a query.
2. Find a timeslot to schedule the appointment with Appointments GET Slots. Specify the desired date(s), ProvNum, and OpNum in the request.
3. Use Appointments POST SchedulePlanned. Include the AptNum from Step #1 and the AptDateTime, ProvNum, and OpNum from Step #2 in the JSON.
  • A Confirmed status and Note can optionally be set, as well.

This new method will be available in our next beta version, 22.2.14, which is estimated to be released within the next week. See our documentation for details on Appointments POST SchedulePlanned (https://www.opendental.com/site/apiappointments.html).

Re: Scheduling a Planned Appointment

Posted: Thu Oct 13, 2022 1:03 pm
by rinse-rey
How can we relate the Planned Appt with the New Scheduled Appt from the Appt ?

Is there any foreign key we can look at?

Re: Scheduling a Planned Appointment

Posted: Thu Oct 13, 2022 1:39 pm
by justine
rinse-rey wrote:
Thu Oct 13, 2022 1:03 pm
How can we relate the Planned Appt with the New Scheduled Appt from the Appt ?

Is there any foreign key we can look at?
A planned appointment and a scheduled appointment, are two separate appointments. When you schedule a planned appointment using Appointments POST SchedulePlanned, you supply the planned appointment AptNum as one of the required parameters. The response contains the AptNum of the created scheduled appointment. The planned appointment is not modified or deleted.

To relate the planned appointment with the new scheduled appointment, keep track of the two AptNums.

Re: Scheduling a Planned Appointment

Posted: Thu Oct 13, 2022 4:28 pm
by rinse-rey
Last question on this topic.

After creating an appointment from a Planned appt with this procedure description "#2-BU, #3-O-C1(P)", the new appointment has a longer and more human-readable procedure description that is transformed to "Composite-1 Surf, Posterior, Build Up. "

The question is, how do we transform the short form of the procedure description("#2-BU, #3-O-C1(P)") to the longer one("Composite-1 Surf, Posterior, Build Up"). Are there any tables to do some joins?

Re: Scheduling a Planned Appointment

Posted: Fri Oct 14, 2022 8:34 am
by SLeon
Good morning,

To first touch on your question about the relationship between Planned and Scheduled appointments, Justin is correct that both appointments continue to exist as rows in the appointment table and you can discern them by their primary keys (AptNum). I would like to add that Open Dental uses the NextAptNum column in the appointment table to indicate when a Scheduled appointment has been made from a Planned one.

For example, I create a Planned appointment with an AptNum of 91. It will also have a NextAptNum of 0. I then use this Planned appointment to Schedule an appointment. The Scheduled appointment would have an AptNum of 92 and a NextAptNum of 91.

This linkage can be verified via query, as the API does not currently return the NextAptNum field with our Appointments GET methods. However, we are more than happy to add it if you would like.
The question is, how do we transform the short form of the procedure description("#2-BU, #3-O-C1(P)") to the longer one("Composite-1 Surf, Posterior, Build Up"). Are there any tables to do some joins?
This longer, human-readable description of a procedure is stored in LaymanTerm column of the ProcedureCode table. You can join the ProcCodes of the procedures on the appointment to get their LaymanTerm. These strings are concatenated (comma-delimited) in some places of our software, such as the main PatientAccount grid in the Account Module.

We are currently developing a ProcedureCodes GET method and will include the LaymanTerm field in the returned results.

Re: Scheduling a Planned Appointment

Posted: Fri Oct 14, 2022 1:05 pm
by rinse-rey
All that makes sense. If you could expose the NextAptNum on the API it would be awesome. Thanks so much.

Re: Scheduling a Planned Appointment

Posted: Fri Oct 21, 2022 8:28 am
by rinse-rey
Hi there, is it possible to have an ETA?

Re: Scheduling a Planned Appointment

Posted: Fri Oct 21, 2022 9:18 am
by DerekR
We have completed this feature request. Our Appointments GET and Appointments POST methods will now display the NextAptNum for the appointment(s).

These methods will be available starting in our next beta version (22.3.19) which is estimated to be released within the next week. For more information, see https://www.opendental.com/site/apiappointments.html.

Re: Scheduling a Planned Appointment

Posted: Fri Nov 18, 2022 1:01 pm
by SLeon
We have added the Layman's Term field to the new method ProcedureCodes GET, as request above. This is available in beta version 22.3.22 and later.

Re: Scheduling a Planned Appointment

Posted: Thu Dec 22, 2022 1:15 pm
by rinse-rey
Hi there, i have another question about planned appts.

As you can see in the picture, this fake patient has multiple planned appts. The UI allows to reorder the appts. How can we extract the position from the API(or even a query) in this list? I cannot find any column indicating the position on the list.

Re: Scheduling a Planned Appointment

Posted: Thu Dec 22, 2022 1:52 pm
by DerekR
The position of the planned appointments is stored in the ItemOrder column of the PlannedAppt table. At this time the information would need to be retrieved using PUT queries/ShortQuery.

See the documentation for the Queries resources https://www.opendental.com/site/apiqueries.html.