curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations/{pa_id}/decision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"pa_code": "<string>",
"approved_amount": 1,
"reason": "<string>",
"items": [
{
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": true,
"reason": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
pa_code: '<string>',
approved_amount: 1,
reason: '<string>',
items: [
{
item_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
approved: true,
reason: '<string>'
}
]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations/{pa_id}/decision', 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}/insurance/pre-authorizations/{pa_id}/decision"
payload = {
"pa_code": "<string>",
"approved_amount": 1,
"reason": "<string>",
"items": [
{
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": True,
"reason": "<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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_number": "<string>",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"insurance_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"encounter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_type": "service",
"priority_level": "routine",
"estimated_cost": 123,
"approved_amount": 123,
"pa_code": "<string>",
"pr_code": "<string>",
"is_approved": true,
"is_handled": true,
"handled_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"encounter_date": "2023-11-07T05:31:56Z",
"admission_start": "2023-11-07T05:31:56Z",
"admission_end": "2023-11-07T05:31:56Z",
"is_floating": true,
"submitted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_type": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"quantity": 123,
"unit_cost": 123,
"total_cost": 123,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>",
"approval_status": "<string>",
"is_approved": true,
"reject_reason": "<string>"
}
],
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
]
},
"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>"
}
]
}Decide a pre-authorization request
Permission: insurance.pa:decide
Approve or deny a pre-authorization request.
For the insurer the clinic linked to your organization. Only a request that is sent_for_authorization can be decided, once; a decided request answers 409 invalid_status_transition. Answers 200 with the request. A clinic-owned key and an organization with no insurer link are refused (hmo_not_linked). The Idempotency-Key header is REQUIRED.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations/{pa_id}/decision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"pa_code": "<string>",
"approved_amount": 1,
"reason": "<string>",
"items": [
{
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": true,
"reason": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
pa_code: '<string>',
approved_amount: 1,
reason: '<string>',
items: [
{
item_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
approved: true,
reason: '<string>'
}
]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/pre-authorizations/{pa_id}/decision', 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}/insurance/pre-authorizations/{pa_id}/decision"
payload = {
"pa_code": "<string>",
"approved_amount": 1,
"reason": "<string>",
"items": [
{
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": True,
"reason": "<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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_number": "<string>",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"insurance_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enrollee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"encounter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_type": "service",
"priority_level": "routine",
"estimated_cost": 123,
"approved_amount": 123,
"pa_code": "<string>",
"pr_code": "<string>",
"is_approved": true,
"is_handled": true,
"handled_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"encounter_date": "2023-11-07T05:31:56Z",
"admission_start": "2023-11-07T05:31:56Z",
"admission_end": "2023-11-07T05:31:56Z",
"is_floating": true,
"submitted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_type": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"quantity": 123,
"unit_cost": 123,
"total_cost": 123,
"diagnosis": "<string>",
"icd_cpt_code": "<string>",
"medical_necessity": "<string>",
"approval_status": "<string>",
"is_approved": true,
"reject_reason": "<string>"
}
],
"diagnoses": [
{
"icd_code": "<string>",
"name": "<string>",
"is_primary": true
}
]
},
"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.
1Body
Decide a request that is sent_for_authorization. An approval needs pa_code; a denial needs reason. approved_amount (approval only) defaults to the estimated cost and may not exceed it. Lines you do not list follow the decision. A decided request cannot be decided again.
Response
OK.
A pre-authorization request the clinic sent to an insurer. status is sent_for_authorization until the insurer decides, then approved or denied (with pa_code on approval). items and diagnoses are on the single read only.
Show child attributes
Show child attributes
Present and true when this Idempotency-Key was already used and the original answer is returned.