Lab Order Tests
Create Lab Order Test
Create a new lab order test.
POST
/
api
/
2.0
/
lab_order_tests
/
Create Lab Order Test
curl --request POST \
--url https://sandbox.elationemr.com/api/2.0/lab_order_tests/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"compendium": 123,
"cpts": [
"<string>"
],
"lab_vendor": 123,
"practice_created": 123,
"procedure_class": "<string>",
"questions": [
{
"question": {
"choices": [
{
"code": "<string>",
"value": "<string>"
}
],
"code": "<string>",
"value": "<string>",
"example_format": "<string>",
"max_length": 32767,
"secondary_code": "<string>"
},
"sequence": 32767,
"required": true
}
],
"synonyms": [
"<string>"
]
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/lab_order_tests/"
payload = {
"name": "<string>",
"code": "<string>",
"compendium": 123,
"cpts": ["<string>"],
"lab_vendor": 123,
"practice_created": 123,
"procedure_class": "<string>",
"questions": [
{
"question": {
"choices": [
{
"code": "<string>",
"value": "<string>"
}
],
"code": "<string>",
"value": "<string>",
"example_format": "<string>",
"max_length": 32767,
"secondary_code": "<string>"
},
"sequence": 32767,
"required": True
}
],
"synonyms": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
compendium: 123,
cpts: ['<string>'],
lab_vendor: 123,
practice_created: 123,
procedure_class: '<string>',
questions: [
{
question: {
choices: [{code: '<string>', value: '<string>'}],
code: '<string>',
value: '<string>',
example_format: '<string>',
max_length: 32767,
secondary_code: '<string>'
},
sequence: 32767,
required: true
}
],
synonyms: ['<string>']
})
};
fetch('https://sandbox.elationemr.com/api/2.0/lab_order_tests/', 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://sandbox.elationemr.com/api/2.0/lab_order_tests/",
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([
'name' => '<string>',
'code' => '<string>',
'compendium' => 123,
'cpts' => [
'<string>'
],
'lab_vendor' => 123,
'practice_created' => 123,
'procedure_class' => '<string>',
'questions' => [
[
'question' => [
'choices' => [
[
'code' => '<string>',
'value' => '<string>'
]
],
'code' => '<string>',
'value' => '<string>',
'example_format' => '<string>',
'max_length' => 32767,
'secondary_code' => '<string>'
],
'sequence' => 32767,
'required' => true
]
],
'synonyms' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox.elationemr.com/api/2.0/lab_order_tests/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"compendium\": 123,\n \"cpts\": [\n \"<string>\"\n ],\n \"lab_vendor\": 123,\n \"practice_created\": 123,\n \"procedure_class\": \"<string>\",\n \"questions\": [\n {\n \"question\": {\n \"choices\": [\n {\n \"code\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"code\": \"<string>\",\n \"value\": \"<string>\",\n \"example_format\": \"<string>\",\n \"max_length\": 32767,\n \"secondary_code\": \"<string>\"\n },\n \"sequence\": 32767,\n \"required\": true\n }\n ],\n \"synonyms\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.elationemr.com/api/2.0/lab_order_tests/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"compendium\": 123,\n \"cpts\": [\n \"<string>\"\n ],\n \"lab_vendor\": 123,\n \"practice_created\": 123,\n \"procedure_class\": \"<string>\",\n \"questions\": [\n {\n \"question\": {\n \"choices\": [\n {\n \"code\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"code\": \"<string>\",\n \"value\": \"<string>\",\n \"example_format\": \"<string>\",\n \"max_length\": 32767,\n \"secondary_code\": \"<string>\"\n },\n \"sequence\": 32767,\n \"required\": true\n }\n ],\n \"synonyms\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/lab_order_tests/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"compendium\": 123,\n \"cpts\": [\n \"<string>\"\n ],\n \"lab_vendor\": 123,\n \"practice_created\": 123,\n \"procedure_class\": \"<string>\",\n \"questions\": [\n {\n \"question\": {\n \"choices\": [\n {\n \"code\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"code\": \"<string>\",\n \"value\": \"<string>\",\n \"example_format\": \"<string>\",\n \"max_length\": 32767,\n \"secondary_code\": \"<string>\"\n },\n \"sequence\": 32767,\n \"required\": true\n }\n ],\n \"synonyms\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"code": "<string>",
"compendium": 123,
"cpts": [
"<string>"
],
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"lab_vendor": 123,
"practice_created": 123,
"procedure_class": "<string>",
"questions": [
{
"question": {
"choices": [
{
"code": "<string>",
"value": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123
}
],
"code": "<string>",
"value": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"example_format": "<string>",
"id": 123,
"max_length": 32767,
"question_type": "enum",
"secondary_code": "<string>"
},
"sequence": 32767,
"required": true,
"test": 123
}
],
"synonyms": [
"<string>"
]
}Authorizations
Body
application/json
Response
201 - application/json
Was this page helpful?
⌘I
Create Lab Order Test
curl --request POST \
--url https://sandbox.elationemr.com/api/2.0/lab_order_tests/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"compendium": 123,
"cpts": [
"<string>"
],
"lab_vendor": 123,
"practice_created": 123,
"procedure_class": "<string>",
"questions": [
{
"question": {
"choices": [
{
"code": "<string>",
"value": "<string>"
}
],
"code": "<string>",
"value": "<string>",
"example_format": "<string>",
"max_length": 32767,
"secondary_code": "<string>"
},
"sequence": 32767,
"required": true
}
],
"synonyms": [
"<string>"
]
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/lab_order_tests/"
payload = {
"name": "<string>",
"code": "<string>",
"compendium": 123,
"cpts": ["<string>"],
"lab_vendor": 123,
"practice_created": 123,
"procedure_class": "<string>",
"questions": [
{
"question": {
"choices": [
{
"code": "<string>",
"value": "<string>"
}
],
"code": "<string>",
"value": "<string>",
"example_format": "<string>",
"max_length": 32767,
"secondary_code": "<string>"
},
"sequence": 32767,
"required": True
}
],
"synonyms": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
compendium: 123,
cpts: ['<string>'],
lab_vendor: 123,
practice_created: 123,
procedure_class: '<string>',
questions: [
{
question: {
choices: [{code: '<string>', value: '<string>'}],
code: '<string>',
value: '<string>',
example_format: '<string>',
max_length: 32767,
secondary_code: '<string>'
},
sequence: 32767,
required: true
}
],
synonyms: ['<string>']
})
};
fetch('https://sandbox.elationemr.com/api/2.0/lab_order_tests/', 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://sandbox.elationemr.com/api/2.0/lab_order_tests/",
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([
'name' => '<string>',
'code' => '<string>',
'compendium' => 123,
'cpts' => [
'<string>'
],
'lab_vendor' => 123,
'practice_created' => 123,
'procedure_class' => '<string>',
'questions' => [
[
'question' => [
'choices' => [
[
'code' => '<string>',
'value' => '<string>'
]
],
'code' => '<string>',
'value' => '<string>',
'example_format' => '<string>',
'max_length' => 32767,
'secondary_code' => '<string>'
],
'sequence' => 32767,
'required' => true
]
],
'synonyms' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox.elationemr.com/api/2.0/lab_order_tests/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"compendium\": 123,\n \"cpts\": [\n \"<string>\"\n ],\n \"lab_vendor\": 123,\n \"practice_created\": 123,\n \"procedure_class\": \"<string>\",\n \"questions\": [\n {\n \"question\": {\n \"choices\": [\n {\n \"code\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"code\": \"<string>\",\n \"value\": \"<string>\",\n \"example_format\": \"<string>\",\n \"max_length\": 32767,\n \"secondary_code\": \"<string>\"\n },\n \"sequence\": 32767,\n \"required\": true\n }\n ],\n \"synonyms\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.elationemr.com/api/2.0/lab_order_tests/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"compendium\": 123,\n \"cpts\": [\n \"<string>\"\n ],\n \"lab_vendor\": 123,\n \"practice_created\": 123,\n \"procedure_class\": \"<string>\",\n \"questions\": [\n {\n \"question\": {\n \"choices\": [\n {\n \"code\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"code\": \"<string>\",\n \"value\": \"<string>\",\n \"example_format\": \"<string>\",\n \"max_length\": 32767,\n \"secondary_code\": \"<string>\"\n },\n \"sequence\": 32767,\n \"required\": true\n }\n ],\n \"synonyms\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/lab_order_tests/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"compendium\": 123,\n \"cpts\": [\n \"<string>\"\n ],\n \"lab_vendor\": 123,\n \"practice_created\": 123,\n \"procedure_class\": \"<string>\",\n \"questions\": [\n {\n \"question\": {\n \"choices\": [\n {\n \"code\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"code\": \"<string>\",\n \"value\": \"<string>\",\n \"example_format\": \"<string>\",\n \"max_length\": 32767,\n \"secondary_code\": \"<string>\"\n },\n \"sequence\": 32767,\n \"required\": true\n }\n ],\n \"synonyms\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"code": "<string>",
"compendium": 123,
"cpts": [
"<string>"
],
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123,
"lab_vendor": 123,
"practice_created": 123,
"procedure_class": "<string>",
"questions": [
{
"question": {
"choices": [
{
"code": "<string>",
"value": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"id": 123
}
],
"code": "<string>",
"value": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"example_format": "<string>",
"id": 123,
"max_length": 32767,
"question_type": "enum",
"secondary_code": "<string>"
},
"sequence": 32767,
"required": true,
"test": 123
}
],
"synonyms": [
"<string>"
]
}