Incoming Files
Create a new incoming file
Create a new incoming file for a patient
POST
/
api
/
2.0
/
patients
/
{id}
/
incoming_files
/
Create a new incoming file
curl --request POST \
--url https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_type": "<string>",
"files": [
123
],
"custom_title": "<string>",
"document_date": "2023-11-07T05:31:56Z",
"document_tags": [
"<string>"
],
"import_history": false,
"reviewer_user": 123,
"sign_off": false,
"urgent": false
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/"
payload = {
"document_type": "<string>",
"files": [123],
"custom_title": "<string>",
"document_date": "2023-11-07T05:31:56Z",
"document_tags": ["<string>"],
"import_history": False,
"reviewer_user": 123,
"sign_off": False,
"urgent": False
}
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({
document_type: '<string>',
files: [123],
custom_title: '<string>',
document_date: '2023-11-07T05:31:56Z',
document_tags: ['<string>'],
import_history: false,
reviewer_user: 123,
sign_off: false,
urgent: false
})
};
fetch('https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/', 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/patients/{id}/incoming_files/",
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([
'document_type' => '<string>',
'files' => [
123
],
'custom_title' => '<string>',
'document_date' => '2023-11-07T05:31:56Z',
'document_tags' => [
'<string>'
],
'import_history' => false,
'reviewer_user' => 123,
'sign_off' => false,
'urgent' => false
]),
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/patients/{id}/incoming_files/"
payload := strings.NewReader("{\n \"document_type\": \"<string>\",\n \"files\": [\n 123\n ],\n \"custom_title\": \"<string>\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"document_tags\": [\n \"<string>\"\n ],\n \"import_history\": false,\n \"reviewer_user\": 123,\n \"sign_off\": false,\n \"urgent\": false\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/patients/{id}/incoming_files/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_type\": \"<string>\",\n \"files\": [\n 123\n ],\n \"custom_title\": \"<string>\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"document_tags\": [\n \"<string>\"\n ],\n \"import_history\": false,\n \"reviewer_user\": 123,\n \"sign_off\": false,\n \"urgent\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/")
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 \"document_type\": \"<string>\",\n \"files\": [\n 123\n ],\n \"custom_title\": \"<string>\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"document_tags\": [\n \"<string>\"\n ],\n \"import_history\": false,\n \"reviewer_user\": 123,\n \"sign_off\": false,\n \"urgent\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The ID of the patient
Body
application/json
Type of document (cannot be 'Lab')
Array of file IDs
Custom title for the document
Document date (defaults to current datetime)
Array of document tags
Whether to import history
User ID of the reviewer
Whether to sign off the document
Whether the document is urgent
Response
201
No response body
Was this page helpful?
⌘I
Create a new incoming file
curl --request POST \
--url https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_type": "<string>",
"files": [
123
],
"custom_title": "<string>",
"document_date": "2023-11-07T05:31:56Z",
"document_tags": [
"<string>"
],
"import_history": false,
"reviewer_user": 123,
"sign_off": false,
"urgent": false
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/"
payload = {
"document_type": "<string>",
"files": [123],
"custom_title": "<string>",
"document_date": "2023-11-07T05:31:56Z",
"document_tags": ["<string>"],
"import_history": False,
"reviewer_user": 123,
"sign_off": False,
"urgent": False
}
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({
document_type: '<string>',
files: [123],
custom_title: '<string>',
document_date: '2023-11-07T05:31:56Z',
document_tags: ['<string>'],
import_history: false,
reviewer_user: 123,
sign_off: false,
urgent: false
})
};
fetch('https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/', 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/patients/{id}/incoming_files/",
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([
'document_type' => '<string>',
'files' => [
123
],
'custom_title' => '<string>',
'document_date' => '2023-11-07T05:31:56Z',
'document_tags' => [
'<string>'
],
'import_history' => false,
'reviewer_user' => 123,
'sign_off' => false,
'urgent' => false
]),
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/patients/{id}/incoming_files/"
payload := strings.NewReader("{\n \"document_type\": \"<string>\",\n \"files\": [\n 123\n ],\n \"custom_title\": \"<string>\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"document_tags\": [\n \"<string>\"\n ],\n \"import_history\": false,\n \"reviewer_user\": 123,\n \"sign_off\": false,\n \"urgent\": false\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/patients/{id}/incoming_files/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_type\": \"<string>\",\n \"files\": [\n 123\n ],\n \"custom_title\": \"<string>\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"document_tags\": [\n \"<string>\"\n ],\n \"import_history\": false,\n \"reviewer_user\": 123,\n \"sign_off\": false,\n \"urgent\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/patients/{id}/incoming_files/")
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 \"document_type\": \"<string>\",\n \"files\": [\n 123\n ],\n \"custom_title\": \"<string>\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"document_tags\": [\n \"<string>\"\n ],\n \"import_history\": false,\n \"reviewer_user\": 123,\n \"sign_off\": false,\n \"urgent\": false\n}"
response = http.request(request)
puts response.read_body