NAV Navbar
Logo cerner
Ruby Shell

Medication API v1

The HealtheIntent Medication API allows systems to interact with medications data in HealtheIntent.

URL: https://cernerdemo.api.us.healtheintent.com/medication/v1

Medication

Medications are pharmacy orders, statements from patients about their medication use, and medications inferred from claims. Medications can include inpatient medication orders dispensed by hospital pharmacies and community prescriptions dispensed by retail pharmacies. Medications also include over-the-counter medications (for example, aspirin) and dietary supplements.

Retrieve a Single Medication

Example Request:


require 'httparty' # Using HTTParty 0.16.2
require 'json'

headers = {
  'Authorization' => '<auth_header>',
  'Accept' => 'application/json'
}

result = HTTParty.get('https://cernerdemo.api.us.healtheintent.com/medication/v1/populations/1424e81d-8cea-4d6b-b140-d6630b684a58/patients/0f2fbbc9-7c18-45e0-a95e-89076c8a9581/medications/f09385c8e68530e2227097cffb70e464437b6faf560ee3a8ffca84369291e2b8', headers: headers)

print JSON.pretty_generate(result)


# You can also use wget
curl -X GET https://cernerdemo.api.us.healtheintent.com/medication/v1/populations/1424e81d-8cea-4d6b-b140-d6630b684a58/patients/0f2fbbc9-7c18-45e0-a95e-89076c8a9581/medications/f09385c8e68530e2227097cffb70e464437b6faf560ee3a8ffca84369291e2b8 \
-H 'Authorization: {auth_header}' \
-H 'Accept: application/json'

Example response

