Documents POST Upload - Profile Photo
Posted: Mon Jan 29, 2024 5:44 am
API Team
We have found a bug in the below POST method. Scenario > After we POST under the patient profile folder using the below POST documentation the thumbnail of that patient does not get updated/shown until after we open/view the image in open dental by double the actual image.
Documents POST Upload
Version Added: 21.1
Upload the actual file as rawBase64. Specify the extension of the file. Examples could include .pdf, .jpg, .dcm, .doc, etc. rawBase64 goes into the database in document.Note as "_rawBase64_:" followed by the extension and rawBase64. Example: "_rawBase64_:.jpg_errGEreRi3fWWtB+gWWEgg..." The customer never sees this text, but when they later click on the document, the file is created and the note removed.
PatNum: Required.
rawBase64: Required.
extension: Required.
DocCategory: Optional. FK to definition.ItemName, where definition.Category=18. Default is first in DocCategory.
ImgType: Optional. Either Document, Radiograph, Photo, File or Attachment. Default is Document.
Description: Optional.
DateCreated: (Added in version 22.1) Optional. Default is today's date. String in "yyyy-MM-dd HH:mm:ss" format.
ToothNumbers: (Added in version 23.1.35) Optional. A string of numbers separated by commas and/or hyphen separated ranges.
Example Request:
POST /documents/Upload
{
"PatNum": 101,
"rawBase64": "errGEreRi3fWWtB+gWWEgg...",
"extension": ".jpg",
"DocCategory": 47,
"ImgType": "Photo",
"Description": "Extraoral",
"DateCreated": "2022-03-15 14:30:00",
"ToothNumbers": "1-32"
}
Example Response:
201 Created
(no "location" Header or object because we don't yet support GET single documents)
We have found a bug in the below POST method. Scenario > After we POST under the patient profile folder using the below POST documentation the thumbnail of that patient does not get updated/shown until after we open/view the image in open dental by double the actual image.
Documents POST Upload
Version Added: 21.1
Upload the actual file as rawBase64. Specify the extension of the file. Examples could include .pdf, .jpg, .dcm, .doc, etc. rawBase64 goes into the database in document.Note as "_rawBase64_:" followed by the extension and rawBase64. Example: "_rawBase64_:.jpg_errGEreRi3fWWtB+gWWEgg..." The customer never sees this text, but when they later click on the document, the file is created and the note removed.
PatNum: Required.
rawBase64: Required.
extension: Required.
DocCategory: Optional. FK to definition.ItemName, where definition.Category=18. Default is first in DocCategory.
ImgType: Optional. Either Document, Radiograph, Photo, File or Attachment. Default is Document.
Description: Optional.
DateCreated: (Added in version 22.1) Optional. Default is today's date. String in "yyyy-MM-dd HH:mm:ss" format.
ToothNumbers: (Added in version 23.1.35) Optional. A string of numbers separated by commas and/or hyphen separated ranges.
Example Request:
POST /documents/Upload
{
"PatNum": 101,
"rawBase64": "errGEreRi3fWWtB+gWWEgg...",
"extension": ".jpg",
"DocCategory": 47,
"ImgType": "Photo",
"Description": "Extraoral",
"DateCreated": "2022-03-15 14:30:00",
"ToothNumbers": "1-32"
}
Example Response:
201 Created
(no "location" Header or object because we don't yet support GET single documents)