Create prescription
curl --request POST \
--url https://api.clinikapi.com/v1/prescriptions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"patientId": "<string>",
"prescriberId": "<string>",
"medication": "<string>",
"encounterId": "<string>",
"intent": "order",
"status": "active",
"statusReason": "<string>",
"category": "<string>",
"doNotPerform": true,
"authoredOn": "2023-11-07T05:31:56Z",
"dosageText": "<string>",
"dosage": {
"dose": {
"value": 123,
"unit": "<string>"
},
"frequency": 123,
"period": 123,
"route": "<string>"
},
"refills": 49,
"quantity": {
"value": 123,
"unit": "<string>"
},
"supplyDays": 123,
"substitutionAllowed": true,
"reason": "<string>",
"note": "<string>",
"performerId": "<string>",
"courseOfTherapy": "<string>",
"priorPrescriptionId": "<string>"
}
'import requests
url = "https://api.clinikapi.com/v1/prescriptions"
payload = {
"patientId": "<string>",
"prescriberId": "<string>",
"medication": "<string>",
"encounterId": "<string>",
"intent": "order",
"status": "active",
"statusReason": "<string>",
"category": "<string>",
"doNotPerform": True,
"authoredOn": "2023-11-07T05:31:56Z",
"dosageText": "<string>",
"dosage": {
"dose": {
"value": 123,
"unit": "<string>"
},
"frequency": 123,
"period": 123,
"route": "<string>"
},
"refills": 49,
"quantity": {
"value": 123,
"unit": "<string>"
},
"supplyDays": 123,
"substitutionAllowed": True,
"reason": "<string>",
"note": "<string>",
"performerId": "<string>",
"courseOfTherapy": "<string>",
"priorPrescriptionId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientId: '<string>',
prescriberId: '<string>',
medication: '<string>',
encounterId: '<string>',
intent: 'order',
status: 'active',
statusReason: '<string>',
category: '<string>',
doNotPerform: true,
authoredOn: '2023-11-07T05:31:56Z',
dosageText: '<string>',
dosage: {
dose: {value: 123, unit: '<string>'},
frequency: 123,
period: 123,
route: '<string>'
},
refills: 49,
quantity: {value: 123, unit: '<string>'},
supplyDays: 123,
substitutionAllowed: true,
reason: '<string>',
note: '<string>',
performerId: '<string>',
courseOfTherapy: '<string>',
priorPrescriptionId: '<string>'
})
};
fetch('https://api.clinikapi.com/v1/prescriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clinikapi.com/v1/prescriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'patientId' => '<string>',
'prescriberId' => '<string>',
'medication' => '<string>',
'encounterId' => '<string>',
'intent' => 'order',
'status' => 'active',
'statusReason' => '<string>',
'category' => '<string>',
'doNotPerform' => true,
'authoredOn' => '2023-11-07T05:31:56Z',
'dosageText' => '<string>',
'dosage' => [
'dose' => [
'value' => 123,
'unit' => '<string>'
],
'frequency' => 123,
'period' => 123,
'route' => '<string>'
],
'refills' => 49,
'quantity' => [
'value' => 123,
'unit' => '<string>'
],
'supplyDays' => 123,
'substitutionAllowed' => true,
'reason' => '<string>',
'note' => '<string>',
'performerId' => '<string>',
'courseOfTherapy' => '<string>',
'priorPrescriptionId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clinikapi.com/v1/prescriptions"
payload := strings.NewReader("{\n \"patientId\": \"<string>\",\n \"prescriberId\": \"<string>\",\n \"medication\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"intent\": \"order\",\n \"status\": \"active\",\n \"statusReason\": \"<string>\",\n \"category\": \"<string>\",\n \"doNotPerform\": true,\n \"authoredOn\": \"2023-11-07T05:31:56Z\",\n \"dosageText\": \"<string>\",\n \"dosage\": {\n \"dose\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"frequency\": 123,\n \"period\": 123,\n \"route\": \"<string>\"\n },\n \"refills\": 49,\n \"quantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"supplyDays\": 123,\n \"substitutionAllowed\": true,\n \"reason\": \"<string>\",\n \"note\": \"<string>\",\n \"performerId\": \"<string>\",\n \"courseOfTherapy\": \"<string>\",\n \"priorPrescriptionId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.clinikapi.com/v1/prescriptions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"patientId\": \"<string>\",\n \"prescriberId\": \"<string>\",\n \"medication\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"intent\": \"order\",\n \"status\": \"active\",\n \"statusReason\": \"<string>\",\n \"category\": \"<string>\",\n \"doNotPerform\": true,\n \"authoredOn\": \"2023-11-07T05:31:56Z\",\n \"dosageText\": \"<string>\",\n \"dosage\": {\n \"dose\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"frequency\": 123,\n \"period\": 123,\n \"route\": \"<string>\"\n },\n \"refills\": 49,\n \"quantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"supplyDays\": 123,\n \"substitutionAllowed\": true,\n \"reason\": \"<string>\",\n \"note\": \"<string>\",\n \"performerId\": \"<string>\",\n \"courseOfTherapy\": \"<string>\",\n \"priorPrescriptionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clinikapi.com/v1/prescriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patientId\": \"<string>\",\n \"prescriberId\": \"<string>\",\n \"medication\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"intent\": \"order\",\n \"status\": \"active\",\n \"statusReason\": \"<string>\",\n \"category\": \"<string>\",\n \"doNotPerform\": true,\n \"authoredOn\": \"2023-11-07T05:31:56Z\",\n \"dosageText\": \"<string>\",\n \"dosage\": {\n \"dose\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"frequency\": 123,\n \"period\": 123,\n \"route\": \"<string>\"\n },\n \"refills\": 49,\n \"quantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"supplyDays\": 123,\n \"substitutionAllowed\": true,\n \"reason\": \"<string>\",\n \"note\": \"<string>\",\n \"performerId\": \"<string>\",\n \"courseOfTherapy\": \"<string>\",\n \"priorPrescriptionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyPrescriptions
Create Prescription
POST
/
v1
/
prescriptions
Create prescription
curl --request POST \
--url https://api.clinikapi.com/v1/prescriptions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"patientId": "<string>",
"prescriberId": "<string>",
"medication": "<string>",
"encounterId": "<string>",
"intent": "order",
"status": "active",
"statusReason": "<string>",
"category": "<string>",
"doNotPerform": true,
"authoredOn": "2023-11-07T05:31:56Z",
"dosageText": "<string>",
"dosage": {
"dose": {
"value": 123,
"unit": "<string>"
},
"frequency": 123,
"period": 123,
"route": "<string>"
},
"refills": 49,
"quantity": {
"value": 123,
"unit": "<string>"
},
"supplyDays": 123,
"substitutionAllowed": true,
"reason": "<string>",
"note": "<string>",
"performerId": "<string>",
"courseOfTherapy": "<string>",
"priorPrescriptionId": "<string>"
}
'import requests
url = "https://api.clinikapi.com/v1/prescriptions"
payload = {
"patientId": "<string>",
"prescriberId": "<string>",
"medication": "<string>",
"encounterId": "<string>",
"intent": "order",
"status": "active",
"statusReason": "<string>",
"category": "<string>",
"doNotPerform": True,
"authoredOn": "2023-11-07T05:31:56Z",
"dosageText": "<string>",
"dosage": {
"dose": {
"value": 123,
"unit": "<string>"
},
"frequency": 123,
"period": 123,
"route": "<string>"
},
"refills": 49,
"quantity": {
"value": 123,
"unit": "<string>"
},
"supplyDays": 123,
"substitutionAllowed": True,
"reason": "<string>",
"note": "<string>",
"performerId": "<string>",
"courseOfTherapy": "<string>",
"priorPrescriptionId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientId: '<string>',
prescriberId: '<string>',
medication: '<string>',
encounterId: '<string>',
intent: 'order',
status: 'active',
statusReason: '<string>',
category: '<string>',
doNotPerform: true,
authoredOn: '2023-11-07T05:31:56Z',
dosageText: '<string>',
dosage: {
dose: {value: 123, unit: '<string>'},
frequency: 123,
period: 123,
route: '<string>'
},
refills: 49,
quantity: {value: 123, unit: '<string>'},
supplyDays: 123,
substitutionAllowed: true,
reason: '<string>',
note: '<string>',
performerId: '<string>',
courseOfTherapy: '<string>',
priorPrescriptionId: '<string>'
})
};
fetch('https://api.clinikapi.com/v1/prescriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clinikapi.com/v1/prescriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'patientId' => '<string>',
'prescriberId' => '<string>',
'medication' => '<string>',
'encounterId' => '<string>',
'intent' => 'order',
'status' => 'active',
'statusReason' => '<string>',
'category' => '<string>',
'doNotPerform' => true,
'authoredOn' => '2023-11-07T05:31:56Z',
'dosageText' => '<string>',
'dosage' => [
'dose' => [
'value' => 123,
'unit' => '<string>'
],
'frequency' => 123,
'period' => 123,
'route' => '<string>'
],
'refills' => 49,
'quantity' => [
'value' => 123,
'unit' => '<string>'
],
'supplyDays' => 123,
'substitutionAllowed' => true,
'reason' => '<string>',
'note' => '<string>',
'performerId' => '<string>',
'courseOfTherapy' => '<string>',
'priorPrescriptionId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clinikapi.com/v1/prescriptions"
payload := strings.NewReader("{\n \"patientId\": \"<string>\",\n \"prescriberId\": \"<string>\",\n \"medication\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"intent\": \"order\",\n \"status\": \"active\",\n \"statusReason\": \"<string>\",\n \"category\": \"<string>\",\n \"doNotPerform\": true,\n \"authoredOn\": \"2023-11-07T05:31:56Z\",\n \"dosageText\": \"<string>\",\n \"dosage\": {\n \"dose\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"frequency\": 123,\n \"period\": 123,\n \"route\": \"<string>\"\n },\n \"refills\": 49,\n \"quantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"supplyDays\": 123,\n \"substitutionAllowed\": true,\n \"reason\": \"<string>\",\n \"note\": \"<string>\",\n \"performerId\": \"<string>\",\n \"courseOfTherapy\": \"<string>\",\n \"priorPrescriptionId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.clinikapi.com/v1/prescriptions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"patientId\": \"<string>\",\n \"prescriberId\": \"<string>\",\n \"medication\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"intent\": \"order\",\n \"status\": \"active\",\n \"statusReason\": \"<string>\",\n \"category\": \"<string>\",\n \"doNotPerform\": true,\n \"authoredOn\": \"2023-11-07T05:31:56Z\",\n \"dosageText\": \"<string>\",\n \"dosage\": {\n \"dose\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"frequency\": 123,\n \"period\": 123,\n \"route\": \"<string>\"\n },\n \"refills\": 49,\n \"quantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"supplyDays\": 123,\n \"substitutionAllowed\": true,\n \"reason\": \"<string>\",\n \"note\": \"<string>\",\n \"performerId\": \"<string>\",\n \"courseOfTherapy\": \"<string>\",\n \"priorPrescriptionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clinikapi.com/v1/prescriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patientId\": \"<string>\",\n \"prescriberId\": \"<string>\",\n \"medication\": \"<string>\",\n \"encounterId\": \"<string>\",\n \"intent\": \"order\",\n \"status\": \"active\",\n \"statusReason\": \"<string>\",\n \"category\": \"<string>\",\n \"doNotPerform\": true,\n \"authoredOn\": \"2023-11-07T05:31:56Z\",\n \"dosageText\": \"<string>\",\n \"dosage\": {\n \"dose\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"frequency\": 123,\n \"period\": 123,\n \"route\": \"<string>\"\n },\n \"refills\": 49,\n \"quantity\": {\n \"value\": 123,\n \"unit\": \"<string>\"\n },\n \"supplyDays\": 123,\n \"substitutionAllowed\": true,\n \"reason\": \"<string>\",\n \"note\": \"<string>\",\n \"performerId\": \"<string>\",\n \"courseOfTherapy\": \"<string>\",\n \"priorPrescriptionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Your ClinikAPI secret key (clk_live_* or clk_test_*)
Body
application/json
Available options:
proposal, plan, order, original-order Available options:
active, on-hold, cancelled, completed, draft Reason for current status (e.g. why on-hold or cancelled)
Maximum string length:
500Available options:
routine, urgent, asap, stat Category of medication usage (inpatient, outpatient, community, discharge)
Maximum string length:
200True if this is a "do not perform" order
When the prescription was authored (defaults to now)
Maximum string length:
1000Show child attributes
Show child attributes
Required range:
0 <= x <= 99Show child attributes
Show child attributes
Maximum string length:
500Maximum string length:
2000Intended performer of administration (Practitioner ID)
Course of therapy type (continuous, acute, seasonal)
Maximum string length:
200Reference to a prior prescription being replaced
Response
201
Prescription created
⌘I