Good morning,
Because calculating estimates is expensive computationally, Open Dental very intentionally only performs this logic when needed. This is why, as you said, it is described in our manual as a 'feature':
"Estimated patient portion for attached procedures. (patient portion = gross production - estimated insurance write-offs - insurance estimates - discount plan discount). For estimates to calculate correctly you must chart the procedure from the Chart Module then attach them to the appointment. If procedures are added directly to the appointment, you must click into the Treatment Plan Module to update the estimates."
Justine's post on how to compute estimates how they appear in the Appointment Edit window is accurate, and your application can execute this before displaying information to patients in your application. The reason it is called an estimate, however, is because any number of things on the account can happen between the scheduled appointment and the completed appointment, as you noted.
rinse-dental wrote: ↑Tue May 16, 2023 9:11 am
Is it possible to retrieve Open Dental's calculations for the following:
- Estimated patient portion as found in the appointment screen in Open Dental
- Treatment plan cost break down including Insurance portion, Patient portion, writeoff, etc. as found in the Treatment Plan screen
I believe you are referring to the main Procedures grid found in the TP Module. For Active and Inactive treatment plans, you can do what Open Dental does to calculate the row(s) you need:
Code: Select all
Procedure.ProcFee
- Claimproc.InsEstTotalOverride or Claimproc.BaseEst for Primary Insurance
- Claimproc.InsEstTotalOverride or Claimproc.BaseEst for Secondary Insurance
- Claimproc.WriteOffEstOverride or Claimproc.WriteOffEst
- Procedure.Discount
+ Procedure.TaxAmt
=
Patient Portion
For Saved treatment plans, the grid rows are directly from the ProcTP table. You can use ProcTPs GET to obtain them and calculate the patient portion similar to above.