FHIR Chat · profiles with mapping · shorthand

Stream: shorthand

Topic: profiles with mapping


view this post on Zulip John Moehrke (Dec 17 2020 at 23:31):

Is there support in FSH for defining mapping tables in a profile written in sushi?

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:31):

Nothing special. Just fill in the mapping elements.

view this post on Zulip John Moehrke (Dec 17 2020 at 23:32):

example? or explaination?

view this post on Zulip John Moehrke (Dec 17 2020 at 23:33):

or better... you have rights on the IHE github for MHD... can you do the mapping for FHIR List to XDS SubmissionSet?

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:33):

https://github.com/openhie/covid-ig/blob/master/input/fsh/who-cr-StructureDefinitionDataDictionary.fsh

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:34):

Oh, hold on, are you talking mappings in structure defs, or conceptmaps?

view this post on Zulip John Moehrke (Dec 17 2020 at 23:35):

right. mapping in a structureDefinition... NOT a conceptmap

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:35):

In my structure def:

* mapping[0].identity = "WhoCrDataDictionarySpreadsheet"
* mapping[0].name = "WHO CR Data Dictionary Spreadsheet 2020.2"
* mapping[1].identity = "LOINC"
* mapping[1].uri = $LNC
...
* differential.element[2].mapping[0].identity = "WhoCrDataDictionarySpreadsheet"
* differential.element[2].mapping[0].map = "report_date"
* differential.element[2].mapping[1].identity = "LOINC"
* differential.element[2].mapping[1].map = $LNC#77995-9

view this post on Zulip John Moehrke (Dec 17 2020 at 23:36):

but I am defining a profile, with constraints. I also want that to carry mappings to XDS

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:39):

So, for you...

* mapping[0].identity = "XDS"
* mapping[0].name = "Document Sharing Metadata (XDS)"
...
* differential.element[2].mapping[0].identity = "XDS"
* differential.element[2].mapping[0].map = "eventCodeList"

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:42):

It doesn't look like the mapping is intended to be computable, so you can enter in whatever text in the map element you need. I've also done a couple with multiple mappings for the same StructureDocument element:

* mapping[0].identity = "XDS"
* mapping[0].name = "Document Sharing Metadata (XDS)"
...
* differential.element[2].mapping[0].identity = "XDS"
* differential.element[2].mapping[0].map = "eventCodeList"
* differential.element[2].mapping[1].identity = "XDS"
* differential.element[2].mapping[1].map = "formatCode"

This shows as a comma separated list.

view this post on Zulip John Moehrke (Dec 17 2020 at 23:46):

okay. I will try.. but feel free to put in a pull request on MHD

view this post on Zulip Elliot Silver (Dec 17 2020 at 23:59):

Just let me know if you run into a snag.

view this post on Zulip Chris Moesel (Dec 18 2020 at 15:31):

So I guess that defining mappings is not a very well-known feature of FHIR Shorthand, but it is indeed a feature! And you don't have to use caret syntax to use it (although I noticed that @Elliot Silver's examples aren't using ^ either -- are those Instances of StructureDefinition rather than FSH Profiles? Because those examples definitely wouldn't work in a Profile: definition).

For information about FSH Mapping (and an example), see: http://hl7.org/fhir/uv/shorthand/reference.html#defining-mappings

view this post on Zulip Elliot Silver (Dec 18 2020 at 17:09):

@Chris Moesel , correct, I'm using an instance to define a logical model. I had forgotten about the mapping feature, but since I'm working with a LM, it wouldn't work for me anyhow.

view this post on Zulip John Moehrke (Dec 22 2020 at 15:07):

Thanks @Chris Moesel . I was not sure if this had been added. I had asked for it long long ago... I will give that a try.

view this post on Zulip John Moehrke (Dec 31 2020 at 13:03):

mapping is working excellent.

view this post on Zulip John Moehrke (Dec 31 2020 at 13:31):

I do have one problem... that mandatory extension... seems to disappear in the mapping. Not clear to me if this is sushi or IG build

view this post on Zulip John Moehrke (Dec 31 2020 at 16:15):

Note that when I add the extension to a profile as 1..* that extension shows up in mapping. But when I define mapping on a profile that has the extension at 0..; a profile derived off of that profile and that sets the cardinality to 1.. will no longer show the mapping for that extension. yet the profile with 0..* does show the mapping.

I think this is the IG build problem. My eyes say the structure definitions created are good. @Grahame Grieve let me know how I can help clarify. I use this for both Folders and SubmissionSets in the current MHD IG build https://github.com/IHE/ITI.MHD

view this post on Zulip Brian Kaney (Mar 10 2021 at 21:44):

Hi @Chris Moesel and others -- on Mappings (I am starting to use now!) how could I express that a certain target (let's say it's called rxnorm) is in FHIR medicationCodeableConcept.coding.code where medicationCodeableConcept.coding.system is http://www.nlm.nih.gov/research/umls/rxnorm?

Also, any idea on how to turn off (in the IG published output) the other Mappings? I just want to render the ones I specify in FSH?


Last updated: Apr 12 2022 at 19:14 UTC