curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/medication-statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"medication": {
"text": "<string>"
},
"dosage": {
"text": "<string>",
"route": "<string>",
"frequency": "<string>"
},
"status": "active",
"effective_start": "2023-12-25",
"effective_end": "2023-12-25",
"reason": "<string>",
"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',
medication: {text: '<string>'},
dosage: {text: '<string>', route: '<string>', frequency: '<string>'},
status: 'active',
effective_start: '2023-12-25',
effective_end: '2023-12-25',
reason: '<string>',
note: '<string>',
client_reference: '<string>',
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/medication-statements', 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}/medication-statements"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"medication": { "text": "<string>" },
"dosage": {
"text": "<string>",
"route": "<string>",
"frequency": "<string>"
},
"status": "active",
"effective_start": "2023-12-25",
"effective_end": "2023-12-25",
"reason": "<string>",
"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 a reported medicine
Permission: medications:write
Submit a reported medicine for a clinician to confirm.
The statement 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 (unless the clinic has chosen to accept such submissions automatically). The Idempotency-Key header is REQUIRED - a retry with the same key returns the original submission, never a second one. This records what the patient reports taking; it does not prescribe or dispense anything. JSON only: a FHIR MedicationStatement body is not accepted.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/medication-statements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"medication": {
"text": "<string>"
},
"dosage": {
"text": "<string>",
"route": "<string>",
"frequency": "<string>"
},
"status": "active",
"effective_start": "2023-12-25",
"effective_end": "2023-12-25",
"reason": "<string>",
"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',
medication: {text: '<string>'},
dosage: {text: '<string>', route: '<string>', frequency: '<string>'},
status: 'active',
effective_start: '2023-12-25',
effective_end: '2023-12-25',
reason: '<string>',
note: '<string>',
client_reference: '<string>',
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/medication-statements', 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}/medication-statements"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"medication": { "text": "<string>" },
"dosage": {
"text": "<string>",
"route": "<string>",
"frequency": "<string>"
},
"status": "active",
"effective_start": "2023-12-25",
"effective_end": "2023-12-25",
"reason": "<string>",
"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
A reported medicine, submitted for a clinician to confirm. It does not enter the chart until then and it prescribes nothing. A medicine may be reported more than once. medication.code is optional: send {system: rxnorm, code} only for a real RxNorm code (it is checked against the platform's drug data and an unrecognised one is refused), or {system: local, code} for your own code. client_reference (your own id, up to 200 characters) makes a second submission of the same record with different content a client_reference_conflict.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
active, completed, stopped, on_hold, not_taken Not before effective_start.
1 - 5001 - 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.