curl --request POST \
--url https://rxnote.ai/api/v1/visits/{id}/icd-codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"clinician_email": "doctor@clinic.example"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({clinician_email: 'doctor@clinic.example'})
};
fetch('https://rxnote.ai/api/v1/visits/{id}/icd-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://rxnote.ai/api/v1/visits/{id}/icd-codes"
payload = { "clinician_email": "doctor@clinic.example" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "job_4Rt8Vb1Np3Zs7Hc2kQ9xLm",
"kind": "note",
"visit_id": 123,
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": {
"code": "NOTE_FAILED",
"message": "<string>"
},
"note": {
"id": 5521,
"visit_id": 123,
"template": {
"id": 123,
"name": "<string>"
},
"framework": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"text": "<string>"
}
]
}
],
"html": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"icd_codes": {
"code_version": "icd11",
"generated_at": "<string>",
"codes": [
{
"code": "CA02",
"name": "Acute pharyngitis",
"confidence": "high"
}
]
}
}{
"id": "job_4Rt8Vb1Np3Zs7Hc2kQ9xLm",
"kind": "note",
"visit_id": 123,
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": {
"code": "NOTE_FAILED",
"message": "<string>"
},
"note": {
"id": 5521,
"visit_id": 123,
"template": {
"id": 123,
"name": "<string>"
},
"framework": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"text": "<string>"
}
]
}
],
"html": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"icd_codes": {
"code_version": "icd11",
"generated_at": "<string>",
"codes": [
{
"code": "CA02",
"name": "Acute pharyngitis",
"confidence": "high"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}Generate ICD codes
Draws ICD-11 diagnosis codes from the visit’s note. Answers 202 with a job; poll GET /jobs/. The codes also appear on GET /visits/. Scope visits:write.
curl --request POST \
--url https://rxnote.ai/api/v1/visits/{id}/icd-codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"clinician_email": "doctor@clinic.example"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({clinician_email: 'doctor@clinic.example'})
};
fetch('https://rxnote.ai/api/v1/visits/{id}/icd-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://rxnote.ai/api/v1/visits/{id}/icd-codes"
payload = { "clinician_email": "doctor@clinic.example" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "job_4Rt8Vb1Np3Zs7Hc2kQ9xLm",
"kind": "note",
"visit_id": 123,
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": {
"code": "NOTE_FAILED",
"message": "<string>"
},
"note": {
"id": 5521,
"visit_id": 123,
"template": {
"id": 123,
"name": "<string>"
},
"framework": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"text": "<string>"
}
]
}
],
"html": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"icd_codes": {
"code_version": "icd11",
"generated_at": "<string>",
"codes": [
{
"code": "CA02",
"name": "Acute pharyngitis",
"confidence": "high"
}
]
}
}{
"id": "job_4Rt8Vb1Np3Zs7Hc2kQ9xLm",
"kind": "note",
"visit_id": 123,
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": {
"code": "NOTE_FAILED",
"message": "<string>"
},
"note": {
"id": 5521,
"visit_id": 123,
"template": {
"id": 123,
"name": "<string>"
},
"framework": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"text": "<string>"
}
]
}
],
"html": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"icd_codes": {
"code_version": "icd11",
"generated_at": "<string>",
"codes": [
{
"code": "CA02",
"name": "Acute pharyngitis",
"confidence": "high"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"request_id": "req_Q2w9Lx7Hc4Vb8Np1Zs3Kt6"
}
}Authorizations
Your API key, created in RxNote under Settings → API: Authorization: Bearer rxn_live_….
Headers
Your unique id for this request. Retrying with the same key returns the same job.
1 - 255"letter-appt-0001"
Path Parameters
90211
Body
Required with an organization key: the RxNote member acting. With a personal key, omit it or send the owner's own email.
255"doctor@clinic.example"
Response
The job already created with this Idempotency-Key.
Work that runs after the request answers. Poll GET /jobs/{id} until completed or failed.
"job_4Rt8Vb1Np3Zs7Hc2kQ9xLm"
note, icd_codes queued, running, completed, failed Show child attributes
Show child attributes
For a note job, once completed.
Show child attributes
Show child attributes
For an icd_codes job, once completed.
Show child attributes
Show child attributes
