FHIR Chat · RDE_O11 to MedicationRequest and Medication · v2 to FHIR

Stream: v2 to FHIR

Topic: RDE_O11 to MedicationRequest and Medication


view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 18:37):

Hello!

I'm mapping RDE_O11 to MedicationRequest and Medication resources in FHIR STU3. I would appreciate it if someone could weigh in on what I'm presently doing. Questions in italics.

RXE-3, RXE-4, and RXE-5 (Give Minimum and Maximum and Units)

  • These map to either MedicationRequest.dosageInstruction.doseRange or MedicationRequest.dosageInstruction.doseQuantity depending on whether or not RXE-4 is populated.
  • For R4, these map to either MedicationRequest.dosageInstruction.doseAndRate.doseRange or MedicationRequest.dosageInstruction.doseAndRate.doseQuantity depending on whether or not RXE-4 is populated.

RXE-23 and RXE-24 (Give Rate Amount and Give Rate Units)

  • These map to either MedicationRequest.dosageInstruction.rateRange, MedicationRequest.dosageInstruction.rateRatio, or MedicationRequest.dosageInstruction.rateQuantity depending on the value of RXE-23 (I use regex to determine what's appropriate).
  • For R4, these map to either MedicationRequest.dosageInstruction.doseAndRate.rateRange, MedicationRequest.dosageInstruction.doseAndRate.rateRatio, or MedicationRequest.dosageInstruction.doseAndRate.rateQuantity depending on the value of RXE-23.

Note: Depending on the number of RXC segments provided, I map either a single- or multi-component medication (e.g. IV solutions). I map RXE-2 (Give Code) to Medication.code of a Medication that is referenced by MedicationRequest.medicationReference. RXC segments result in Medication resources, which are referenced by Medication.ingredient.itemReference of that first, top-level Medication.

Here's where I'm a little uncertain...

RXC-3 and RXC-4 (Component Amount and Component Units)

  • Should these be mapped to Medication.package.content.amount?
  • For R4, should these be mapped to Medication.amount?

RXE-25, RXE-26, RXE-33, and RXE-34 (Give Strength and Give Strength Volume and Units)

  • Is there a place for this in FHIR?
  • If not, I'm thinking of adding an extension with valueRatio to MedicationRequest.medicationReference to capture this. Would that be appropriate?

RXC-5, RXC-6, RXC-8, and RXC-9 (Component Strength and Component Strength Volume and Units)

  • Should these be mapped to Medication.ingredient.amount?
  • For R4, should these be mapped to Medication.ingredient.strength?

Thanks for any help you can provide.

For what it's worth, I understand that v2-to-FHIR mapping is incomplete for meds, and I'd be happy to share what I've got with whomever would benefit from it. : )

view this post on Zulip Lloyd McKenzie (Apr 03 2019 at 19:00):

The RXC components should map to Medication.ingredient. Strength is also handled with ingredient. Specifically, strength is the quantity of an 'active' ingredient. You shouldn't ever have a situation where there's both a give strength adn component strengths.

view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 19:09):

Hiya, @Lloyd McKenzie!

So a message will either either have RXE-25/26/33/34 or RXC-5/6/8/9 populated but not both?

In the second case, each component Medication would have it's own value in Medication.ingredient.amount (STU3).

In the first case, each component Medication would have the same value in Medication.ingredient.amount (STU3).

Is that correct?

view this post on Zulip Lloyd McKenzie (Apr 03 2019 at 19:18):

I think so. I can't think of a situation where it makes sense to convey both.

For RXE, I think you'd generally only have one ingredient that tyou'd talk about as I don't think RXE-25/26/33/34 deal well with drugs having multiple active ingredients (e.g. Tylenol 3s)

view this post on Zulip John Silva (Apr 03 2019 at 19:20):

@Diederik Muylwyk - I don't know about the FHIR mapping, but I think it's possible for an RDE message to have something, e.g. an 'active ingredient' in the RXE and additives (e.g. solutions like D5W, etc.) in the RXC components. I think I've also seen something like this for nutritional feeding, e.g. TPN. Maybe someone from Pharmacy could give some real use cases (and samples from the V2 world).

view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 19:31):

@John Silva, RXC-1 (RX Component Type) is generally used to distinguish base from additives. Of course, everyone's feed is a little different. : S

@Lloyd McKenzie, in my case I'm seeing RXE-25/26/33/34 populated with 0..* RXC segments, and those RXC segments generally do not have anything in RXC-5/6/8/9. Where I have multiple RXCs, would it be appropriate to populate all instances of Medication.ingredient.amount (STU3) with the same values based on RXE-25/26/33/34?

view this post on Zulip Lloyd McKenzie (Apr 03 2019 at 19:34):

