Scheduling a Planned Appointment

For requests or help with our API
Post Reply
rinse-dental
Posts: 73
Joined: Wed Apr 06, 2022 12:04 pm

Scheduling a Planned Appointment

Post by rinse-dental » Sun Jun 12, 2022 9:03 pm

Is scheduling a "Planned" appointment as easy as using APPOINTMENTS PUT to assign an available datetime (via GetSlots) and setting the status to "Scheduled"?

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Scheduling a Planned Appointment

Post by SLeon » Mon Jun 13, 2022 11:07 am

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.

rinse-dental
Posts: 73
Joined: Wed Apr 06, 2022 12:04 pm

Re: Scheduling a Planned Appointment

Post by rinse-dental » Mon Jun 13, 2022 3:01 pm

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!

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Scheduling a Planned Appointment

Post by SLeon » Mon Jun 13, 2022 3:05 pm

We will begin implementation of both of these methods by the end of this week.

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Scheduling a Planned Appointment

Post by SLeon » Fri Jun 17, 2022 9:12 am

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).

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: Scheduling a Planned Appointment

Post by rinse-rey » 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?

justine
Posts: 169
Joined: Tue Dec 28, 2021 7:59 am

Re: Scheduling a Planned Appointment

Post by justine » Thu Oct 13, 2022 1:39 pm

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.

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: Scheduling a Planned Appointment

Post by rinse-rey » Thu Oct 13, 2022 4:28 pm

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?

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Scheduling a Planned Appointment

Post by SLeon » Fri Oct 14, 2022 8:34 am

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.

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: Scheduling a Planned Appointment

Post by rinse-rey » Fri Oct 14, 2022 1:05 pm

All that makes sense. If you could expose the NextAptNum on the API it would be awesome. Thanks so much.

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: Scheduling a Planned Appointment

Post by rinse-rey » Fri Oct 21, 2022 8:28 am

Hi there, is it possible to have an ETA?

DerekR
Posts: 79
Joined: Wed Aug 31, 2022 1:13 pm

Re: Scheduling a Planned Appointment

Post by DerekR » Fri Oct 21, 2022 9:18 am

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.

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Scheduling a Planned Appointment

Post by SLeon » Fri Nov 18, 2022 1:01 pm

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.

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: Scheduling a Planned Appointment

Post by rinse-rey » Thu Dec 22, 2022 1:15 pm

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.
Attachments
Screen Shot 2022-12-22 at 5.14.02 PM.png
Screen Shot 2022-12-22 at 5.14.02 PM.png (189.13 KiB) Viewed 2801 times

DerekR
Posts: 79
Joined: Wed Aug 31, 2022 1:13 pm

Re: Scheduling a Planned Appointment

Post by DerekR » Thu Dec 22, 2022 1:52 pm

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.

Post Reply