{
  "code": {
    "codings": [
      {
        "code": "11988",
        "display": "cefTRIAXone",
        "system": "2.16.840.1.113883.6.312"
      },
      {
        "code": "D00052",
        "display": "cefTRIAXone",
        "system": "13A955381FD04E238BEC48D851F04FF9"
      }
    ],
    "sourceCodings": [
      {
        "code": "11988",
        "display": "cefTRIAXone",
        "system": "2.16.840.1.113883.6.312"
      }
    ],
    "text": "cefTRIAXone"
  },
  "end": "2018-04-18",
  "frequency": {
    "codings": [
      {
        "code": "229797004",
        "display": "Once daily",
        "system": "2.16.840.1.113883.6.96"
      }
    ],
    "sourceCodings": [
      {
        "code": "696530",
        "display": "Daily",
        "system": "urn:cerner:coding:codingsystem:codeset:4003"
      }
    ],
    "text": "Daily"
  },
  "id": "f09385c8e68530e2227097cffb70e464437b6faf560ee3a8ffca84369291e2b8",
  "ingredients": [
    {
      "code": {
        "codings": [
          {
            "code": "00093913306",
            "display": "amiodarone 200 mg oral tablet",
            "system": "2.16.840.1.113883.6.69"
          }
        ],
        "sourceCodings": [
          {
            "code": "00093913306",
            "display": "amiodarone 200 mg oral tablet",
            "system": "2.16.840.1.113883.6.69"
          }
        ],
        "text": "amiodarone 200 mg oral tablet"
      },
      "dose": {
        "strength": {
          "unit": {
            "codings": [
              {
                "code": "258682000",
                "display": "gram",
                "system": "2.16.840.1.113883.6.96"
              }
            ],
            "sourceCodings": [
              {
                "code": "263",
                "display": "gm",
                "system": "urn:cerner:coding:codingsystem:codeset:54"
              }
            ],
            "text": "gm"
          },
          "value": "4"
        },
        "quantity": {
          "value": "2"
        },
        "volume": {
          "unit": {
            "codings": [
              {
                "code": "428673006",
                "display": "coding-display",
                "system": "2.16.840.1.113883.6.96"
              }
            ],
            "sourceCodings": [
              {
                "code": "2207119100",
                "display": "tabs",
                "system": "urn:cerner:coding:codingsystem:codeset:54"
              }
            ],
            "text": "tabs"
          },
          "value": "10"
        }
      },
      "referenceDrug": {
        "brandType": "GENERIC",
        "code": {
          "codings": [
            {
              "code": "00093913306",
              "display": "amiodarone 200 mg oral tablet",
              "system": "2.16.840.1.113883.6.69"
            }
          ],
          "text": "amiodarone 200 mg oral tablet"
        },
        "dosageForm": {
          "codings": [
            {
              "code": "C42998",
              "display": "TABLET",
              "system": "2.16.840.1.113883.3.26.1.1.2"
            }
          ],
          "text": "TABLET"
        },
        "route": {
          "codings": [
            {
              "code": "C38288",
              "display": "ORAL",
              "system": "2.16.840.1.113883.3.26.1.1.1"
            }
          ],
          "text": "ORAL"
        },
        "strength": {
          "unit": {
            "code": "C28253",
            "display": "mg",
            "system": "2.16.840.1.113883.3.26.1.1"
          },
          "value": "200"
        }
      }
    }
  ],
  "intendedAdministrator": "SELF",
  "intendedDispenser": "INPATIENT_FLOOR_STOCK",
  "notes": [
    {
      "author": {
        "aliases": [
          {
            "system": "2.16.840.1.113883.4.814",
            "type": "DEA",
            "value": "AD0869837"
          }
        ],
        "name": {
          "family": [
            "Brizendine"
          ],
          "formatted": "Brizendine, Margaret",
          "given": [
            "Margaret"
          ],
          "prefix": "Dr.",
          "suffix": "Jr."
        }
      },
      "date": "2018-01-23",
      "text": "patient is non-compliant"
    }
  ],
  "prescriber": {
    "aliases": [
      {
        "system": "2.16.840.1.113883.4.6",
        "type": "NPI",
        "value": "1831176692"
      }
    ],
    "name": {
      "family": [
        "Johnson"
      ],
      "formatted": "Johnson, Analisa",
      "given": [
        "Analisa"
      ],
      "prefix": "Dr.",
      "suffix": "Jr."
    }
  },
  "referenceDrug": {
    "brandType": "GENERIC",
    "code": {
      "codings": [
        {
          "code": "00093913306",
          "display": "amiodarone 200 mg oral tablet",
          "system": "2.16.840.1.113883.6.69"
        }
      ],
      "text": "amiodarone 200 mg oral tablet"
    },
    "dosageForm": {
      "codings": [
        {
          "code": "C42998",
          "display": "TABLET",
          "system": "2.16.840.1.113883.3.26.1.1.2"
        }
      ],
      "text": "TABLET"
    },
    "route": {
      "codings": [
        {
          "code": "C38288",
          "display": "ORAL",
          "system": "2.16.840.1.113883.3.26.1.1.1"
        }
      ],
      "text": "ORAL"
    },
    "strength": {
      "unit": {
        "code": "C28253",
        "display": "mg",
        "system": "2.16.840.1.113883.3.26.1.1"
      },
      "value": "200"
    }
  },
  "route": {
    "codings": [
      {
        "code": "738956005",
        "display": "Oral",
        "system": "2.16.840.1.113883.6.96"
      }
    ],
    "sourceCodings": [
      {
        "code": "738956005",
        "display": "Oral",
        "system": "urn:oid:2.16.840.1.113883.6.96"
      }
    ],
    "text": "Oral"
  },
  "sigDirections": "10 mg, 1 tab, Route: PO, Drug form: Tab, Daily, Start date: 04/13/18 9:00:00, Duration: 30 day, Stop date: 04/18/18 9:00:00.",
  "sourceIdentifier": {
    "dataPartitionId": "2e07f958-82fe-470b-871d-3f7227800a63",
    "id": "12345"
  },
  "start": "2018-04-13",
  "status": {
    "codings": [
      {
        "code": "55561003",
        "display": "Active",
        "system": "2.16.840.1.113883.6.96"
      }
    ],
    "sourceCodings": [
      {
        "code": "2550",
        "display": "Ordered",
        "system": "urn:cerner:coding:codingsystem:codeset:6004"
      }
    ],
    "text": "Active"
  }
}

GET /populations/{populationId}/patients/{patientId}/medications/{medicationId}

Retrieves a single medication for a given patient.

Parameters

Parameter In Type Required Default Description Accepted Values
patientId path string true N/A The ID of the patient. -
populationId path string true N/A The ID of the population. -
medicationId path string true N/A The unique ID of the medication for the patient. -

Response Statuses

