This guide provides step-by-step instructions for API users to add an image to a clinical note template in DrChrono.
The sequence overview is as follows:
- Upload or poll existing image via
/api/documents
-- Obtain the DrChrono partial s3 URL link - Ensure the designated note has the free draw field
- Use the document URL to make a POST or PATCH call to
/api/clinical_note_field_values
for the free draw field ID
Step 1: Upload the Image or PDF File
To add an image to a clinical note, you first need to upload the image or PDF file to the DrChrono Documents Center using the POST /api/documents
endpoint.
[To note, if the image already exists in DrChrono then request a GET call to /api/documents
]
Example POST Request:
curl --location 'https://app.drchrono.com/api/documents' \ --header 'Authorization: Bearer 123456' \ --form 'date="2025-01-01"' \ --form 'description="Image Example"' \ --form 'doctor="319108"' \ --form 'document=@"/Users/mac.book/Desktop/Screenshot 2025-01-23 at 10.05.00 AM.png"' \ --form 'patient="103541179"'
Response:
The API will return a response containing the URL of the uploaded document. Save the document
URL for later use.
Example:
"document": "https://drchrono-uploaded-media-production.s3.amazonaws.com/clinical/2022/04/220960_94df989a-70b5-4a07-ab4d-bb3bb2ccb95f/knee-joints.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Credential=AKIARFDV6UGLPAHLCTWR%2F20250131%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Date=20250131T192438Z&X-Amz-Signature=5a7a4911dfc6c1f7def58dd3400542e1430419ed6fd1f807777f8fabddc3ec4d"
Extract the URL path:
clinical/2022/04/220960_94df989a-70b5-4a07-ab4d-bb3bb2ccb95f/knee-joints.jpg
Step 2: Ensure the Template Has a Free Draw Field
To add an image to a clinical note template, the template must include a Free Draw Field. If the field does not exist, you can create one using the DrChrono webpage form builder.
Locate the Free Draw Field ID:
Use the GET /api/clinical_note_field_types
endpoint to retrieve the ID of the Free Draw Field associated with your clinical note template.
Example Request:
curl --location 'https://app.drchrono.com/api/clinical_note_field_types?clinical_note_template=id' \ --header 'Authorization: Bearer 123456'
Response:
The response will include a list of field types. Identify the Free Draw Field and save its id
.
Step 3: Add the Image to the Clinical Note
Once you have the document URL and the Free Draw Field ID, use the POST /api/clinical_note_field_values OR PATCH
endpoint to add the image to the clinical note. /api/clinical_note_field_values/id
Example Request:
curl --location 'https://app.drchrono.com/api/clinical_note_field_values' \ --header 'Authorization: Bearer 12345' \ --form 'clinical_note_field="122329145"' \ --form 'appointment="322599095"' \ --form 'value="clinical/2022/04/220960_94df989a-70b5-4a07-ab4d-bb3bb2ccb95f/knee-joints.jpg"'
In the clinical note webpage, the image will appear like so: