16.2 -Bad debt -Adjustment Categorization Query

For users or potential users.
Post Reply
drmkpillai
Posts: 58
Joined: Sun Aug 24, 2014 1:43 am

16.2 -Bad debt -Adjustment Categorization Query

Post by drmkpillai » Thu Jul 14, 2016 12:28 am

Hi all,
Using OD 16.2.30- Great New Feature of being able to categorize Certain Adjustment Types as Bad Debts.
Would like to know, the table structure to generate specific queries,Such Total adjustment in a period that are Bad debts
Thanking all

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: 16.2 -Bad debt -Adjustment Categorization Query

Post by cmcgehee » Thu Jul 14, 2016 6:03 pm

To determine which adjustment types are considered Bad Debt, you would look in the preference table. There will be a row that has a PrefName of BadDebtAdjustmentTypes. The ValueString for that row will be a comma-delimited list of numbers. Each of those values will be a pointer to the DefNum on the definition table. These definitions are your bad debt adjustment types. Here's a simple query that will sum up bad debt adjustments:

Code: Select all

SELECT SUM(adjustment.AdjAmt)
FROM adjustment
INNER JOIN definition ON definition.DefNum=adjustment.AdjType
       AND FIND_IN_SET(definition.DefNum,(SELECT ValueString FROM preference WHERE PrefName='BadDebtAdjustmentTypes'))>0
Happy querying!
Chris McGehee
Open Dental Software
http://www.opendental.com

JoeMontano
Posts: 64
Joined: Thu Aug 20, 2015 11:08 am

Re: 16.2 -Bad debt -Adjustment Categorization Query

Post by JoeMontano » Fri Jul 15, 2016 10:52 am

In addition to Chris, here is a link to our database documentation/structure that we provide on our website.
http://opendental.com/manual/programmingresources.html
Joe Montaño
Software Engineer
Open Dental Software
Joe@OpenDental.com

drmkpillai
Posts: 58
Joined: Sun Aug 24, 2014 1:43 am

Re: 16.2 -Bad debt -Adjustment Categorization Query

Post by drmkpillai » Thu Jul 21, 2016 6:19 pm

Thanks for all your support

Post Reply