Status Meaning Description Schema
200 OK OK Medication
400 Bad Request Bad Request Error
401 Unauthorized Unauthorized Error
403 Forbidden Forbidden Error
404 Not Found Not Found Error

Retrieve a List of Medications

Example Request:


require 'httparty' # Using HTTParty 0.16.2
require 'json'

headers = {
  'Authorization' => '<auth_header>',
  'Accept' => 'application/json'
}

result = HTTParty.get('https://cernerdemo.api.us.healtheintent.com/medication/v1/populations/1424e81d-8cea-4d6b-b140-d6630b684a58/patients/0f2fbbc9-7c18-45e0-a95e-89076c8a9581/medications', headers: headers)

print JSON.pretty_generate(result)


# You can also use wget
curl -X GET https://cernerdemo.api.us.healtheintent.com/medication/v1/populations/1424e81d-8cea-4d6b-b140-d6630b684a58/patients/0f2fbbc9-7c18-45e0-a95e-89076c8a9581/medications \
-H 'Authorization: {auth_header}' \
-H 'Accept: application/json'

Example response

{
  "items": [
    {
      "code": {
        "codings": [
          {
            "code": "11988",
            "display": "cefTRIAXone",
            "system": "2.16.840.1.113883.6.312"
          },
          {
            "code": "D00052",
            "display": "cefTRIAXone",
            "system": "13A955381FD04E238BEC48D851F04FF9"
          }
        ],
        "sourceCodings": [
          {
            "code": "11988",
            "display": "cefTRIAXone",
            "system": "2.16.840.1.113883.6.312"
          }
        ],
        "text": "cefTRIAXone"
      },
      "end": "2018-04-18",
      "frequency": {
        "codings": [
          {
            "code": "229797004",
            "display": "Once daily",
            "system": "2.16.840.1.113883.6.96"
          }
        ],
        "sourceCodings": [
          {
            "code": "696530",
            "display": "Daily",
            "system": "urn:cerner:coding:codingsystem:codeset:4003"
          }
        ],
        "text": "Daily"
      },
      "id": "f09385c8e68530e2227097cffb70e464437b6faf560ee3a8ffca84369291e2b8",
      "ingredients": [
        {
          "code": {
            "codings": [
              {
                "code": "00093913306",
                "display": "amiodarone 200 mg oral tablet",
                "system": "2.16.840.1.113883.6.69"
              }
            ],
            "sourceCodings": [
              {
                "code": "00093913306",
                "display": "amiodarone 200 mg oral tablet",
                "system": "2.16.840.1.113883.6.69"
              }
            ],
            "text": "amiodarone 200 mg oral tablet"
          },
          "dose": {
            "strength": {
              "unit": {
                "codings": [
                  {
                    "code": "258682000",
                    "display": "gram",
                    "system": "2.16.840.1.113883.6.96"
                  }
                ],
                "sourceCodings": [
                  {
                    "code": "263",
                    "display": "gm",
                    "system": "urn:cerner:coding:codingsystem:codeset:54"
                  }
                ],
                "text": "gm"
              },
              "value": "4"
            },
            "quantity": {
              "value": "2"
            },
            "volume": {
              "unit": {
                "codings": [
                  {
                    "code": "428673006",
                    "display": "coding-display",
                    "system": "2.16.840.1.113883.6.96"
                  }
                ],
                "sourceCodings": [
                  {
                    "code": "2207119100",
                    "display": "tabs",
                    "system": "urn:cerner:coding:codingsystem:codeset:54"
                  }
                ],
                "text": "tabs"
              },
              "value": "10"
            }
          },
          "referenceDrug": {
            "brandType": "GENERIC",
            "code": {
              "codings": [
                {
                  "code": "00093913306",
                  "display": "amiodarone 200 mg oral tablet",
                  "system": "2.16.840.1.113883.6.69"
                }
              ],
              "text": "amiodarone 200 mg oral tablet"
            },
            "dosageForm": {
              "codings": [
                {
                  "code": "C42998",
                  "display": "TABLET",
                  "system": "2.16.840.1.113883.3.26.1.1.2"
                }
              ],
              "text": "TABLET"
            },
            "route": {
              "codings": [
                {
                  "code": "C38288",
                  "display": "ORAL",
                  "system": "2.16.840.1.113883.3.26.1.1.1"
                }
              ],
              "text": "ORAL"
            },
            "strength": {
              "unit": {
                "code": "C28253",
                "display": "mg",
                "system": "2.16.840.1.113883.3.26.1.1"
              },
              "value": "200"
            }
          }
        }
      ],
      "intendedAdministrator": "SELF",
      "intendedDispenser": "INPATIENT_FLOOR_STOCK",
      "notes": [
        {
          "author": {
            "aliases": [
              {
                "system": "2.16.840.1.113883.4.814",
                "type": "DEA",
                "value": "AD0869837"
              }
            ],
            "name": {
              "family": [
                "Brizendine"
              ],
              "formatted": "Brizendine, Margaret",
              "given": [
                "Margaret"
              ],
              "prefix": "Dr.",
              "suffix": "Jr."
            }
          },
          "date": "2018-01-23",
          "text": "patient is non-compliant"
        }
      ],
      "prescriber": {
        "aliases": [
          {
            "system": "2.16.840.1.113883.4.6",
            "type": "NPI",
            "value": "1831176692"
          }
        ],
        "name": {
          "family": [
            "Johnson"
          ],
          "formatted": "Johnson, Analisa",
          "given": [
            "Analisa"
          ],
          "prefix": "Dr.",
          "suffix": "Jr."
        }
      },
      "referenceDrug": {
        "brandType": "GENERIC",
        "code": {
          "codings": [
            {
              "code": "00093913306",
              "display": "amiodarone 200 mg oral tablet",
              "system": "2.16.840.1.113883.6.69"
            }
          ],
          "text": "amiodarone 200 mg oral tablet"
        },
        "dosageForm": {
          "codings": [
            {
              "code": "C42998",
              "display": "TABLET",
              "system": "2.16.840.1.113883.3.26.1.1.2"
            }
          ],
          "text": "TABLET"
        },
        "route": {
          "codings": [
            {
              "code": "C38288",
              "display": "ORAL",
              "system": "2.16.840.1.113883.3.26.1.1.1"
            }
          ],
          "text": "ORAL"
        },
        "strength": {
          "unit": {
            "code": "C28253",
            "display": "mg",
            "system": "2.16.840.1.113883.3.26.1.1"
          },
          "value": "200"
        }
      },
      "route": {
        "codings": [
          {
            "code": "738956005",
            "display": "Oral",
            "system": "2.16.840.1.113883.6.96"
          }
        ],
        "sourceCodings": [
          {
            "code": "738956005",
            "display": "Oral",
            "system": "urn:oid:2.16.840.1.113883.6.96"
          }
        ],
        "text": "Oral"
      },
      "sigDirections": "10 mg, 1 tab, Route: PO, Drug form: Tab, Daily, Start date: 04/13/18 9:00:00, Duration: 30 day, Stop date: 04/18/18 9:00:00.",
      "sourceIdentifier": {
        "dataPartitionId": "2e07f958-82fe-470b-871d-3f7227800a63",
        "id": "12345"
      },
      "start": "2018-04-13",
      "status": {
        "codings": [
          {
            "code": "55561003",
            "display": "Active",
            "system": "2.16.840.1.113883.6.96"
          }
        ],
        "sourceCodings": [
          {
            "code": "2550",
            "display": "Ordered",
            "system": "urn:cerner:coding:codingsystem:codeset:6004"
          }
        ],
        "text": "Active"
      }
    }
  ],
  "firstLink": "https://cernerdemo.api.us.healtheintent.com/medication/v1/populations/1424e81d-8cea-4d6b-b140-d6630b684a58/patients/0f2fbbc9-7c18-45e0-a95e-89076c8a9581/medications?limit=20",
  "nextLink": "https://cernerdemo.api.us.healtheintent.com/medication/v1/populations/1424e81d-8cea-4d6b-b140-d6630b684a58/patients/0f2fbbc9-7c18-45e0-a95e-89076c8a9581/medications?cursor=f09385c8e68530e2227097cffb70e464437b6faf560ee3a8ffca84369291e2b8&limit=20"
}

