0

I'm currently looking into creating a FHIR DSTU2 extension. I need the extension to return a collection of values. What is the correct way to represent this in FHIR DSTU2?

Should it be a list of extensions within an extension:

"resource": {
    "resourceType": "Medication",
    "extension": [
        {
            "url": "http://www.myextension.com/strengths",
            "extension": [
                {
                    "url": "http://www.myextension.com/strength",
                    "valueStrength": "5mg"
                },
                {
                    "url": "http://www.myextension.com/strength",
                    "valueStrength": "20mg"
                }
            ]
        }
    ],
}

Or should it be one extension with a collection on the value?

"resource": {
    "resourceType": "Medication",
    "extension": [
        {
            "url": "http://www.emis-online.com/strengths",
            "valueStrengths": [
                    "5mg",
                    "20mg"
            ],
        }
    ],
}

Thanks.

1 Answers1

0

It would actually look like this:

"resource": {
"resourceType": "Medication",
"extension": [
    {
        "url": "http://www.myextension.com/strength",
        "valueString": "5mg"
    },
    {
        "url": "http://www.myextension.com/strength",
        "valueString": "20mg"
    }
]}

As well, it'd be better to use valueQuantity than valueString - to split the value and the unit.

That said, there's no reason to use an extension for drug strengths at all. Medication.product.ingredient.amount is strength - if the ingredient is an active ingredient. (I see that the resource doesn't currently allow distinguishing active from excipient ingredients, so I'd encourage raising a change request on that.)

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Cheers, I will look at the Quantity type again. I just wanted to represent a very simple example. The strength i'm representing is not the strength of the ingredients in the medication, but instead the recommended dosage strengths for the medication. So for example say Aspirin comes in 20mg tablets. We might send down recommended dosages of 20mg (whole tablet), 10mg (half a tablet), 5mg (quarter of a tablet) etc. – Mark Hebden Jun 04 '15 at 08:17
  • A recommended dose would typically also include a period of time. E.g. 20mg/day, 10mg/4 hours, etc. So you might consider Ratio. – Lloyd McKenzie Jun 05 '15 at 14:21
  • Oh, and this is something likely to be widely used, so you might submit a change request to have it defined as a "standard" extension :) – Lloyd McKenzie Jun 05 '15 at 14:22