If you've got multiple RXCs, those are each indicating a different ingredient. The 'strength' should be an ingredient quantity for only one ingredient. What you see in RXE is generally a ratio - e.g. 10 mg/mL. In RXC you've got a recipe - 10mL of this, 2g of that, etc. Because of the way ingredients combine, it's difficult to figure out what ingredient quantity will produce a particular strength unless you're ignoring everything other than the active ingredients.

view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 20:18):

Hmm. I'm not sure how to proceed. I'm going to share an example of what I'm dealing with, and how I think it should look. This is test data with no PHI/PI included. Does this make sense with respect to how I'm mapping RXE-25/26 and RXC-5/6?

Here's part of an RDE_O11 as it comes in:

...
RXE|^Continuous^^20180731170000^^STAT|^PANTOPRAZOLE INFUSION^ADS^^^^^^pantoprazole (use for PROTONIX) 80 mg in sodium chloride 0.9 % 100 mL (0.8 mg/mL) infusion|8||43^mg/hr|||||2|Each||123456789^SIMPSON^HOMER^J||||||||||10|mL/hr|0.8|3^mg||||STANDARD|^use for PROTONIX||1|1^mL||||||main^SMC CENTRAL PHARMACY
RXR|IV^Intravenous
RXC|A|05613^PANTOPRAZOLE 40 MG INTRAVENOUS SOLUTION^ADS|80|mg|2|Each|^use for PROTONIX
RXC|B|00407^100 ML BAG : SODIUM CHLORIDE 0.9 % INTRAVENOUS SOLUTION^ADS|80|mL|1|FC

Here it is after I've cleaned it up a bit (some terminology mapping, adding appropriate code systems, etc):

...
RXE|^Continuous^^20180731170000^^STAT|J7999^Compounded drug, not otherwise classified^http://argonaut.hl7.org/fhir/sid/hcpc^^^^^^pantoprazole (use for PROTONIX) 80 mg in sodium chloride 0.9 % 100 mL (0.8 mg/mL) infusion|8||mg/h^mg/h^http://unitsofmeasure.org|||||2|Each^DESCRIPTION REQUIRED^urn:hssc:srhs:epic:med:units||123456789^SIMPSON^HOMER^J||||||||||10|mL/h^mL/h^http://unitsofmeasure.org|0.8|mg^mg^http://unitsofmeasure.org||||STANDARD|^use for PROTONIX||1|1^mL||||||main^SMC CENTRAL PHARMACY
RXR|255560000^Intravenous^http://snomed.info/sct
RXC|A|05613^PANTOPRAZOLE 40 MG INTRAVENOUS SOLUTION^urn:hssc:srhs:ads:medicationcode|80|mg^mg^http://unitsofmeasure.org|2|Each|^use for PROTONIX
RXC|B|00407^100 ML BAG : SODIUM CHLORIDE 0.9 % INTRAVENOUS SOLUTION^urn:hssc:srhs:ads:medicationcode|80|mL^mL^http://unitsofmeasure.org|1|FC
    RXE-25/26 = 0.8|mg^mg^http://unitsofmeasure.org
1st RXC-5/6 = 2|Each
2nd RXC-5/6 = 1|FC

Here part of the resulting transaction bundle with a single MedicationRequest and three contained Medication resources (one for the RXE, and one apiece for the two RXCs):

{
  "fullUrl": "urn:uuid:b6748fb6-3e1f-4727-8375-f9d3a1ab34c8",
  "resource": {
    "resourceType": "MedicationRequest",
    "contained": [
      {
        "resourceType": "Medication",
        "id": "1",
        "code": {
          "coding": [
            {
              "system": "http://argonaut.hl7.org/fhir/sid/hcpc",
              "code": "J7999",
              "display": "Compounded drug, not otherwise classified"
            }
          ],
          "text": "pantoprazole (use for PROTONIX) 80 mg in sodium chloride 0.9 % 100 mL (0.8 mg/mL) infusion"
        },
        "ingredient": [
          {
            "itemReference": {
              "reference": "#2"
            },
            "isActive": true,
            "amount": {
              "numerator": {
                "value": 2,
                "unit": "Each"
              },
              "denominator": {
                "value": 1
              }
            }
          },
          {
            "itemReference": {
              "reference": "#3"
            },
            "isActive": false,
            "amount": {
              "numerator": {
                "value": 1,
                "unit": "FC"
              },
              "denominator": {
                "value": 1
              }
            }
          }
        ]
      },
      {
        "resourceType": "Medication",
        "id": "2",
        "code": {
          "coding": [
            {
              "system": "urn:hssc:srhs:ads:medicationcode",
              "code": "05613",
              "display": "PANTOPRAZOLE 40 MG INTRAVENOUS SOLUTION"
            }
          ]
        }
      },
      {
        "resourceType": "Medication",
        "id": "3",
        "code": {
          "coding": [
            {
              "system": "urn:hssc:srhs:ads:medicationcode",
              "code": "00407",
              "display": "100 ML BAG : SODIUM CHLORIDE 0.9 % INTRAVENOUS SOLUTION"
            }
          ]
        }
      }
    ],
    "identifier": [
      {
        "system": "urn:hssc:srhs:epc:medorderid",
        "value": "30926422"
      }
    ],
    "status": "active",
    "intent": "order",
    "medicationReference": {
      "reference": "#1",
      "extension": [
        {
          "url": "https:/example.org/fhir/ns/StructureDefinition/strength",
          "valueRatio": {
            "numerator": {
              "value": 0.8,
              "unit": "mg",
              "system": "http://unitsofmeasure.org",
              "code": "mg"
            },
            "denominator": {
              "value": 1
            }
          }
        }
      ],
    },
    "subject": {
      "reference": "urn:uuid:05816ff9-706a-448a-8414-678174b4f7f4"
    },
    "context": {
      "reference": "urn:uuid:240c8267-1f5d-4ae6-8c50-c768e287de7b"
    },
    "authoredOn": "2017-03-01T14:23:34-05:00",
    "requester": {
      "agent": {
        "reference": "urn:uuid:00355767-28e8-40ca-b75a-513b8ce1acb8"
      }
    },
    "dosageInstruction": [
      {
        "timing": {
          "repeat": {
            "boundsPeriod": {
              "start": "2018-07-31T17:00:00-04:00"
            }
          },
          "code": {
            "text": "Continuous"
          }
        },
        "route": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "255560000",
              "display": "Intravenous"
            }
          ]
        },
        "doseQuantity": {
          "value": 8,
          "unit": "mg/h",
          "system": "http://unitsofmeasure.org",
          "code": "mg/h"
        },
        "rateQuantity": {
          "value": 10,
          "unit": "mL/h",
          "system": "http://unitsofmeasure.org",
          "code": "mL/h"
        }
      }
    ],
    "dispenseRequest": {
      "quantity": {
        "value": 2,
        "unit": "DESCRIPTION REQUIRED",
        "system": "urn:hssc:srhs:epic:med:units",
        "code": "Each"
      }
    }
  },
  "request": {
    "method": "PUT",
    "url": "/MedicationRequest?identifier=urn%3Ahssc%3Asrhs%3Aepc%3Amedorderid%7C30926422"
  }
}

view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 20:59):

Oh, and this remains a question for me as well:

RXC-3 and RXC-4 (Component Amount and Component Units)

  • Should these be mapped to Medication.package.content.amount?
  • For R4, should these be mapped to Medication.amount?

view this post on Zulip Lloyd McKenzie (Apr 03 2019 at 22:35):

@Melva Peters @John Hatem @Scott Robertson Any thoughts how you'd interpret this?

view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 22:38):

Thanks, @Lloyd McKenzie. Apologies if that's too much to ask or inappropriate for this forum. : )

view this post on Zulip Lloyd McKenzie (Apr 03 2019 at 22:41):

Asking is always. Sometimes we'll direct you elsewhere. Sometimes we won't have the answers, but we'll try our best :)

view this post on Zulip Diederik Muylwyk (Apr 03 2019 at 22:42):

Appreciated. This is one of the better, more helpful tech-related communities in which I've participated. :D

view this post on Zulip Melva Peters (Apr 04 2019 at 01:19):

@Jean Duteau can you help with these questions?

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 11:29):

RXC-3 and RXC-4 (Component Amount and Component Units)
* Should these be mapped to Medication.package.content.amount?
* For R4, should these be mapped to Medication.amount?

Not sure for STU3. For R4 yes, medication.amount

RXE-25, RXE-26, RXE-33, and RXE-34 (Give Strength and Give Strength Volume and Units)
* Is there a place for this in FHIR?
* If not, I'm thinking of adding an extension with valueRatio to MedicationRequest.medicationReference to capture this. Would that be appropriate?

RXE-25... would be needed when you need to indicate a strength and that is not obtained from the medication reference. In FHIR you put that in the medication itself (amount). Why would you need that extension? Do you need to send anything that is not in the dosageInstruction and medication #1?

RXC-5, RXC-6, RXC-8, and RXC-9 (Component Strength and Component Strength Volume and Units)
* For R4, should these be mapped to Medication.ingredient.strength?

For R4, think so.

I think the Pharmacy group should review this.

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 11:29):

Also, I notice the "isActive" attribute - was it not agreed to change this to "role"? to support excipient, adjuvant, etc.?

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 11:31):

(@Diederik Muylwyk i think your extension lacks units on denominator, but that is not critical and I assume it is just an example)

view this post on Zulip Diederik Muylwyk (Apr 04 2019 at 13:58):

Hi, @Jose Costa Teixeira. Thanks for your response!

Not sure for STU3. For R4 yes, medication.amount

I'm confident then that it would be Medication.package.content.amount in STU3. This field was removed in R4 (rather, it appears to have been moved to Medication.amount). These fields in the two versions have the same description.

RXE-25... would be needed when you need to indicate a strength and that is not obtained from the medication reference. In FHIR you put that in the medication itself (amount). Why would you need that extension? Do you need to send anything that is not in the dosageInstruction and medication #1?

I'm not entirely sure I understand so I'll try to repeat this back to you in my own words. I'll use only R4 for clarity here. In the case of a multi-component medication (multiple RXC segments), I would have a top-level Medication based on RXE and 2..* component Medications referenced as ingredients.

  • RXE-25 should be mapped to Medication.amount of the top-level Medication.
  • RXC-5 should be mapped to Medication.ingredient.strength in the top-level Medication for the ingredient element that references this component Medication.
  • RXC-3 should be mapped to Medication.amount of the component Medication.

So a top-level Medication uses Medication.amount to capture strength whereas a component Medication (referenced as an ingredient of that top-level Medication) uses Medication.amount to capture amount. The same field is used for different purposes provided different context?

I think the Pharmacy group should review this.

Would #Medication be an appropriate stream for these questions? I'm not sure how to engage the Pharmacy group.

Also, I notice the "isActive" attribute - was it not agreed to change this to "role"? to support excipient, adjuvant, etc.?

I'm afraid I don't know anything about that. I only know Medication.ingredient.isActive from the spec.

i think your extension lacks units on denominator, but that is not critical and I assume it is just an example

This is simply an example. I'm already addressing that issue but don't need help with it.

Thanks again for all your help!

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 14:19):

package.content.amount should be the content in a package (20 tablets, 500 ml) hence my doubt

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 14:22):

So a top-level Medication uses Medication.amount to capture strength whereas a component Medication (referenced as an ingredient of that top-level Medication) uses Medication.amount to capture amount. The same field is used for different purposes provided different context?

Valid question. The descripption of the fields should be better in clarifying whether this is the intent. It seems so, and Pharma group should carify or confirm.

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 14:26):

Would #Medication be an appropriate stream for these questions? I'm not sure how to engage the Pharmacy group.

This stream should be ok. We summon them by calling them as Lloyd did. They will follow up. I wanted them to review my input, and look at ingredient.isActive (so that one was for them. not you).

view this post on Zulip Diederik Muylwyk (Apr 04 2019 at 14:35):

Okay, so are Medication.package.content.amount(STU3) and Medication.amount (R4) equivalent?

RXE-25... would be needed when you need to indicate a strength and that is not obtained from the medication reference. In FHIR you put that in the medication itself (amount). Why would you need that extension? Do you need to send anything that is not in the dosageInstruction and medication #1?

Perhaps I misunderstood. Which "medication itself (amount)" field are you referring to here?

Where in MedicationRequest.dosageInstruction would I put possibly put strength from RXE-25? (I already map RXE-3/4/5 to MedicationRequest.dosageInstruction.dose[x]).

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 14:43):

the amount field.

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 14:43):

in your example, what is the value you are missing and need to convey?

view this post on Zulip Scott Robertson (Apr 04 2019 at 16:47):

@Diederik Muylwyk, sorry I am joining this conversation late (<24hr is late!). I'm starting with the open points in your last exchange with @Jose Costa Teixeira. I will work back through the thread for additional open points. Let me know if there is a particular open point you would like me to address.

Yes, (STU3) Medication.package.content.amount is the same as (R4) Medication.amount. We collapsed the structure to resolve questions and requests after STU3

Regarding Amount: (v2.8) RDE-25 Give Strength is NOT the amount to give, it is the strength of the product to be given when RDE-2 Give Code does not include a strength.

  • If RDE-2 Give Code represents "Amoxicillin 250 mg capsule" then RDE-25 would not be populated.
  • RDE-2 representing "Amoxicillin" would require RDE-25 and RDE-26 Give Strength Units to be populated.

Since RDE-25 is a strength and not an amount, you would not map RDE-25 into MedicationRequest.dosageInstruction.

I will respond further as I review the thread

view this post on Zulip Diederik Muylwyk (Apr 04 2019 at 17:14):

Thanks, everyone. This is super helpful!

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 18:07):

I would like to see a standard way to handle dosageInstruction vs strength for extemporaneous preparations. If you say Amoxicilin 250 mg that is clear, but if you talk about infusions that need to be prepared, the strnght of the concentration is actually determined in the dosage instructions, right?

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 18:09):

overall, mind that V2 to FHIR mapping may not be clear, especially in areas where the models are different.
for Chapter 4 medication, there are lots of other differences - Order control codes for example.

view this post on Zulip Jose Costa Teixeira (Apr 04 2019 at 18:11):

My point being: for Mapping V2 to FHIR, best to check - is this information element useful and used, or it is already there?

view this post on Zulip Scott Robertson (Apr 04 2019 at 19:23):

RXE-25... would be needed when you need to indicate a strength and that is not obtained from the medication reference. In FHIR you put that in the medication itself (amount). Why would you need that extension? Do you need to send anything that is not in the dosageInstruction and medication #1?

I'm not entirely sure I understand so I'll try to repeat this back to you in my own words. I'll use only R4 for clarity here. In the case of a multi-component medication (multiple RXC segments), I would have a top-level Medication based on RXE and 2..* component Medications referenced as ingredients.

  • RXE-25 should be mapped to Medication.amount of the top-level Medication.
  • RXC-5 should be mapped to Medication.ingredient.strength in the top-level Medication for the ingredient element that references this component Medication.
  • RXC-3 should be mapped to Medication.amount of the component Medication.
    So a top-level Medication uses Medication.amount to capture strength whereas a component Medication (referenced as an ingredient of that top-level Medication) uses Medication.amount to capture amount. The same field is used for different purposes provided different context?

speaking only of R4

RXE-25 maps toMedication.ingredient.amount, if necessary. See my previous response.

This may be controversial, but I have a conceptual difference between v2.x RXC and Medication.ingredient. RXC, generally, provides a 'recipe' to create the final product, while Medication.ingredientdescribes the final product. So RXC has (1) a component product (RXC-2), (2) an amount of the component product (RXC-3/RXC-4), (3) the strength of the component product (RXC-5/RXC-6 and, if necessary RXC-8/RXC-9). On the other hand, Medication.ingredient describes the component product (Medication.ingredient.code) and the strength of the component (Medication.ingredient.strength) in the overall Medication. This may be a point for further discussion - I mention it as it is a basis for my responses. (I await any scathing rebuttals) :-)

With my conceptual difference in mind, the relationship between RXC and Medication.ingredient isn't a simple mapping.

{Amount [RXC-3 & RXC-4]} * {Strength [[RXC-5 & RXC-6] & [RXC-8 & RXC-9]]} = {Component quantity in final product}

{Component Quantity in final product} / {Final 'volume' of all Components} = {Component Strength} = Medication.ingredient.strength

Your suggestion that "RXC-3 should be mapped to Medication.amount of the component Medication" provides a means to reconcile my "conceptual" point with most of your requirements: Use Medication.ingredient.itemReference for v2-R4 mapping of RXC.

  • Each RXC gets it's own Medication resource
  • Medication.codecontains the coded component product. This maps to/from RXC-2.
  • Medication.amount contains the amount of the product in the overall preparation (e.g., I'm adding 25 ml of a 10 mg/ml product). This maps to/from RXC-3 & RXC-4.
  • Medication.ingredient.itemCodeableConcept contains either the same code in Medication.code (or a code for an ingredient of the ingredient?). This is a required element, so I have to put something in it.
  • Medication.ingredient.strength contains the strength of the component product (e.g., I'm adding 25 ml of a 10 mg/ml product). This maps to/from RXC-5 & RXC-6 and RXC-8 & RXC-9.

Again, I await responses (and scathing rebuttals)

More later if find more to comment on.

view this post on Zulip Scott Robertson (Apr 04 2019 at 19:26):

If there is consensus on my RXC mapping thought, I will look into how this can be reflected in the R4 Medication narrative

view this post on Zulip Jean Duteau (Apr 04 2019 at 19:28):

Does this change if you use the itemReference(Substance) and if we changed strength to be a choice between Ratio and Quantity? So you could say "125mg of calcium" instead of some strength?

view this post on Zulip Scott Robertson (Apr 04 2019 at 19:45):

If strength becomes a choice of Ratio or Quantity then we may have an issue of clarity between amount and strength (if strength is a Quantity, that would look like amount)

I think my logic will work with intemReference(Substance)

view this post on Zulip Diederik Muylwyk (Apr 04 2019 at 19:58):

Again, this is super helpful. My little standards-obsessed brain is buzzing. : )

@Scott Robertson's ideas are very much in line with my own.

What confuses me a little is the description for Medication.amount.

Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).

Is this the same as "the amount of the product in the overall preparation"?

I also need to make sure this works equally well for both single- and multi-component medications.

view this post on Zulip Jean Duteau (Apr 04 2019 at 20:00):

No, it is intended for when packaged products with different amounts are assigned the same code. The example injection is the normal use case where the code for the product is "Insulin glargine 100 unit per mL solution" but it comes in 3ml vials, 10ml vials, and 15ml vials.

view this post on Zulip Jean Duteau (Apr 04 2019 at 20:01):

The overall amount would be given in the resource that is referencing this medication.

view this post on Zulip Diederik Muylwyk (Apr 05 2019 at 16:47):

Quick thank you to @Lloyd McKenzie, @John Silva, @Melva Peters, @Jose Costa Teixeira, @Scott Robertson, and @Jean Duteau.

I've a working solution, and I know how to move forward. Thanks for your help!

view this post on Zulip David Hay (Apr 06 2019 at 03:43):

would be great to document this somewhere other than zulip...

view this post on Zulip Jose Costa Teixeira (Apr 06 2019 at 06:13):

IHE is planning to cover the medication workflows and since the IHE model started with V2, it makes sense to include some of the v2 mapping there as well

view this post on Zulip Jose Costa Teixeira (Apr 06 2019 at 06:29):

Will propose it to the work to be done.
But the meaning of each field in FHIR like Scott explained, and the clarification of things like amount, that should be in FHIR, not an IHE thing.

view this post on Zulip Scott Robertson (Apr 07 2019 at 18:02):

I don't think documenting this in FHIR will be practical. Most of what I said clarifies v2, not FHIR. The mapping documentation in FHIR doesn't support this kind of clarification. I welcome being told I'm missing a feature in FHIR documentation that will support this material (@Grahame Grieve @Lloyd McKenzie @Melva Peters )

I will think about what can help clarify the FHIR Medication resource documentation in this regard. But I don't want to put a lot of v2 specific material inside of FHIR.

view this post on Zulip David Hay (Apr 07 2019 at 18:14):

wasn't necessarily suggesting that it should be in FHIR - but mapping between FHIR and other standards will be common, so it seems reasonable to establish a place where summaries of discussions like this could be placed so it doesn't need to be repeated each time. perhaps fhir.org?

view this post on Zulip Hans Buitendijk (Apr 23 2019 at 12:10):

@Scott Robertson Best to start to document in the v2-to-FHIR confluence pages. We have pages for data types, segments/fields, and messages. When in the project we talk about "documenting on FHIR" we mean using the FHIR resource constructs that can express mapping. We then can point to that wherever relevant, such as the FHIR Mapping tabs, or the v2+ mapping tabs, or just on its own. The confluence pages are here: https://confluence.hl7.org/display/OO/2-To-FHIR+Project.

view this post on Zulip gauri raut (Dec 02 2021 at 10:12):

Looking for some assistance on RDE^O11 V2 to FHIR mapping. We are able to map fields of ORC segment to MedicationRequest as well as ServiceRequest resources. What would be the correct way of mapping ORC segment of RDE message to FHIR resources?

view this post on Zulip Craig Newman (Dec 02 2021 at 13:39):

The v2-to-FHIR project has begun a draft map of the RDE^O11 message type. The message map is at https://docs.google.com/spreadsheets/d/1j2sFqTxQe6Obg0R9UXurpLap0PglJQ-Gh3sfIehycNs/edit#gid=0 and the ORC to MedicationRequest map is at https://docs.google.com/spreadsheets/d/1PgXUqQBY77k21yZOBj3j132okiW2cv4l_4xrvcFTi7s/edit#gid=0. These are preliminary documents and haven't had any community review yet, so they are subject to change. We'd love to hear any feedback you have.

view this post on Zulip gauri raut (Dec 03 2021 at 07:37):

Thank you, @Craig Newman . I am able to access ORC to MedicationRequest map but not able access message map. Can you please provide an access for message map?

view this post on Zulip Craig Newman (Dec 03 2021 at 13:20):

@gauri raut please try the message map again. I just changed the sharing permissions so that as long as you have the link it should be accessible.

view this post on Zulip gauri raut (Dec 03 2021 at 14:49):

Hi @Craig Newman It is still not accessible

view this post on Zulip Craig Newman (Dec 03 2021 at 15:25):

@gauri raut please try one more time
https://docs.google.com/spreadsheets/d/1j2sFqTxQe6Obg0R9UXurpLap0PglJQ-Gh3sfIehycNs/edit?usp=sharing
If this still doesn't work, we may need to get Hans (who created the spreadsheet) to try and change it (I may not have permissions, although it appears that I should). Sorry for the delay.

view this post on Zulip gauri raut (Dec 03 2021 at 15:32):

Thank you @Craig Newman , I can access it now

view this post on Zulip gauri raut (Dec 10 2021 at 09:07):

Thank you, @Craig Newman @Hans Buitendijk for sharing mapping template. I am currently working on mapping ORC, TQ1 and RXO segments to MedicationRequest FHIR resource. As per HL7, we can receive quantity in below fields,

    1. ORC.7.1 - TQ.1 - Quantity
    2. TQ1.2 - Quantity (HL7 v2.5.1 onwards)
    3. RXO.2/RXO.3 - Requested Give Amount - Minimum/Maximum

In the mapping sheet all of the above fields are mapped with dosageInstruction.doseAndRate
TQ.1 - dosageInstruction.doseAndRate.doseQuantity
TQ1.2 - dosageInstruction.doseAndRate.doseQuantity
RXO.2 - dosageInstruction.doseAndRate[1].doseRange.low.value with type="ordered"
RXO.3 - dosageInstruction.doseAndRate[1].doseRange.high.value

As per usage note mentioned in the HL7 V2.8 guide(4A.4.1.2 RXO-2),Quantity in the TQ or TQ1 will always defaults to 1
"for pharmacy/treatment orders, the quantity component of the quantity/timing field refers to what is to be given out at each service interval; thus, in terms of the RX order, that first component always defaults to 1. Hence, in the actual execution of the order, the value of 1 in the first component of the quantity/timing field always refers to one administration of the amount specified in this field (the Requested Give Amount field)"

Need assistance to understand which quantity(either RXO.2 and RXO.3 or TQ1.2/TQ.1) should be considered as doseQuantity .
Thank you

view this post on Zulip Hans Buitendijk (Dec 10 2021 at 14:55):

@gauri raut : The ORC[MedicationRequest] map is still under construction, so appreciate the feedback. In v2 the concepts are separate, but in FHIR doseAndRate is 0..* within the Dosage data type, so both could be mapped to this data type component as separate instances for doseAndRate. When you consider that, would that fit? Or if you do that you need to know the difference that the doseAndRate type (currently an example) would not provide? We have not really gotten to this yet, so we would have to go to the Pharmacy workgroup to get insight into how they plan to maintain the distinction that HL7 v2 makes. @John Hatem , @Scott Robertson : This sounds like we want to get some insight from Pharmacy.

view this post on Zulip gauri raut (Dec 13 2021 at 05:43):

FHIR doseAndRate is 0..*.But below is the description of RXO.2 in HL7 guide(4A.4.1.2 RXO-2 Requested Give Amount - Minimum (NM) 00293)
"This field is not a duplication of the first component of the quantity/timing field, since in non-pharmacy/treatment orders, that component can be used to specify multiples of an ordered amount. Another way to say this is that, for pharmacy/treatment orders, the quantity component of the quantity/timing field refers to what is to be given out at each service interval; thus, in terms of the RX order, that first component always defaults to 1. Hence, in the actual execution of the order, the value of 1 in the first component of the quantity/timing field always refers to one administration of the amount specified in this field (the Requested Give Amount field)."

Looking at the above description, it seems quantity in ORC..7.1(TQ.1) and RXO.2 are not similar. And for RX order, first component always defaults to 1 in ORC..7.1(TQ.1), or TQ1.2. I am not sure if type would be able to differentiate between them. Any suggested values would be really appreciated.

@Hans Buitendijk @Aditya Joshi

view this post on Zulip Aditya Joshi (Dec 13 2021 at 07:52):

@Hans Buitendijk @gauri raut @Lloyd McKenzie

quoting V2.8 specification for RXO segment:
"A quantity/timing field is not needed in the RXO segment. The ORC segment contains the requested ORC-7-quantity/timing of the original order which does not change as the order is encoded, dispensed, or administered."

This suggests that ORC-7 timing is for the RXO segment. 

Non repeating ORC-7 or TQ1. There can be few scenarios: 

  1. ORC-7 + RXO :  Mapping ORC-7 (TQ data type) and RXO-2 & RXO-3 data to dosageInstruction. Here we can repeat the doseAndRate element to capture the quantity coming from both TQ.1 and RXO fields. 

  2. TQ.1 of ORC-7 will always be "1", therefore can ignore mapping this quantity to doseAndRate. This is the place not so clear, what are the usages or scenarios when it is not "1"

Repeating ORC-7 or TQ1:Now another issue- ORC-7 can repeat.

If it is repeated in the ORC segment, then how to proceed with mappings. Some scenarios when ORC-7 repeating (in RDE message where RXO is also there)-

  1. take first ORC-7 repetition and RXO-2 & RXO-3 fields and create one dosageInstruction, here repeat the doseAndRate to capture quantity from both TQ.1 and ORC. For all other repetitions, create separate dosageInstruction but no RXO field data there. 

  2. Only take first repetition of ORC-7 and ignore rest 

  3. Repeat each ORC-7 as a separate dosageInstruction and the RXO one as a separate one. No mixing. 
    Varying medications:Please note the RXO segment is not repeating in the RDE message. I am wondering what will be the real world use cases where we have multiple ORC-7 or TQ1 segments for one RXO segment. Is it like- take 2 tablets on the first day, followed by 3 tablets for the next 3 days (varying medication). In such cases, TQ1 or ORC-7 (first repetition) might have quantity as 1 to say that actual quantity for original order is in RXO segment and rest of the TQ1 or ORC-7 will provide the varying medications. 

Any examples on V2 side to see repeating ORC-7 or TQ1 for one RXO in RDE message? 

How to proceed for now- conclusion for now:
a. do you recommend to choose the method where each ORC-7 or TQ1 maps to separate dosageInstruction element and RXO field maps to separate dosageInstruction (in this case there won't be any timing for the dosageInstruction getting created from RXO segment)

b. My inclination for solution for now:
or take the first repetition of ORC-7 or TQ1 and RXO fields to create one dosageInstruction where doseAndRate can repeat to accommodate TQ.1 or TQ1-2,
AND, all other repetitions of ORC-7 or TQ1 will map to separate dosageInstructions with no RXO data.

I am inclined to use this and believe that probably ORC-7.1 or TQ1-2 (quantity) will be"1" for first repetition. If somebody from the V2 world can confirm that then we can ignore mapping  ORC-7.1 or TQ1-2 to doseAndRate at all and that will make the entire solution look good. 

Also, I feel that real world messages will mostly have only one repetition of ORC-7 or TQ1 segment and probably no quantity in it or if it is there then "1" value, in such cases opting for this solution will at least work for most of the real world V2 implementations. Any expert on V2 side can provide inputs here?

Looking forward for some guidance here.

view this post on Zulip gauri raut (Dec 14 2021 at 09:29):

Scott Robertson said:

RXE-25... would be needed when you need to indicate a strength and that is not obtained from the medication reference. In FHIR you put that in the medication itself (amount). Why would you need that extension? Do you need to send anything that is not in the dosageInstruction and medication #1?

I'm not entirely sure I understand so I'll try to repeat this back to you in my own words. I'll use only R4 for clarity here. In the case of a multi-component medication (multiple RXC segments), I would have a top-level Medication based on RXE and 2..* component Medications referenced as ingredients.

  • RXE-25 should be mapped to Medication.amount of the top-level Medication.
  • RXC-5 should be mapped to Medication.ingredient.strength in the top-level Medication for the ingredient element that references this component Medication.
  • RXC-3 should be mapped to Medication.amount of the component Medication.
    So a top-level Medication uses Medication.amount to capture strength whereas a component Medication (referenced as an ingredient of that top-level Medication) uses Medication.amount to capture amount. The same field is used for different purposes provided different context?

speaking only of R4

RXE-25 maps toMedication.ingredient.amount, if necessary. See my previous response.

This may be controversial, but I have a conceptual difference between v2.x RXC and Medication.ingredient. RXC, generally, provides a 'recipe' to create the final product, while Medication.ingredientdescribes the final product. So RXC has (1) a component product (RXC-2), (2) an amount of the component product (RXC-3/RXC-4), (3) the strength of the component product (RXC-5/RXC-6 and, if necessary RXC-8/RXC-9). On the other hand, Medication.ingredient describes the component product (Medication.ingredient.code) and the strength of the component (Medication.ingredient.strength) in the overall Medication. This may be a point for further discussion - I mention it as it is a basis for my responses. (I await any scathing rebuttals) :-)

With my conceptual difference in mind, the relationship between RXC and Medication.ingredient isn't a simple mapping.

{Amount [RXC-3 & RXC-4]} * {Strength [[RXC-5 & RXC-6] & [RXC-8 & RXC-9]]} = {Component quantity in final product}

{Component Quantity in final product} / {Final 'volume' of all Components} = {Component Strength} = Medication.ingredient.strength

Your suggestion that "RXC-3 should be mapped to Medication.amount of the component Medication" provides a means to reconcile my "conceptual" point with most of your requirements: Use Medication.ingredient.itemReference for v2-R4 mapping of RXC.

  • Each RXC gets it's own Medication resource
  • Medication.codecontains the coded component product. This maps to/from RXC-2.
  • Medication.amount contains the amount of the product in the overall preparation (e.g., I'm adding 25 ml of a 10 mg/ml product). This maps to/from RXC-3 & RXC-4.
  • Medication.ingredient.itemCodeableConcept contains either the same code in Medication.code (or a code for an ingredient of the ingredient?). This is a required element, so I have to put something in it.
  • Medication.ingredient.strength contains the strength of the component product (e.g., I'm adding 25 ml of a 10 mg/ml product). This maps to/from RXC-5 & RXC-6 and RXC-8 & RXC-9.

Again, I await responses (and scathing rebuttals)

More later if find more to comment on.

Hi @Diederik Muylwyk, Is this a final outcome you are following or any other thoughts?


Last updated: Apr 12 2022 at 19:14 UTC