GET /populations/{populationId}/patients/{patientId}/medications

Retrieves a list of the medications for a given patient.

Parameters

Parameter In Type Required Default Description Accepted Values
patientId path string true N/A The ID of the patient. -
populationId path string true N/A The ID of the population. -
cursor query string false N/A The last item on the list in the response from the previous request. If you specify this parameter, the response begins with the next item on the list. -
limit query integer(int32) false 20 The maximum number of results to display per page. The minimum limit is 1. The maximum limit is 100. -

Response Statuses

Status Meaning Description Schema
200 OK OK Medications
400 Bad Request Bad Request Error
401 Unauthorized Unauthorized Error
403 Forbidden Forbidden Error
404 Not Found Not Found Error

Schema Definitions

Medication

Name Type Required Description Accepted Values
code CodeableConcept false The identification of the medication that should be taken. The medication code can have varying degrees of specificity, ranging from being noncodified free text, a simple codified generic ingredient, a codified brand name, a pre-coordinated code that conveys the ingredient or brand name with its strength and dose form, to a HealtheIntent ontological concept. -
end string false The date the medication was ended or set to stop. In International Organization for Standardization (ISO) 8601 formatting with precision ranging from YYYY to YYYY-MM-DDThh:mm:ss.SSSZ. -
frequency CodeableConcept false The frequency, expected schedule, or timing of medication administration events. -
id string true The unique ID of the medication record. -
ingredients [Ingredient] true The ingredients of the medication. -
intendedAdministrator string false The intended administrator for the medication. The intendedAdministrator field can be used to distinguish between the administrator types. By using the intendedAdministrator field with the intendedDispenser field, you can infer certain information. For example, an inpatient medication would be dispensed from a hospital pharmacy and administered by a provider. PROVIDER, SELF
intendedDispenser string false The intended dispenser for the medication. The intendedDispenser field can be used to distinguish among the dispense types for the medication. By using the intendedDispenser field with the intendedAdministrator field, you can infer certain information. For example, an inpatient medication would be dispensed from a hospital pharmacy and administered by a provider. HOSPITAL_PHARMACY, INPATIENT_FLOOR_STOCK, OFFICE, OTC, RETAIL_PHARMACY, UNKNOWN
notes [ProviderNote] true The notes or comments associated with the medication. This can be used to understand why a decision was made or specific instructions regarding the medication. -
prescriber Provider false The ordering or prescribing provider for the medication. -
referenceDrug ReferenceDrug false A standardized drug used as a baseline measurement for similar drugs. -
route CodeableConcept false How the medication should enter the body, such as oral or topical. -
sigDirections string false Textual description of the dosage instructions, such as the dose per administration event, route, frequency, start date, and duration. -
sourceIdentifier SourceIdentifier true An ID that uniquely identifies this medication for a patient in the same data partition. -
start string false The date the medication was started or set to start. In ISO 8601 formatting with precision ranging from YYYY to YYYY-MM-DDThh:mm:ss.SSSZ. -
status CodeableConcept false The current status of the medication order or medication use, such as active, completed, discontinued, or on-hold. -

