curl --request PATCH \
--url https://{your-prod-endpoint}/v1/clinical-notes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-doctor: <x-doctor>' \
--data '
{
"template": "SOAP",
"ai_generated_content": {
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
},
"feedback": "Well structured note",
"report_thread_id": "thread_xyz789",
"report_run_id": [
"run_001",
"run_002"
]
}
'import requests
url = "https://{your-prod-endpoint}/v1/clinical-notes/{id}"
payload = {
"template": "SOAP",
"ai_generated_content": {
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
},
"feedback": "Well structured note",
"report_thread_id": "thread_xyz789",
"report_run_id": ["run_001", "run_002"]
}
headers = {
"x-doctor": "<x-doctor>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-doctor': '<x-doctor>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template: 'SOAP',
ai_generated_content: {
subjective: 'Patient reports chest pain radiating to left arm',
objective: 'BP 140/90, HR 88, RR 18, O2 sat 98% on RA',
assessment: 'R/O myocardial infarction',
plan: 'Admit to CCU, serial troponins, cardiology consult'
},
feedback: 'Well structured note',
report_thread_id: 'thread_xyz789',
report_run_id: ['run_001', 'run_002']
})
};
fetch('https://{your-prod-endpoint}/v1/clinical-notes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{your-prod-endpoint}/v1/clinical-notes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'template' => 'SOAP',
'ai_generated_content' => [
'subjective' => 'Patient reports chest pain radiating to left arm',
'objective' => 'BP 140/90, HR 88, RR 18, O2 sat 98% on RA',
'assessment' => 'R/O myocardial infarction',
'plan' => 'Admit to CCU, serial troponins, cardiology consult'
],
'feedback' => 'Well structured note',
'report_thread_id' => 'thread_xyz789',
'report_run_id' => [
'run_001',
'run_002'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-doctor: <x-doctor>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{your-prod-endpoint}/v1/clinical-notes/{id}"
payload := strings.NewReader("{\n \"template\": \"SOAP\",\n \"ai_generated_content\": {\n \"subjective\": \"Patient reports chest pain radiating to left arm\",\n \"objective\": \"BP 140/90, HR 88, RR 18, O2 sat 98% on RA\",\n \"assessment\": \"R/O myocardial infarction\",\n \"plan\": \"Admit to CCU, serial troponins, cardiology consult\"\n },\n \"feedback\": \"Well structured note\",\n \"report_thread_id\": \"thread_xyz789\",\n \"report_run_id\": [\n \"run_001\",\n \"run_002\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-doctor", "<x-doctor>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{your-prod-endpoint}/v1/clinical-notes/{id}")
.header("x-doctor", "<x-doctor>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template\": \"SOAP\",\n \"ai_generated_content\": {\n \"subjective\": \"Patient reports chest pain radiating to left arm\",\n \"objective\": \"BP 140/90, HR 88, RR 18, O2 sat 98% on RA\",\n \"assessment\": \"R/O myocardial infarction\",\n \"plan\": \"Admit to CCU, serial troponins, cardiology consult\"\n },\n \"feedback\": \"Well structured note\",\n \"report_thread_id\": \"thread_xyz789\",\n \"report_run_id\": [\n \"run_001\",\n \"run_002\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/v1/clinical-notes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-doctor"] = '<x-doctor>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template\": \"SOAP\",\n \"ai_generated_content\": {\n \"subjective\": \"Patient reports chest pain radiating to left arm\",\n \"objective\": \"BP 140/90, HR 88, RR 18, O2 sat 98% on RA\",\n \"assessment\": \"R/O myocardial infarction\",\n \"plan\": \"Admit to CCU, serial troponins, cardiology consult\"\n },\n \"feedback\": \"Well structured note\",\n \"report_thread_id\": \"thread_xyz789\",\n \"report_run_id\": [\n \"run_001\",\n \"run_002\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "note_def456ghi",
"user_id": "usr_123456789",
"group_id": "grp_987654321",
"transcription_id": "trans_abc123xyz",
"template": "SOAP",
"ai_generated_content": {
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
},
"feedback": "Well structured note",
"report_thread_id": "thread_xyz789",
"report_run_id": [
"run_001",
"run_002"
],
"created_at": "2023-10-09T10:00:00.000Z",
"updated_at": "2023-10-09T10:05:00.000Z"
}{
"success": false,
"error": "Bad Request",
"details": "Either medical_note or pdf_file must be provided"
}{
"success": false,
"error": "Bad Request",
"details": "Either medical_note or pdf_file must be provided"
}{
"success": false,
"error": "Not Found",
"details": "Clinical note with id 'note_def456ghi' not found"
}Update clinical note
Updates an existing clinical note with AI-generated content, feedback, or metadata. Used to store AI-generated clinical documentation, link to conversation threads, and capture user feedback for quality improvement.
curl --request PATCH \
--url https://{your-prod-endpoint}/v1/clinical-notes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-doctor: <x-doctor>' \
--data '
{
"template": "SOAP",
"ai_generated_content": {
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
},
"feedback": "Well structured note",
"report_thread_id": "thread_xyz789",
"report_run_id": [
"run_001",
"run_002"
]
}
'import requests
url = "https://{your-prod-endpoint}/v1/clinical-notes/{id}"
payload = {
"template": "SOAP",
"ai_generated_content": {
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
},
"feedback": "Well structured note",
"report_thread_id": "thread_xyz789",
"report_run_id": ["run_001", "run_002"]
}
headers = {
"x-doctor": "<x-doctor>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-doctor': '<x-doctor>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
template: 'SOAP',
ai_generated_content: {
subjective: 'Patient reports chest pain radiating to left arm',
objective: 'BP 140/90, HR 88, RR 18, O2 sat 98% on RA',
assessment: 'R/O myocardial infarction',
plan: 'Admit to CCU, serial troponins, cardiology consult'
},
feedback: 'Well structured note',
report_thread_id: 'thread_xyz789',
report_run_id: ['run_001', 'run_002']
})
};
fetch('https://{your-prod-endpoint}/v1/clinical-notes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{your-prod-endpoint}/v1/clinical-notes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'template' => 'SOAP',
'ai_generated_content' => [
'subjective' => 'Patient reports chest pain radiating to left arm',
'objective' => 'BP 140/90, HR 88, RR 18, O2 sat 98% on RA',
'assessment' => 'R/O myocardial infarction',
'plan' => 'Admit to CCU, serial troponins, cardiology consult'
],
'feedback' => 'Well structured note',
'report_thread_id' => 'thread_xyz789',
'report_run_id' => [
'run_001',
'run_002'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-doctor: <x-doctor>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{your-prod-endpoint}/v1/clinical-notes/{id}"
payload := strings.NewReader("{\n \"template\": \"SOAP\",\n \"ai_generated_content\": {\n \"subjective\": \"Patient reports chest pain radiating to left arm\",\n \"objective\": \"BP 140/90, HR 88, RR 18, O2 sat 98% on RA\",\n \"assessment\": \"R/O myocardial infarction\",\n \"plan\": \"Admit to CCU, serial troponins, cardiology consult\"\n },\n \"feedback\": \"Well structured note\",\n \"report_thread_id\": \"thread_xyz789\",\n \"report_run_id\": [\n \"run_001\",\n \"run_002\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-doctor", "<x-doctor>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{your-prod-endpoint}/v1/clinical-notes/{id}")
.header("x-doctor", "<x-doctor>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template\": \"SOAP\",\n \"ai_generated_content\": {\n \"subjective\": \"Patient reports chest pain radiating to left arm\",\n \"objective\": \"BP 140/90, HR 88, RR 18, O2 sat 98% on RA\",\n \"assessment\": \"R/O myocardial infarction\",\n \"plan\": \"Admit to CCU, serial troponins, cardiology consult\"\n },\n \"feedback\": \"Well structured note\",\n \"report_thread_id\": \"thread_xyz789\",\n \"report_run_id\": [\n \"run_001\",\n \"run_002\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/v1/clinical-notes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-doctor"] = '<x-doctor>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template\": \"SOAP\",\n \"ai_generated_content\": {\n \"subjective\": \"Patient reports chest pain radiating to left arm\",\n \"objective\": \"BP 140/90, HR 88, RR 18, O2 sat 98% on RA\",\n \"assessment\": \"R/O myocardial infarction\",\n \"plan\": \"Admit to CCU, serial troponins, cardiology consult\"\n },\n \"feedback\": \"Well structured note\",\n \"report_thread_id\": \"thread_xyz789\",\n \"report_run_id\": [\n \"run_001\",\n \"run_002\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "note_def456ghi",
"user_id": "usr_123456789",
"group_id": "grp_987654321",
"transcription_id": "trans_abc123xyz",
"template": "SOAP",
"ai_generated_content": {
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
},
"feedback": "Well structured note",
"report_thread_id": "thread_xyz789",
"report_run_id": [
"run_001",
"run_002"
],
"created_at": "2023-10-09T10:00:00.000Z",
"updated_at": "2023-10-09T10:05:00.000Z"
}{
"success": false,
"error": "Bad Request",
"details": "Either medical_note or pdf_file must be provided"
}{
"success": false,
"error": "Bad Request",
"details": "Either medical_note or pdf_file must be provided"
}{
"success": false,
"error": "Not Found",
"details": "Clinical note with id 'note_def456ghi' not found"
}Autorizaciones
Bearer token for API authentication
Encabezados
Doctor identifier for tracking and auditing
Patient identifier for tracking and auditing
Parámetros de ruta
The clinical note UUID
Cuerpo
Clinical note format template (e.g., SOAP, BIRP, DAP, GIRP)
"SOAP"
Structured clinical data generated by AI (schema varies by template)
{
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
}
User comments or feedback on the clinical note
"Well structured note"
Thread ID that generated this content
"thread_xyz789"
Array of run IDs involved in generating this content
["run_001", "run_002"]
Respuesta
Clinical note updated successfully
Clinical note unique identifier
"note_def456ghi"
User identifier
"usr_123456789"
Group/organization identifier
"grp_987654321"
Timestamp when note was created
"2023-10-09T10:00:00.000Z"
Timestamp when note was last updated
"2023-10-09T10:05:00.000Z"
Associated transcription identifier
"trans_abc123xyz"
Clinical note format template
"SOAP"
Structured clinical data
{
"subjective": "Patient reports chest pain radiating to left arm",
"objective": "BP 140/90, HR 88, RR 18, O2 sat 98% on RA",
"assessment": "R/O myocardial infarction",
"plan": "Admit to CCU, serial troponins, cardiology consult"
}
User feedback
"Well structured note"
Associated thread ID
"thread_xyz789"
Associated run IDs
["run_001", "run_002"]