This forum is for programmers who have questions about the source code.
-
JLM
- Posts: 128
- Joined: Wed Dec 05, 2012 12:52 pm
Post
by JLM » Wed Sep 08, 2021 2:10 pm
Documents This includes images, PDFs, etc. There are four ways a document can be inserted into Open Dental: 1. Not using any API – Add a file to the patient folder. When the user later load the Imaging Module within Open Dental, any new files found are always recognized and entries are made in the database for them. By default, the new file will be dropped into the first category of images. If you want the new file to go to a specific category, then you can name it with a prefix of "_##_". Example: "_135_". The prefix number should be the DefNum of the category where the document belongs. To determine the DefNum, you will need to look in the database where definition.Category=18 and pick from that list somehow. Files with prefixes are processed to go into the specified category, and the prefix is removed.
I am planning on adding emailed referrals to the images database using the method above.
1) Is the number 18 a hard coded number that will always refer to Images Categories in the Definitions table?
2) If not, I cannot find a table that links the number 18 to Images categories. I assume it is there but where?
James Margarit, DDS
-
JLM
- Posts: 128
- Joined: Wed Dec 05, 2012 12:52 pm
Post
by JLM » Thu Sep 09, 2021 8:45 am
Perfect. Always suspicious of 'magic numbers' in code. Many thanks...
JLM
-
JLM
- Posts: 128
- Joined: Wed Dec 05, 2012 12:52 pm
Post
by JLM » Sun Sep 12, 2021 1:29 pm
I am having issues getting this to work.
The Oral Surgery images entry in the Definition table is Category = 18, Defnum = 357.
The filename in the patient's OpenDentImages folder is "_357_Test.pdf"
Instead of appearing under Oral Surgery in OD Images, it shows up as "_357_Test.pdf" in the default category of Patient Information.
According to the doc quoted earlier, it should go into the oral surgery category and have the _357_ stripped off. It is the only file in the folder.
Am I not interpreting the API documentation correctly?
JLM
-
JLM
- Posts: 128
- Joined: Wed Dec 05, 2012 12:52 pm
Post
by JLM » Sun Sep 12, 2021 1:39 pm
D'oh! Were are still using 19.1.42. (Works fine why upgrade? Especially when the staff rolls their eyes so hard when we upgrade.

)
I'm guessing that this capability showed up later.
JLM
-
jordansparks
- Site Admin
- Posts: 5769
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
-
Contact:
Post
by jordansparks » Mon Sep 13, 2021 6:35 pm
Yeah, that's a pretty old version.