FHIR Chat · Adding example mapping files to IG · IG creation

Stream: IG creation

Topic: Adding example mapping files to IG


view this post on Zulip Joee Garcia (Aug 31 2020 at 19:24):

I'd like to add an example in our IG that transforms one resource to another (ie. QuestionnaireResponse to a Bundle of Observations and Conditions). I already got a mapping file that successfully transforms the resources using the org.hl7.fhir.validator.jar. How should I include it my IG so it shows up in my examples list.

view this post on Zulip Grahame Grieve (Aug 31 2020 at 19:40):

what exactly do you want to show up in the examples list?

view this post on Zulip Joee Garcia (Aug 31 2020 at 22:29):

Ideal would be to have the StructureMap instance (converted from the .map file) added to the examples list and when this example is displayed in the IG, there is a way to view the actual or contents of the .map file (either shown in another tab or accessible from a link somewhere).

view this post on Zulip Grahame Grieve (Aug 31 2020 at 22:42):

so this should be as simple as simply adding the .map file as a resource and marking it as an example

view this post on Zulip Lloyd McKenzie (Aug 31 2020 at 23:10):

The publishing infrastructure will allow pointing to a .map file and will automatically parse it?

view this post on Zulip Grahame Grieve (Aug 31 2020 at 23:10):

it should. And I think I've already tested that

view this post on Zulip Oliver Egger (Sep 01 2020 at 08:16):

do you have an example somewhere? i tried it with the cda-fhir-maps ig and i fail with an NPE. I put the .map file instead of the structuremap and reference it in the same way from the IG resource (I moved the BundleToCda.map)? If the setup is correct I would offer to work on a PR.

view this post on Zulip Oliver Egger (Sep 01 2020 at 08:32):

@Joee Garcia what we do currently is to convert the map to a StructureMap resource and add it to the ig as a StructureMap resource e.g. cda-fhir-maps. We set up an online conversion, if you have VSCode / RESTClient you can adapt the scripts in here to convert the maps to a StructureMap.


Last updated: Apr 12 2022 at 19:14 UTC