Document Category clarification
-
- Posts: 11
- Joined: Mon Jan 31, 2022 8:51 am
Document Category clarification
We are working with the Document API and had some questions we couldn't find answers.
1) What is the correct way (SQL command?) to get the DocCategory ID numbers.
2) Are Category ID's the same for all Open Dental accounts? -- if we use the "Patient Information" category ID will that number be the same for every instance of Open Dental?
3) Do the Category ID's ever change?
We want to make sure that if we define what category a document is placed into that will not change or get messed up along the way for an account.
1) What is the correct way (SQL command?) to get the DocCategory ID numbers.
2) Are Category ID's the same for all Open Dental accounts? -- if we use the "Patient Information" category ID will that number be the same for every instance of Open Dental?
3) Do the Category ID's ever change?
We want to make sure that if we define what category a document is placed into that will not change or get messed up along the way for an account.
Re: Document Category clarification
The DocCategory field for Documents can be any definition.DefNum where the definition.Category=18. This Definition category will always be 18 and will never change, however the dental office has control over the definitions in that category. They can add new ones as they see fit, and hide (not delete) existing ones, although this is uncommon.
1. There are two ways to get the definitions in this category.
3. Because these definitions cannot be deleted, the definition.DefNum associated with defintion.ItemName="Patient Information" will always be the same for that dental office.
These links may provide additional information:
https://www.opendental.com/OpenDentalDo ... definition
https://www.opendental.com/site/apidefinitions.html
https://opendental.com/manual/definitionsimagecat.html
1. There are two ways to get the definitions in this category.
- By using Definitions GET and include the category in the url: /definitions?Category=18. This excludes hidden definitions.
- By using Queries PUT ShortQuery, with "SqlCommand": "SELECT * FROM Definition WHERE Category=18"
3. Because these definitions cannot be deleted, the definition.DefNum associated with defintion.ItemName="Patient Information" will always be the same for that dental office.
These links may provide additional information:
https://www.opendental.com/OpenDentalDo ... definition
https://www.opendental.com/site/apidefinitions.html
https://opendental.com/manual/definitionsimagecat.html
-
- Posts: 11
- Joined: Mon Jan 31, 2022 8:51 am
Re: Document Category clarification
Thank you!
Has anyone experienced two document items being created when importing? We tried both methods below - and both created one listing with the date and description - but when you click on it, it creates a second listing that is the actual file. How do we keep it one listing?
Documents POST Upload
Documents POST SetByUrl
You will see in the screen shot the two listing for each file the First listing is date and description - when you double click, the file is created in the folder and it creates a second item that is actually the file -- but with no description and the first item listing is still there.
screenshot: https://prnt.sc/AE7J7Sdi8Rhw
Has anyone experienced two document items being created when importing? We tried both methods below - and both created one listing with the date and description - but when you click on it, it creates a second listing that is the actual file. How do we keep it one listing?
Documents POST Upload
Documents POST SetByUrl
You will see in the screen shot the two listing for each file the First listing is date and description - when you double click, the file is created in the folder and it creates a second item that is actually the file -- but with no description and the first item listing is still there.
screenshot: https://prnt.sc/AE7J7Sdi8Rhw
Re: Document Category clarification
This issue was originally reported here https://www.opendentalsoft.com:8085/for ... 580#p34116 and a fix has been implemented. Updating to 21.4.22 should resolve this issue.
-
- Posts: 11
- Joined: Mon Jan 31, 2022 8:51 am
Re: Document Category clarification
Thanks! I missed that thread when looking.
I've searched for anything on here about a size limit for placing documents/images/etc -- it looks like it starts erroring out at about 3MB but we can't find anything that officially gives a file size limit for what can be placed using the API.
Can you confirm the limit size and whether it is the same for all supported file types?
I've searched for anything on here about a size limit for placing documents/images/etc -- it looks like it starts erroring out at about 3MB but we can't find anything that officially gives a file size limit for what can be placed using the API.
Can you confirm the limit size and whether it is the same for all supported file types?
-
- Posts: 11
- Joined: Mon Jan 31, 2022 8:51 am
Re: Document Category clarification
Any answer about this?
I've searched for anything on here about a size limit for placing documents/images/etc -- it looks like it starts erroring out at about 3MB but we can't find anything that officially gives a file size limit for what can be placed using the API.
Can you confirm the limit size and whether it is the same for all supported file types?
Re: Document Category clarification
Open Dental does not have a size limit for documents or images in the Image module. The only limitation you may encounter is if you are using the Documents POST Upload method, which takes a very large Base64 string. This string is stored the document.Note field, which is limited to 16 million characters. Any characters exceeding this length will be truncated.
Documents POST DownloadSftp is another way to transfer files with the API, and does not run into a size issue. I just used method this with a 12mb file without issue.
Documents POST DownloadSftp is another way to transfer files with the API, and does not run into a size issue. I just used method this with a 12mb file without issue.
-
- Posts: 11
- Joined: Mon Jan 31, 2022 8:51 am
Re: Document Category clarification
Hm - when we test the limit is 3 million not 16 million
Re: Document Category clarification
I have confirmed there is an issue with transferring files greater than 3MB when using the Documents POST Upload method. We will investigate this immediately. In the meantime, Documents POST UploadSftp was added in 21.2 and easily handles larger files.
-
- Posts: 11
- Joined: Mon Jan 31, 2022 8:51 am
Re: Document Category clarification
Ok cool thanks for looking into this. We prefer to stick with the POST Upload method because moving to sftp would require that we change how we deal with attached files.
We are finding that when moving files using POST Upload method the Date Created changes when you actually open the file. Currently - if you move a document in using POST Upload and then click on that document days later the Date Created date changes to today's date - we assume this is because the document is not created into the images folder until you actually click on it in OD. This will be a problem for files that are uploaded in but not opened or referenced until weeks or months later.
I see in another thread that you made it possible to send a Date Created usingthe sftp Upload method. Is it possible for Date Created to be added for the regular POST Upload method?
We are finding that when moving files using POST Upload method the Date Created changes when you actually open the file. Currently - if you move a document in using POST Upload and then click on that document days later the Date Created date changes to today's date - we assume this is because the document is not created into the images folder until you actually click on it in OD. This will be a problem for files that are uploaded in but not opened or referenced until weeks or months later.
I see in another thread that you made it possible to send a Date Created usingthe sftp Upload method. Is it possible for Date Created to be added for the regular POST Upload method?
Re: Document Category clarification
We can absolutely add DateCreated to the Document POST Upload method. I have added it to our list and should be able start development rather shortly.
Re: Document Category clarification
darcockerell,darcockerell wrote: ↑Thu Mar 24, 2022 9:11 amHm - when we test the limit is 3 million not 16 million
Documents POST Upload can now handle request lengths up to 16.8 million characters. This increased request length is available for use now.
A return message stating you have exceeded this limit has been implemented and will be available in 22.1.19.
Re: Document Category clarification
DateCreated has been added as an optional field in Documents POST Upload. This will be available in version 22.1.21. For more information, see https://www.opendental.com/site/apidocuments.html.darcockerell wrote: ↑Tue Mar 29, 2022 9:09 amI see in another thread that you made it possible to send a Date Created usingthe sftp Upload method. Is it possible for Date Created to be added for the regular POST Upload method?