Mass replace procedure codes

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
Mifa
Posts: 141
Joined: Wed Nov 21, 2007 6:52 pm
Location: Saint-Bruno, QC, Canada
Contact:

Mass replace procedure codes

Post by Mifa » Tue May 17, 2022 1:38 pm

Hi everyone,

I need to mass replace some procedure codes in future appointments to accommodate a change in the way we build our hygiene appointments. There are several hundreds of such appointments already scheduled. Needless to say that I am not thrilled with the idea of having to manually edit and update them one at a time... I cannot update the existing procedure codes table to reflect our new way of working as it would also be changing those codes in completed appointments.

I'm contemplating the idea of building a query that will identify then update these appointments. For those procedures that need to be changed, it would modify the codenum and procfee columns of their records in the procedurelog table then it would update the procdescript column in the appointment table, so that the schedule looks fine too.

Would that work? Is there something else I need to change, am I missing something?

Thanks.

Mifa

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Mass replace procedure codes

Post by jordansparks » Sat Jan 07, 2023 8:12 pm

You can run queries to get data like that out of the database, but you should never run queries that alter the database. In theory, your approach might work. I'm 75% sure it would work, but I just can't be certain. If you corrupt your database, fixing it could be a big hassle. I think someone can fix manually at the rate of 1 appointment every 30 seconds. For 200 appointments, that's 100 minutes of labor. Seems like a reasonable price to pay. I think it would take a significant amount of time to write and test the queries.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply