Medication

This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.

http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-medication.html

Best practice is to utilize this endpoint to find codings to feed the Medication Statement Create/Update. These medications come directly from our integration with FDB.

get
/Medication/{id}

Medication read

Read a Medication resource.

Path Parameters

id required
string
The unique identifier for the Medication

Response Payload Attributes

resourceType
string

The FHIR Resource name.

id
string

The identifier of the Medication.

text
json

Text summary of the Medication, for human interpretation.

Click to view child attributes
status

All medications returned from this endpoint will show a status of generated since this resource is generated from FDB.

div

Limited xhtml content that contains the human readable text of the Medication.

code
json

Codes that identify this medication.

Click to view child attributes
coding
array[json]

Code defined by a terminology system.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://www.fdbhealth.com/
code
string

The code of the medication.

display
string

The display name of the coding.

Responses

200 OK
Request was successful.

Errors

401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.

Query Parameters

A Medication Search requires either a code or _text search parameter to perform.
_text
string

Performs a case insensitive partial search on the narrative of the Medication.

code

System url and code that identifies the medication formatted like
system_url|code.

Currently a search for an RxNorm code will return both branded and generic medications associated with the RxNorm code regardless of whether the RxNorm code is branded or generic.

For example, a search for the RxNorm code that represents the branded version of metformin will return a search bundle that contains at least two Medication resources – one for the branded version and one for the generic version. The branded and generic Medication resources in the search bundle can be differentiated by the presence or absence of the RxNorm code for the branded version in the list of codings.

Search Values Supported:
  • http://www.nlm.nih.gov/research/umls/rxnorm|code

Response Payload Attributes

resourceType
string

The FHIR Resource name.

type
string

This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .

total
integer

The number of resources that match the search parameter.

link
array[json]

Attributes relevant to pagination, see our Pagination page for more detail.

Click to view child attributes
relation
enum [self|first|next|last]

The relation of the page search

url

The search url for the specific relation

entry
array[json]

The results bundle that lists out each object returned in the search

Click to view child attributes
resource
json

The attributes specific to the resource type, see the Attributes section below

Attributes

resourceType
string

The FHIR Resource name.

id
string

The identifier of the Medication.

text
json

Text summary of the Medication, for human interpretation.

Click to view child attributes
status

All medications returned from this endpoint will show a status of generated since this resource is generated from FDB.

div

Limited xhtml content that contains the human readable text of the Medication.

code
json

Codes that identify this medication.

Click to view child attributes
coding
array[json]

Code defined by a terminology system.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://www.fdbhealth.com/
code
string

The code of the medication.

display
string

The display name of the coding.

Responses

200 OK
Request was successful.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Medication/<id>' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Medication/<id>"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "Medication",
        "id": "fdb-449732",
        "text": {
            "status": "generated",
            "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Tylenol PM Extra Strength 25 mg-500 mg tablet</div>"
        },
        "code": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "449732",
                    "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                },
                {
                    "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                    "code": "1092189",
                    "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                },
                {
                    "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                    "code": "1092378",
                    "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                }
            ],
            "text": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
        }
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "not-found",
          "details": {
            "text": "Unknown Medication resource 'fdb-399234'"
          }
        }
      ]
    }
    
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Medication?code=http://www.nlm.nih.gov/research/umls/rxnorm|1092189&_text=tylenol' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Medication?code=http://www.nlm.nih.gov/research/umls/rxnorm|1092189&_text=tylenol"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "Bundle",
        "type": "searchset",
        "total": 1,
        "link": [
            {
                "relation": "self",
                "url": "/Medication?code=http://www.nlm.nih.gov/research/umls/rxnorm|1092189&_text=tylenol&_count=10&_offset=0"
            },
            {
                "relation": "first",
                "url": "/Medication?code=http://www.nlm.nih.gov/research/umls/rxnorm|1092189&_text=tylenol&_count=10&_offset=0"
            },
            {
                "relation": "last",
                "url": "/Medication?code=http://www.nlm.nih.gov/research/umls/rxnorm|1092189&_text=tylenol&_count=10&_offset=0"
            }
        ],
        "entry": [
            {
                "resource": {
                    "resourceType": "Medication",
                    "id": "fdb-449732",
                    "text": {
                        "status": "generated",
                        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Tylenol PM Extra Strength 25 mg-500 mg tablet</div>"
                    },
                    "code": {
                        "coding": [
                            {
                                "system": "http://www.fdbhealth.com/",
                                "code": "449732",
                                "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                            },
                            {
                                "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                                "code": "1092189",
                                "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                            },
                            {
                                "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                                "code": "1092378",
                                "display": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                            }
                        ],
                        "text": "Tylenol PM Extra Strength 25 mg-500 mg tablet"
                    }
                }
            }
        ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "invalid",
          "details": {
            "text": "Bad request"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }