Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Replace an existing allergy.
cURL
curl --request PUT \ --url https://sandbox.elationemr.com/api/2.0/allergies/{id}/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "patient": 123, "reaction": "<string>", "start_date": "2023-12-25" } '
import requests url = "https://sandbox.elationemr.com/api/2.0/allergies/{id}/" payload = { "name": "<string>", "patient": 123, "reaction": "<string>", "start_date": "2023-12-25" } headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.text)
const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({name: '<string>', patient: 123, reaction: '<string>', start_date: '2023-12-25'}) }; fetch('https://sandbox.elationemr.com/api/2.0/allergies/{id}/', 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/allergies/{id}/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'name' => '<string>', 'patient' => 123, 'reaction' => '<string>', 'start_date' => '2023-12-25' ]), 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/allergies/{id}/" payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"patient\": 123,\n \"reaction\": \"<string>\",\n \"start_date\": \"2023-12-25\"\n}") req, _ := http.NewRequest("PUT", 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.put("https://sandbox.elationemr.com/api/2.0/allergies/{id}/") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .body("{\n \"name\": \"<string>\",\n \"patient\": 123,\n \"reaction\": \"<string>\",\n \"start_date\": \"2023-12-25\"\n}") .asString();
require 'uri' require 'net/http' url = URI("https://sandbox.elationemr.com/api/2.0/allergies/{id}/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer <token>' request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"<string>\",\n \"patient\": 123,\n \"reaction\": \"<string>\",\n \"start_date\": \"2023-12-25\"\n}" response = http.request(request) puts response.read_body
{ "name": "<string>", "patient": 123, "created_date": "2023-11-07T05:31:56Z", "deleted_date": "2023-11-07T05:31:56Z", "id": 123, "medispandnid": "<string>", "medispanid": "<string>", "reaction": "<string>", "severity": "mild", "start_date": "2023-12-25", "status": "Active" }
The access token received from the authorization server in the OAuth 2.0 flow.
The name of the allergy drug.
The id of the patient.
The reaction to the drug.
200
How severe the reaction is.
mild
moderate
severe
unknown
The date the allergy started.
Active
Inactive
Was this page helpful?