CodeableConcept

Name Type Required Description Accepted Values
codings [Code] false A list of codified values from standard code systems recognized by HealtheIntent. -
sourceCodings [Code] false The list of codified values provided in the source data. Not all of these codes are available in the codings list. For example, local or proprietary codes are not included on the codings list because they are not recognized by HealtheIntent. -
text string false This may be a localized or annotated description of the element provided by a source system or display text associated with one of the codes on the codings or sourceCodings list. -

Code

Name Type Required Description Accepted Values
code string false The unique identifier of the code. -
display string false A human-readable representation of the code. -
system string false The identifier of the coding system that gives meaning to the code. -

Ingredient

Name Type Required Description Accepted Values
code CodeableConcept false The identification of an ingredient in the medication that should be taken. The ingredient code can have varying degrees of specificity, ranging from being noncodified free text, a simple codified generic ingredient, a codified brand name, to a pre-coordinated code that conveys the ingredient or brand name with its strength and dose form. For simple medications that are comprised of a single ingredient or product, the ingredient code is the same as the medication code. However, for complex, multi-ingredient medications, the ingredient code differs from the medication code. For example, the medication code for a total parenteral nutrition (TPN) order indicates TPN, whereas the ingredient codes might include dextrose, potassium, magnesium, zinc, calcium, lipids, and multivitamins. -
dose Dose false The quantity, strength, and volume of the administered drug dose. -
referenceDrug ReferenceDrug false A standardized drug used as a baseline measurement for similar drugs. -

Dose

Name Type Required Description Accepted Values
strength Quantity false The dose strength of the medication ingredient. The dose strength can differ from the reference drug’s strength, which describes the strength of the drug itself. For example, a patient who is instructed to take two 20 mg tablets implies a reference drug strength of 20 mg, whereas the dose strength is 40 mg. -
quantity Quantity false The quantity of the medication ingredient, such as one tablet. -
volume Quantity false The volume of the medication ingredient, such as 500 mL. -

Quantity

Name Type Required Description Accepted Values
unit CodeableConcept false The unit of measure associated with the dose quantity. -
value string false The numerical value of the dose quantity. -

ReferenceDrug

Name Type Required Description Accepted Values
brandType string false Designates whether the drug is a brand-name or generic product. The designation is based on internal editorial rules and cost algorithms that are used to determine whether a multi-source drug is generic. BRAND, GENERIC
code Codings true The identification of the drug, often expressed using the National Drug Code (NDC) system. -
dosageForm Codings false The form of the medication in which it is marketed for use. -
route Codings false How the medication should enter the body, such as oral or topical. -
strength QuantityLite false The strength of this drug. This strength can differ from the ingredient’s dose strength, which defines the intended dose per administration event. For example, a patient who is instructed to take two 20 mg tablets implies a reference drug strength of 20 mg, whereas the dose strength is 40 mg. -

Codings

Name Type Required Description Accepted Values
codings [Code] true Identification of the drug often expressed using the NDC code system. -
text string false The date the medication was ended or set to stop. In International Organization for Standardization (ISO) 8601 formatting with precision ranging from YYYY to YYYY-MM-DDThh:mm:ss.SSSZ. -

QuantityLite

Name Type Required Description Accepted Values
unit Code false The unit of measure associated with the dose quantity. -
value string false The numerical value of the dose quantity. -

ProviderNote

Name Type Required Description Accepted Values
date string false The date when the note was recorded. This field can have precision ranging from YYYY to YYYY-MM-DDThh:mm:ss.SSSZ. -
text string false The textual content of the note or comment. -
author Provider false Provider who recorded the note or comment. -

Provider

Name Type Required Description Accepted Values
aliases [ProviderAlias] false A list of identifiers of the provider, such as the ten-digit National Provider Identifier (NPI) of the provider or the Drug Enforcement Administration (DEA) number of the provider. -
name ProviderName false The name of the provider. -

ProviderAlias

Name Type Required Description Accepted Values
system string false Authority responsible for assigning the identifier. -
value string false The value or identifier within the context of the assigning authority. -
type string false The type of alias. DEA, EXTERNAL, NPI, SL, TAX, UPIN

ProviderName

Name Type Required Description Accepted Values
prefix string false The prefix portion of the provider’s name; such as Mr., Mrs., Dr., etc. -
given [string] false A list of given name portions of the provider’s name. If a person has a first name and a middle name, the first name should be the first item in the list and the middle name should be the second item in the list. -
family [string] false A list of family (i.e. last) name portions of the provider’s name. Some may have multiple family names. -
suffix string false The suffix portion of the provider’s name; such as Jr., Sr., MD., RN., etc. -
formatted string false The fully formatted name. -

SourceIdentifier

Name Type Required Description Accepted Values
dataPartitionId string false The identifier of the source data partition. -
id string false The unique identifier for the entity in the data partition. -

Error

Name Type Required Description Accepted Values
code integer(int32) true Http response status code representing the error. -
message string true Human readable description of the error. -
errorDetails [ErrorDetail] false List of additional error details. -

ErrorDetail

Name Type Required Description Accepted Values
domain string false A subsystem or context where an error occurred. -
reason string false Codified value representing the specific error resulting in the current error status. -
message string false Human readable description of an error. -
locationType string false Location or type of the field that caused an error. query, header, path, formData, body
location string false Name of the field that caused an error. -

Medications

Name Type Required Description Accepted Values
items [Medication] true No description -
firstLink string true The first page of results. -
nextLink string false The next page of results. -