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
Endpoints
Attributes
The identifier of the Medication
Text summary of the Medication, for human interpretation
Codes that identify this medication
Medication read
Read a Medication resource.
Path Parameters
Responses
Errors
Medication search
Search for Medication resources.
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.
Query Parameters
Search on the narrative of the Medication
Returns medications for a specific code
Only codes in the RxNorm code system can be searched with the code
search parameter.
Responses
Errors
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" } } ] }