curl --request PATCH \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/referrals/{referral_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "entered_in_error",
"needed_by": "2023-12-25",
"reason": {
"text": "<string>"
},
"clinical_summary": "<string>",
"requester": {
"name": "<string>",
"organization": "<string>",
"npi": "<string>"
},
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'entered_in_error',
needed_by: '2023-12-25',
reason: {text: '<string>'},
clinical_summary: '<string>',
requester: {name: '<string>', organization: '<string>', npi: '<string>'},
client_reference: '<string>',
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/referrals/{referral_id}', 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}/referrals/{referral_id}"
payload = {
"status": "entered_in_error",
"needed_by": "2023-12-25",
"reason": { "text": "<string>" },
"clinical_summary": "<string>",
"requester": {
"name": "<string>",
"organization": "<string>",
"npi": "<string>"
},
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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": {}
}
}{
"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>"
}
]
}Update or retract a referral
Permission: referrals:write
Propose a change to a referral you sent, or retract it.
The change is held for clinic staff to confirm and answers 202 Accepted with a Location header pointing at the new submission; the referral is unchanged until then. You can change a referral only while the clinic has not acted on it (status: received); after staff accept, decline, schedule, complete or cancel it, the request is refused with a 400 saying the clinic has already actioned it. status: entered_in_error proposes a retraction, also only while received. A sender cannot accept, decline, schedule, complete or cancel a referral. The service cannot be changed. The Idempotency-Key header is optional. JSON only: a FHIR ServiceRequest body is not accepted.
curl --request PATCH \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/referrals/{referral_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "entered_in_error",
"needed_by": "2023-12-25",
"reason": {
"text": "<string>"
},
"clinical_summary": "<string>",
"requester": {
"name": "<string>",
"organization": "<string>",
"npi": "<string>"
},
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'entered_in_error',
needed_by: '2023-12-25',
reason: {text: '<string>'},
clinical_summary: '<string>',
requester: {name: '<string>', organization: '<string>', npi: '<string>'},
client_reference: '<string>',
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/referrals/{referral_id}', 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}/referrals/{referral_id}"
payload = {
"status": "entered_in_error",
"needed_by": "2023-12-25",
"reason": { "text": "<string>" },
"clinical_summary": "<string>",
"requester": {
"name": "<string>",
"organization": "<string>",
"npi": "<string>"
},
"client_reference": "<string>",
"origin_assistant_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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": {}
}
}{
"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
Optional. A unique value you choose for this request, such as a UUID. When sent, a retry with the same key returns the first answer instead of applying the change twice. See Retries and idempotency.
1Body
A proposed change to a referral, or a retraction. It becomes a NEW pending submission; the referral does not change until clinic staff confirm it. A change is always reviewed, even when the clinic accepts new referrals automatically. You can change a referral only while the clinic has not acted on it: once staff have accepted, declined, scheduled, completed or cancelled it, the change is refused. The service can never be changed (a different service is a new referral). status accepts only entered_in_error, which proposes retracting the referral as sent in error and cannot be combined with other changes. A sender cannot accept, decline, schedule, complete or cancel a referral.
entered_in_error routine, urgent, asap, stat Not earlier than yesterday.
Show child attributes
Show child attributes
1 - 8000Show child attributes
Show child attributes
200200Response
Accepted - waiting for clinic staff.
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