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

Attributes

id
string

The identifier of the Medication

text
json

Text summary of the Medication, for human interpretation

code
json

Codes that identify this medication

get
/Medication/{id}

Medication read

Read a Medication resource.

Path Parameters

id required
string
The unique identifier for the Medication

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

_text
string

Search on the narrative of the Medication

code
string

Returns medications for a specific code

Only codes in the RxNorm code system can be searched with the code search parameter.

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"
          }
        }
      ]
    }