Stream: implementers
Topic: Medication Graph
Mounika (Nov 28 2017 at 05:54):
Hi all, I need to capture Medication Graph based on patient's medication use. For example I want to calculate the medication use of 3 months, 6 months and 1 year. So how to get the Timeline using MedicationStatement resource,
And If we have multiple medications, how to group them?
Which coding system shall I use for getting all the Medications?
Thank you.
Jose Costa Teixeira (Nov 28 2017 at 07:55):
@Mounika K we are doing a profile on this topic so at least I am interested in following this.
Jose Costa Teixeira (Nov 28 2017 at 07:57):
If you want a graph (could also want a composition) then I would start with graphdefinition to define "this is for 6 months" and "this is for n years"
Jose Costa Teixeira (Nov 28 2017 at 07:58):
Starting point would be the patient
Jose Costa Teixeira (Nov 28 2017 at 08:00):
About duplication- this is one of our many reasons to add also the prescription and dispenses to our list - to check for duplicates and overlaps
Jose Costa Teixeira (Nov 28 2017 at 08:02):
What do you mean with coding system? You mean the medication codes (PZN , RxNorm...) If so, there is no right answer. IDMP is a good reference to embrace the problem but solution must be on the receiver side, and not on the interfaces
Jose Costa Teixeira (Nov 28 2017 at 08:05):
E.g. you can get in a list Paracetamol, Acetaminophen, Doliprane and Dafalgan. Reconciling that requires some magic :)
Mounika (Nov 28 2017 at 10:34):
@Jose Costa Teixeira Can you tell me how to group the medications using codes?
Jose Costa Teixeira (Nov 28 2017 at 10:35):
There is no easy way, esp. using only the codes.
Mounika (Nov 28 2017 at 10:37):
Okay. Is there any way to group them?
Jose Costa Teixeira (Nov 28 2017 at 10:37):
the idea is that if you know what codes mean (e.g. that Paracetamol and Acetaminophen have the same code, and that Doliprane and Dafalgan, in your context, are both medications taht contain Paracetamol , then you may do some "guesses"
Jose Costa Teixeira (Nov 28 2017 at 10:37):
if you have a prescription for Paracetamol and a dispense for Dafalgan and another dispense for Doliprane, then you may group.
Jose Costa Teixeira (Nov 28 2017 at 10:38):
what do you consider "grouping"? At the interfaces I defend we should not do any grouping unless you are talking about a summary.
Jose Costa Teixeira (Nov 28 2017 at 10:38):
if you give an example I may explain what I think
Mounika (Nov 28 2017 at 10:47):
Okay. Suppose we use the same medication two times. So how to show it in the graph?
Jose Costa Teixeira (Nov 28 2017 at 10:47):
aah
Jose Costa Teixeira (Nov 28 2017 at 10:51):
you mean if you have 2 statements with the same medication for one patient?
Mounika (Nov 28 2017 at 10:53):
yes
Jose Costa Teixeira (Nov 28 2017 at 10:54):
I'd expect you would simply get the 2 statements.
Jose Costa Teixeira (Nov 28 2017 at 10:55):
if you are aiming at removing duplicates or summing the quantities, i don't know if graph supports aggregation - I don't think so
Jose Costa Teixeira (Nov 28 2017 at 10:57):
is that your goal? summarizing the graph?
Jose Costa Teixeira (Nov 28 2017 at 11:06):
from what I understand about the problem, any "summarization" would not be a transport issue, but would be defined e.g. with an operation like "$aggregate" - but that business logic is not somethign that FHIR can decide.
Jose Costa Teixeira (Nov 28 2017 at 11:06):
e.g. FHIR cannot say if "doliprane" and "dafalgan" are the same - because they clinically have the same effect but they are 2 different products
Jose Costa Teixeira (Nov 28 2017 at 11:07):
and you cannot say that 3 different dispenses are just repeated repors or if it happened 3 times - it depends.
Mounika (Nov 28 2017 at 11:11):
if you have a prescription for Paracetamol and a dispense for Dafalgan and another dispense for Doliprane, then you may group.
@Jose Costa Teixeira Can you tell me how to group the Type of Medications? I did not understand.
Jose Costa Teixeira (Nov 28 2017 at 11:35):
it was an example: if you have this scenario, then using FHIR you could get 3 resources - the prescription and the 2 dispenses as separated, independent resources. Then you can present this to the user by saying "well, but actually these 2 dispenses are for a medication that in my catalog are "equivalent" to the medication that was prescribed, so i can assume these are 2 dispenses for that prescription.
Jose Costa Teixeira (Nov 28 2017 at 11:37):
that is what i meant with magic - it is a set of moving parts, and not one precisely determined formula
Jose Costa Teixeira (Nov 28 2017 at 11:55):
in short, on your questions:
So how to get the Timeline using MedicationStatement resource
- you may create a graphDefinition that selects medicationStatements for that patient, using linktarget.params (i think) to get only the last X months ,
And If we have multiple medications, how to group them?
You don't group on the graph. you take the results of the graph and use the codes or other attributes to group them on the UI
Which coding system shall I use for getting all the Medications?
Each medicationStatement can use their own code in their coding system. May be substances, may be products. So, either make sure that statements are using the same code system from your country, or you will need a machine that looks up a catalog do doing some clustering. but that is only on the user end.
Melva Peters (Nov 28 2017 at 15:11):
To group medications for display, you could you other kinds of codes that might be in a back end database provided by a drug knowledge base vendor such as the AHFS (American Hospital Formulary Systerm) Therapeutic Classifications and Sub-Classifications.
Jose Costa Teixeira (Nov 28 2017 at 15:13):
Ah yes, you can group by product or by classification.
Lloyd McKenzie (Nov 28 2017 at 16:49):
GraphDefinition isn't intended for this purpose. GraphDefinition is intended to describe interrelated sets of resources - it has nothing to do with rendering.
Mounika (Nov 30 2017 at 04:59):
To group medications for display, you could you other kinds of codes that might be in a back end database provided by a drug knowledge base vendor such as the AHFS (American Hospital Formulary Systerm) Therapeutic Classifications and Sub-Classifications.
@Melva Peters @Jose Costa Teixeira Can you tell me what is this classification and how we use it ?
Melva Peters (Nov 30 2017 at 13:42):
AHFS classification is a grouping of medications in the therapeutic categories - for example cardiovascular drugs or anti-infectives. It also gets more granular - for example, Antihypertensive drugs and then down to ACE Inhibitors. It may be a classification that is provided by a drug knowledge base vendor.
Jose Costa Teixeira (Nov 30 2017 at 13:46):
you can choose from a range of classifications - ATC is another (owned by the WHO)
Jose Costa Teixeira (Nov 30 2017 at 13:56):
http://ec.europa.eu/health/documents/community-register/html/atc.htm
Jose Costa Teixeira (Nov 30 2017 at 13:58):
@Mounika K note that Classifications are not the same as codes.
Classifications are groupings and not unique.
So for example there are drugs that do NOT have an ATC code, and there are drugs that have more than one ATC Codes.
Jose Costa Teixeira (Nov 30 2017 at 13:58):
We are hoping that IDMP brings some order there, but for now the grouping should be whatever-your-catalog-groups-by.
Mounika (Dec 01 2017 at 06:49):
Thank you @Melva Peters @Jose Costa Teixeira
Mounika (Dec 01 2017 at 13:32):
Hi @Jose Costa Teixeira how to map this group of medication classification to the MedicationStatement profile. I mean, Is there any valueset for getting all the medications codes?
Jose Costa Teixeira (Dec 01 2017 at 13:32):
nope.
Jose Costa Teixeira (Dec 01 2017 at 13:32):
if you mean a FHIR valueset resource instance with the medication codes - no.
Jose Costa Teixeira (Dec 01 2017 at 13:33):
i still would need an example of what you data you have and what goal you are trying to achieve.
Mounika (Dec 01 2017 at 13:34):
Yes. Then how to bind it to the MedicationStatement profile?
Jose Costa Teixeira (Dec 01 2017 at 13:34):
i don't know what you mean with medicationStatement profile
Jose Costa Teixeira (Dec 01 2017 at 13:35):
and i dont know what you mean by binding - you mean make a mandatory binding between the mediation.code and an ATC code?
Jose Costa Teixeira (Dec 01 2017 at 13:36):
the structured tree of medications is actually the problem we are trying to resolve with catalog
Mounika (Dec 04 2017 at 07:05):
Hello all, Can any one tell me how to get all the medication groups using MedicationStatement resource?
Lloyd McKenzie (Dec 04 2017 at 14:15):
What is a "medication group"?
Abbie Watson (Dec 05 2017 at 17:57):
We recently implemented this feature. Our timeline groups by any arbitrary field, so long as the string value in the field matches. So, it's just a matter of getting a list of Medication resources; which are presumably coded up in RxNorm or SNOMED CT Medication format and available in a MedicationStatement, checking the Medication.code.text
to get the displayed label, and then grouping by Medication.ingredient.$.itemCodeableConcept.text
. One could also do a crossreference to a RxNorm or SNOMED CT Medication data dictionary, and group by medication type or whatever else is available. Most of the time, we're just grouping by ResourceType.
Mounika (Dec 06 2017 at 09:10):
Hi @Abigail Watson what does ResourceType mean in this context?
Abbie Watson (Dec 06 2017 at 15:02):
Because we're using a general purpose timeline, which groups according to any field, our default view is to group by FHIR resource types across the Continuity of Care Document. So we group all the Allergies in one band, all the CarePlans in another, Conditions in a third, Medications, etc. So, our Medication Graph is a band within a larger graph which is grouping by ResourceType. But we can swap out grouping fields at any time, since it's a general purpose timeline.
Mounika (Dec 07 2017 at 12:44):
Okay @Abigail Watson But in our usecase we want to use RxNorm coding system for getting all the medication categories. In RxClass we have different classifications like ATC, MeSHPA, EPC etc.. How to attach all these categories to Medication resource?
Abbie Watson (Dec 07 2017 at 13:59):
You could use Medication.code.text
or Medication.code.coding.code
to store a reference to the RxNorm entry, and do a cross-reference; or you could use Medication.meta.tag.$.code
to tag the medication with the relevant categories, or use Medication.extension
and add custom fields to the resource.
Jose Costa Teixeira (Dec 07 2017 at 15:04):
Okay @Abigail Watson But in our usecase we want to use RxNorm coding system for getting all the medication categories. In RxClass we have different classifications like ATC, MeSHPA, EPC etc.. How to attach all these categories to Medication resource?
That is what EntryDefinition is supposed to answer, because this is part of the definition of a medication: which ATC code do we add,...
Mounika (Dec 08 2017 at 11:33):
@Jose Costa Teixeira I have gone through the content of EntryDefintion. What does Catalog mean?
Jose Costa Teixeira (Dec 08 2017 at 11:36):
http://build.fhir.org/catalog is a profile on composition - a document that bundles the definitions and relations between things.
Jose Costa Teixeira (Dec 08 2017 at 11:38):
for example where you say "in 2018, in this hospital, Acetaminophen 500 mg is available as Tylenol 500 and PainAway 500"
Jose Costa Teixeira (Dec 08 2017 at 11:38):
there you can relate "acetaminophen 500 mg" and the 2 brand names - these are 3 different entries with different identifiers.
Jose Costa Teixeira (Dec 08 2017 at 11:40):
As Lloyd sayd, you can actually have one medication (tylenol) that contains 2 codes (the code for tylenol and the code for acetaminophen)
Jose Costa Teixeira (Dec 08 2017 at 11:41):
here is one medication Graph:
Jose Costa Teixeira (Dec 08 2017 at 11:41):
Jose Costa Teixeira (Dec 08 2017 at 11:43):
(BTW, this is an example where "medication" and "medicine" matter: when you say "medication graph", i think of the graph of the medications for a patient. medicines graph is how they are defined as a graph of related entries.
Mounika (Dec 08 2017 at 13:08):
Okay @Jose Costa Teixeira Actually our problem is how to get the medication classifications ?
Jose Costa Teixeira (Dec 08 2017 at 14:37):
@Mounika you mean
a) system A tells system B: here are the values for ATC (like this but with FHIR resource http://ec.europa.eu/health/documents/community-register/html/atc.htm)
b) here is a list of commercially available products and corresponding ATCs
Mounika (Dec 13 2017 at 11:25):
Hello all,
When I get a Bundle of MedicationStatements for a particular patient, the bundle contains all group of medications. How can I segregate them?
Thank you.
Lloyd McKenzie (Dec 13 2017 at 15:46):
How are you wanting to segregate them? For what purpose?
Mounika (Dec 14 2017 at 05:59):
@Lloyd McKenzie Actually, I want to group the medications according to the organ or system, based on their Chemical structure, Disease and Physiologic Effects etc. And also want to get the individual groups.
Lloyd McKenzie (Dec 14 2017 at 15:35):
I'm not sure what "get the individual groups" means. Generally, MedicationRequests and MedicationStatements aren't going to include organ/system, chemical structure, etc. The best you can hope for is "indication" (reason) and that's not guaranteed to be present. If you want to organize information by the characteristics of the medication, you'll have to look up the code in an internal knowledge-base and then perform the grouping yourself. We're in the process of developing a resource (or set of resources?) that will allow exchanging IDMP and other drug knowledge information over FHIR and that will hopefully provide a way of conveying the knowledge you're looking for, though even then, FHIR doesn't provide a "group by" function - the best we have is "sort". If you need to convey drug knowledge in STU 3, you'll have to make use of extensions.
Abbie Watson (Dec 14 2017 at 17:15):
Okay @Abigail Watson But in our usecase we want to use RxNorm coding system for getting all the medication categories. In RxClass we have different classifications like ATC, MeSHPA, EPC etc.. How to attach all these categories to Medication resource?
You're just going to need to build your app to take care of it. Add an extension if you need to. Import some data dictionaries. Use the incoming data to do a cross references, and build up your categories from there.
Jose Costa Teixeira (Dec 14 2017 at 23:14):
... group the medications according to the organ or system, based on their Chemical structure, Disease and Physiologic Effects etc.
Smells like anatomical therapeutic chemical classification. And agree with @Abigail Watson - you will have to make your app. FHIR transports information, hopefully it transports the information you will need.
Mounika (Dec 18 2017 at 09:35):
... group the medications according to the organ or system, based on their Chemical structure, Disease and Physiologic Effects etc.
Smells like anatomical therapeutic chemical classification. And agree with @Abigail Watson - you will have to make your app. FHIR transports information, hopefully it transports the information you will need.
@Jose Costa Teixeira I want to bind all medication classifications to MedicationStatement ressource.Can you suggest me how to do that.
Jose Costa Teixeira (Dec 18 2017 at 10:03):
you bind the medication classifications to a medication, which in turn is contained/referenced by medication.
(the classification is an attribute of the medication, not the medicationStatement)
Jose Costa Teixeira (Dec 18 2017 at 10:05):
now, the issue is that medication resource does not support classification per se..
so you can either throw medication classification into medication.code (technically not correct and most likely breaking before real-life kicks in). Or make an extension. Or use an EntryDefinition (which has the classification, but perhaps is an overkill depending on your use case. I would add entryDefinition but I am biased on that one).
Mounika (Dec 18 2017 at 11:13):
Okay @Jose Costa Teixeira EntryDefinition resource is not available on Forge. If I want to take an extension what would be the datatype? and Can I use a Complex Extension?
Mounika (Dec 22 2017 at 12:18):
Hi all, I want to retrieve the medications for a particular period of time using MedicationStatement.effectivePeriod. How to get medications taken by the patient on startdate and enddate ?
Lloyd McKenzie (Dec 22 2017 at 17:17):
Something like this: MedicationStatement?effective=ge2017-01-01&effective=le2017-06-30
Lloyd McKenzie (Dec 22 2017 at 17:18):
That'll give you any meds that have an effective time that overlaps the period Jan 1 -> June 30, 2017
Mounika (Dec 26 2017 at 07:07):
Thank you @Lloyd McKenzie
Mounika (Dec 26 2017 at 13:14):
@Lloyd McKenzie I want to get the medications before start date and after end date. Shall I use "sa" , "eb" parameters. and
How to get the duplicate medications within the effective period?
How to retrieve "Deleted" medications?
How to retrieve "Absolete" medications?
Thank you.
Lloyd McKenzie (Dec 26 2017 at 16:55):
"sa" and "eb"?
To figure out what meds are duplicates, you'll need to do the analysis within your client system, figuring out what ingredients are in the various meds and looking at the times to figure out which are co-occurring. Deleted meds can't be retrieved unless you retrieve history. Medications don't have an "obsolete" status.
Mounika (Dec 27 2017 at 05:00):
"sa" means start after and "eb" means end before. I got it from this link https://www.hl7.org/fhir/search.html#prefix.
Okay @Lloyd McKenzie How to retreive history of meds?
Lloyd McKenzie (Dec 27 2017 at 17:04):
Cool. I didn't realize "sa" and "eb" had been added. So yes, you could use those. History is covered here: https://www.hl7.org/fhir/http.html#history
Mounika (Dec 28 2017 at 13:27):
@Lloyd McKenzie Can you give me an example query using "sa" and "eb".
Lloyd McKenzie (Dec 28 2017 at 14:35):
If you scroll down in the date search section, you'll see examples of the different parameter qualifiers and what effect they have.
Last updated: Apr 12 2022 at 19:14 UTC