FHIR Chat · extensions with mapping · implementers

Stream: implementers

Topic: extensions with mapping


view this post on Zulip Diego Bosca (Jul 14 2019 at 12:08):

Is it possible when I add an extension to a profile to provide a mapping for a given extended field? (as in 'the value for this extended field should come from this path'). I'm assuming it would end in the profile I'm attaching the extension to, but then it seems to me that mapping would refer to the parts already in the profile and not the extension itself

view this post on Zulip Lloyd McKenzie (Jul 14 2019 at 13:33):

No need for an extension. Profiles have a built-in ability to do mappings

view this post on Zulip Diego Bosca (Jul 14 2019 at 13:59):

I know, but the question is if I declare an extension in a profile (say, "ext1" with value "5") if I'm able to say with a mapping that the value should come from (or end into) a given path.
This could be interesting to define alternatives and knowing which constraint to apply.
In summary: the profile will be extended with a field and I want to somehow point that extended field to a given path in other standard

view this post on Zulip David Hay (Jul 14 2019 at 18:24):

Why doesn't ElementDefinition.mapping meet your need?

view this post on Zulip Diego Bosca (Jul 15 2019 at 06:45):

Probably does, I've found no example and I was wondering if it was because it wasn't legal

view this post on Zulip Diego Bosca (Jul 15 2019 at 11:06):

Does this snippet look good to you?

{
    "id":"Observation.component.value[x]:valueCodeableConcept.extension:myExt",
    "path":"Observation.component.valueCodeableConcept.extension",
    "sliceName":"myExt",
    "short":"My ext",
    "definition":"My ext in valueCodeableConcept",
    "min":"0",
    "max":"1",
    "type": [
        {
            "code":"Extension",
            "profile":"http://urltomyextensionprofile"
        }
    ],
    "mapping": [
                    {
                        "identity":"mymapping",
                        "map":"/path/to/mapping"
                    }
    ]
}

view this post on Zulip Lloyd McKenzie (Jul 15 2019 at 14:49):

So long as you've defined "mymapping" at the profile level, that should be ok.

view this post on Zulip Diego Bosca (Jul 15 2019 at 16:28):

Should be also Ok to provide a fixed[x]? (assuming it is compliant with the extension value[x]) e.g. fixedDecimal for valueDecimal

view this post on Zulip Lloyd McKenzie (Jul 15 2019 at 20:15):

Sure.


Last updated: Apr 12 2022 at 19:14 UTC