curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/allergies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"no_known_allergies": true,
"category": [],
"type": "allergy",
"clinical_status": "active",
"reactions": [
{
"manifestation": [
"<string>"
],
"description": "<string>"
}
],
"onset_date": "2023-12-25",
"note": "<string>",
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
no_known_allergies: true,
category: [],
type: 'allergy',
clinical_status: 'active',
reactions: [{manifestation: ['<string>'], description: '<string>'}],
onset_date: '2023-12-25',
note: '<string>',
client_reference: '<string>',
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/allergies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/allergies"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"no_known_allergies": True,
"category": [],
"type": "allergy",
"clinical_status": "active",
"reactions": [
{
"manifestation": ["<string>"],
"description": "<string>"
}
],
"onset_date": "2023-12-25",
"note": "<string>",
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"submission_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "condition",
"action": "create",
"review_status": "pending",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accepted_automatically": true,
"source": "api",
"submitted_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"decision_reason": "<string>",
"result_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_reference": "<string>",
"origin_assistant_name": "<string>",
"payload": {}
},
"idempotent_replay": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Submit an allergy
Permission: allergies:write
Submit an allergy for a clinician to confirm.
The allergy is held for review and answers 202 Accepted with a Location header pointing at the submission; it is not on the chart until a clinician confirms it. The Idempotency-Key header is REQUIRED - a retry with the same key returns the original submission, never a second one. An allergy the patient already has is not refused: it is held for a clinician like any other, who rejects the duplicate. JSON only: a FHIR AllergyIntolerance body is not accepted.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/allergies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"no_known_allergies": true,
"category": [],
"type": "allergy",
"clinical_status": "active",
"reactions": [
{
"manifestation": [
"<string>"
],
"description": "<string>"
}
],
"onset_date": "2023-12-25",
"note": "<string>",
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
no_known_allergies: true,
category: [],
type: 'allergy',
clinical_status: 'active',
reactions: [{manifestation: ['<string>'], description: '<string>'}],
onset_date: '2023-12-25',
note: '<string>',
client_reference: '<string>',
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/allergies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/allergies"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"no_known_allergies": True,
"category": [],
"type": "allergy",
"clinical_status": "active",
"reactions": [
{
"manifestation": ["<string>"],
"description": "<string>"
}
],
"onset_date": "2023-12-25",
"note": "<string>",
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"submission_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "condition",
"action": "create",
"review_status": "pending",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accepted_automatically": true,
"source": "api",
"submitted_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"decision_reason": "<string>",
"result_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_reference": "<string>",
"origin_assistant_name": "<string>",
"payload": {}
},
"idempotent_replay": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.
1Path Parameters
Body
An outside allergy, or a "no known allergies" statement, submitted for a clinician to confirm. It does not enter the chart until then. To record that the patient has no known allergies, send no_known_allergies: true INSTEAD of a substance (the two cannot be combined); it is also held for a clinician to confirm. Sending none or similar as a substance is refused. client_reference (your own id, up to 200 characters) makes a second submission of the same record with different content a client_reference_conflict. An allergy the patient already has is not refused: it is held for a clinician like any other.
Show child attributes
Show child attributes
Record that the patient has no known allergies. Send this INSTEAD of substance; one of the two is required and they cannot be combined.
true 4food, medication, environment, biologic low, high, unable_to_assess allergy, intolerance active, inactive, resolved 20Show child attributes
Show child attributes
2000200200Response
Accepted - waiting for a clinician. If the clinic has chosen to accept this kind of item from your key or connection without review, the body already shows review_status: confirmed and accepted_automatically: true; read review_status, not the status code.
What the clinic's review queue holds for something this key sent: one outside record waiting for, or already past, a clinician's decision.
Show child attributes
Show child attributes
Present and true when this Idempotency-Key was already used and the original submission is returned.