Skip to main content
GET
/
api
/
2.0
/
discontinued_medications
/
{id}
/
Retrieve Discontinued Medication
curl --request GET \
  --url https://sandbox.elationemr.com/api/2.0/discontinued_medications/{id}/ \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://sandbox.elationemr.com/api/2.0/discontinued_medications/{id}/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://sandbox.elationemr.com/api/2.0/discontinued_medications/{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/discontinued_medications/{id}/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.elationemr.com/api/2.0/discontinued_medications/{id}/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sandbox.elationemr.com/api/2.0/discontinued_medications/{id}/")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.elationemr.com/api/2.0/discontinued_medications/{id}/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "med_order": 123,
  "chart_date": "2023-11-07T05:31:56Z",
  "created_date": "2023-11-07T05:31:56Z",
  "deleted_date": "2023-11-07T05:31:56Z",
  "discontinue_date": "2023-12-25",
  "document_date": "2023-11-07T05:31:56Z",
  "documenting_personnel": 123,
  "id": 123,
  "is_documented": true,
  "last_medication_order": 123,
  "medication": {
    "active_ndcs": [
      "<string>"
    ],
    "brand_name": "<string>",
    "created_date": "2023-11-07T05:31:56Z",
    "creation_type": "user",
    "form": "<string>",
    "generic_name": "<string>",
    "id": 123,
    "is_controlled": false,
    "market_end_date": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "ndcs": [
      "<string>"
    ],
    "obsolete_date": "2023-11-07T05:31:56Z",
    "practice": 123,
    "route": "<string>",
    "rxnorm_cuis": [
      "<string>"
    ],
    "strength": "<string>",
    "type": "prescription"
  },
  "patient": 123,
  "practice": 123,
  "prescribing_physician": 123,
  "reason": "<string>",
  "signed_by": 123,
  "signed_date": "2023-11-07T05:31:56Z",
  "supervising_physician": 123,
  "thread": 123
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
integer<int64>
required

Response

200 - application/json
med_order
integer<int64>
required

The id of the medication which we discontinued.

chart_date
string<date-time>

The timestamp at which this discontinue was available in the patient's chart

created_date
string<date-time> | null
read-only

The timestamp at which this discontinue was created in our database.

deleted_date
string<date-time> | null
read-only

The timestamp at which the discontinue was marked as deleted, usually occurs when a user wants to 'undiscontinue' the medication.

discontinue_date
string<date>

The date when the medication was discontinued.

document_date
string<date-time>

The timestamp at which we've documented this discontinue occurred.

documenting_personnel
integer<int64>

The user who documented this discontinue.

id
integer
read-only

The id of the discontinue medication.

is_documented
boolean
last_medication_order
integer | null
read-only

The id of the last medication ordered before we discontinued this thread of med orders.

medication
object

The medication that was discontinued.

patient
integer<int64>

The id of the patient chart.

practice
integer<int64>

The id of the practice.

prescribing_physician
integer<int64>

The id of the physician who prescribed the medication.

reason
string | null

The discontinue reason.

signed_by
integer<int64>
read-only
signed_date
string<date-time> | null

The timestamp at which a user signed off on the discontinue.

supervising_physician
integer<int64> | null

If the prescribing physician requires supervision, this will reference the physician who is in that role.

thread
integer<int64>