Stream: implementers
Topic: Filtering Antibiotics from the MedicationRequest Resource
Aamir S (Dec 23 2020 at 21:56):
Hello everyone,
I was wondering if anyone has any suggestions on an efficient method to extract only the antibiotics from the MedicationResource? I'm new to FHIR, sorry if I missed something obvious!
I'm creating a SMART on FHIR application that needs to display only the antibiotics from a patient's MedicationRequest resource. So far I've been using an ML model (via a third party service) to achieve this task but it's far from ideal in terms of cost and processing time.
What I have are either the RxNorm codes or propriety Cerner codes and I what I do is run the text through the model and parse out the medication name from the prescription. I then run another ML model to obtain the appropriate RxNorm code. I would then call the RXNorm API and use the ATC (check if the code starts with "J01") and MeSH codes (via UMLS API) to check the "pharmacological action" attribute to help me classify if the drug is an antibiotic or not.
The problem I have is that the RxNorm codes associated with the entire prescription don't seem to have associated ATC or MeSH codes when I query the RxNorm API. For example, the RxNorm code (309114) for "Cephalexin 500 MG Oral Capsule" doesn't have any associated ATC or MeSH (at least I don't receive any when querying with the RxNorm API), but the RxNorm code (2231) for "Cephalexin" does have ATC and MeSH codes associated with it.
If anyone has any suggestions, I would really appreciate it! Thanks and I hope everyone has a happy (and safe) holiday season!
Warm regards,
Aamir
Lloyd McKenzie (Dec 23 2020 at 23:00):
There are two options - if the server supports it and there's a relationship between the ordered codes and a higher level term, you can search by code:below to find all codes that specialize the high level concept. Alternatively, you could search code:in and specify a value set that contains all of the relevant codes. However, you'd need the server to support that too.
@Jenni Syed do you know if Cerner's API supports either option? If not, can you propose alternatives?
Aamir S (Dec 24 2020 at 17:19):
Lloyd McKenzie said:
There are two options - if the server supports it and there's a relationship between the ordered codes and a higher level term, you can search by code:below to find all codes that specialize the high level concept. Alternatively, you could search code:in and specify a value set that contains all of the relevant codes. However, you'd need the server to support that too.
@Lloyd McKenzie Thank you for the suggestion! I had no idea that functionality existed (EHRs and FHIR are a new area for us), it is something we will need to seriously consider. We are currently developing a solution for a Cerner EHR customer, but the project will be made open source with goal of letting other healthcare organizations take advantage of it with their own FHIR (v. R4) compliant EHRs (with minimal modifications - fingers crossed).
Michele Mottini (Dec 24 2020 at 17:56):
Cerner MedicationRequest are not searchable by code: https://fhir.cerner.com/millennium/r4/medications/medication-request/#parameters
Michele Mottini (Dec 24 2020 at 18:01):
Not an expert, but I think you have first to navigate the taxonomy up: Cephalexin 500 MG Oral Capsule -> Cephalexin 500 MG -> Cephalexin
Aamir S (Dec 24 2020 at 18:53):
Michele Mottini said:
9:56 AM
Cerner MedicationRequest are not searchable by code: https://fhir.cerner.com/millennium/r4/medications/medication-request/#parametersNot an expert, but I think you have first to navigate the taxonomy up: Cephalexin 500 MG Oral Capsule -> Cephalexin 500 MG -> Cephalexin
@Michele Mottini Good find! I think you are right about the taxonomy part. I think I found another method that doesn't require traversing the heiarchy: (example for "Cephalexin 500 MG Oral Capsule" in a Node.js app):
let endpoint = `https://rxnav.nlm.nih.gov/REST/rxcui/309114/property.json?propName=SNOMEDCT`;
let rxNormResponse = await axios.get(endpoint);
// for simplicity, assume only one SNOMED code was retrieved for this example
snomedCode = rxNormResponse.data.propConceptGroup.propConcept[0].propValue;
let umlsAPI = `https://uts-ws.nlm.nih.gov/rest/content/current/source/SNOMEDCT_US/${snomedCode}/relations?includeAdditionalRelationLabels=plays_role&ticket=${authToken}`;
let results = await axios.get( umlsAPI);
console.log("results: ", results);
This gets me the "plays_role" attribute which has a value ("relatedIdName") of "Antibacterial therapeutic role".
If I don't find a Snomed code, I will probably need to traverse up the hierarchy as you've mentioned.
Peter Jordan (Dec 24 2020 at 21:26):
This requires some clinical input from the likes of @Russell Leftwich . TTBOMK, 'Antibiotic' is a drug /ingredient class (or function?) and, as such, there isn't a property in the Medication Resource that supports that concept. The appropriate FHIR Module is probably Medication Definition in R5 and Ingredient.function might be the appropriate element - but this needs to be confirmed by a SME.
Rik Smithies (Dec 24 2020 at 23:57):
Antibiotic is a function of the medicinal product as a whole rather than of the ingredient(s) themselves - though obviously the capability does derive from the ingredients. You can use MedicinalProductDefinition.classification for this.
Jose Costa Teixeira (Dec 26 2020 at 12:26):
Classification is an attribute of MedicationKowledge. I'd use that one, we don't need to go to the regulatory resources for that.
Peter Jordan (Dec 26 2020 at 19:31):
Thanks @Jose Costa Teixeira . MedicationKnowledge.medicineClassification.classification looks a good fit..."Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.)." Is an example terminology binding required for this element?
Melva Peters (Dec 26 2020 at 22:21):
There is a category on MedicationRequest that we've heard might be used to categorize the medicationrequest by medication type. http://build.fhir.org/medicationrequest-definitions.html#MedicationRequest.category
Patrick McLaughlin (NLM) (Dec 27 2020 at 14:13):
@Aamir You might be interested in the NLM RxClass API, which will traverse the hierarchy for you. https://rxnav.nlm.nih.gov/RxClassAPIs.html
Patrick McLaughlin (NLM) (Dec 27 2020 at 14:17):
https://rxnav.nlm.nih.gov/REST/rxclass/class/byRxcui.json?rxcui=309114&relaSource=MESH
Lin Yu Ju (Dec 28 2020 at 14:46):
Perhaps SNOMED CT concept's "parents" info could help ....... You can try that at their online browser tool. Take ceftriaxone for example. https://browser.ihtsdotools.org/?perspective=full&conceptId1=372670001&edition=MAIN/2020-07-31&release=&languages=en
Aamir S (Dec 30 2020 at 18:08):
Patrick McLaughlin (NLM) said:
You might be interested in the NLM RxClass API, which will traverse the hierarchy for you. https://rxnav.nlm.nih.gov/RxClassAPIs.html
@Patrick McLaughlin (NLM) Nice find, thank you! That will definitely simplify traversing the hierarchy compared to what I had in mind.
Aamir S (Dec 30 2020 at 18:20):
Thanks for the recommendations everyone! At present, only a small subset of FHIR resources (depending on the EHR vendor) are usually available for third party SMART on FHIR applications which is where I have been turning to third party APIs.
Going forward, I'm optimistic that FHIR resources such as MedicationKnowledge will be implemented by EHR vendors and available for use by third party SMART on FHIR applications. When they do become available, it will definitely help streamline the creation of more application specific use cases (in this case, an app to aid in prescribing a safe antibiotic for the patient).
Russell Leftwich (Jan 04 2021 at 19:10):
@Peter Jordan I would agree this concept needs to be captured. I would also point out that "antibiotic" has become such a superclass (compared to several decades ago when the term was introduced) that sub-classes based on mechanism of action and chemical identity should be captured. It would seem that this concept might be MedicationClassification in the MedicationKnowledge Resource
Rik Smithies (Jan 04 2021 at 19:29):
Or indeed the classification in the MedicinalProductDefinition resource - if that is available to you. I assume people would be looking at existing data sources where this may be recorded. In the EU all centrally authorised products will eventually have a FHIR MedicinalProductDefinition resource available, hosted by EMA. Other countries such as Norway are using the same concept. Equally you may have access to a local data set in MedicationKnowledge.
Last updated: Apr 12 2022 at 19:14 UTC