FHIR Chat · Mapping Engine · implementers

Stream: implementers

Topic: Mapping Engine


view this post on Zulip VP Herisse (Mar 01 2019 at 19:09):

I'm looking to map resources from DSTU2 to STU3.
Has anyone found a mapping engine that can take a FHIR map and execute this task?

view this post on Zulip Yunwei Wang (Mar 01 2019 at 19:17):

http://hl7.org/fhir/STU3/r2maps.html

view this post on Zulip Lloyd McKenzie (Mar 01 2019 at 19:56):

The FHIR Java validator (http://hl7.org/fhir/validator) includes a mapping engine. If you run the validator with no parameters, it'll provide instructions. (@Grahame Grieve are there instructions online anywhere?)

view this post on Zulip VP Herisse (Mar 01 2019 at 19:59):

Okay I will investigate that engine, thank you!

view this post on Zulip VP Herisse (Mar 01 2019 at 21:34):

Hi @Lloyd McKenzie ,

I tried running this:

java -jar org.hl7.fhir.validator.jar allergyintolerance-example.json -transform http://hl7.org/fhir/StructureMap/AllergyIntolerance2to3 -ig hl7.fhir.transforms.v2v3 -output R3resource.json

and received this error:

FHIR Validation tool Version 3.8.0-SNAPSHOT - Built 2019-02-09T15:30:00.249-05:00 - Git 53fa82582dda
Arguments: allergyintolerance-example.json -transform http://hl7.org/fhir/StructureMap/AllergyIntolerance2to3 -ig hl7.fhir.transforms.v2v3 -output R3resource.json
.. connect to tx server @ http://tx.fhir.org
.. definitions from hl7.fhir.core#4.0.0
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.newNode(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at java.util.HashSet.add(Unknown Source)
at org.hl7.fhir.utilities.xhtml.XhtmlParser.<init>(XhtmlParser.java:243)
at org.hl7.fhir.r4.formats.JsonParserBase.parseXhtml(JsonParserBase.java:210)
at org.hl7.fhir.r4.formats.JsonParser.parseNarrativeProperties(JsonParser.java:236)
at org.hl7.fhir.r4.formats.JsonParser.parseNarrative(JsonParser.java:225)
at org.hl7.fhir.r4.formats.JsonParser.parseDomainResourceProperties(JsonParser.java:1920)
at org.hl7.fhir.r4.formats.JsonParser.parseStructureDefinitionProperties(JsonParser.java:23484)
at org.hl7.fhir.r4.formats.JsonParser.parseStructureDefinition(JsonParser.java:23479)
at org.hl7.fhir.r4.formats.JsonParser.parseResource(JsonParser.java:27656)
at org.hl7.fhir.r4.formats.JsonParserBase.parse(JsonParserBase.java:113)
at org.hl7.fhir.r4.context.SimpleWorkerContext.loadFromFileJson(SimpleWorkerContext.java:262)
at org.hl7.fhir.r4.context.SimpleWorkerContext.loadDefinitionItem(SimpleWorkerContext.java:211)
at org.hl7.fhir.r4.context.SimpleWorkerContext.fromDefinitions(SimpleWorkerContext.java:199)
at org.hl7.fhir.r4.validation.ValidationEngine.loadDefinitions(ValidationEngine.java:321)
at org.hl7.fhir.r4.validation.ValidationEngine.loadInitialDefinitions(ValidationEngine.java:283)
at org.hl7.fhir.r4.validation.ValidationEngine.<init>(ValidationEngine.java:308)
at org.hl7.fhir.r4.validation.Validator.main(Validator.java:367)

Any ideas? Maybe my syntax is off?

view this post on Zulip Lloyd McKenzie (Mar 01 2019 at 21:36):

Nope, that sounds like a memory issue. First, make sure you're running the jar with a 64 bit version of Java. (To do the transformations, the validator first loads all of the FHIR structures and quite a bit of the terminologies, so you typically need a good chunk of memory). If that doesn't address the problem, you may need to increase the memory available to Java using one of the -Xm parameters

view this post on Zulip VP Herisse (Mar 01 2019 at 21:39):

Ah Excellent! thank you Lloyd!

view this post on Zulip VP Herisse (Mar 05 2019 at 21:41):

Hi @Lloyd McKenzie ,

I think I'm really close to having this work.

I've got this for a command:

java -jar org.hl7.fhir.validator.jar c:\temp\r3\patient.xml -version 3.0 -ig http://hl7.org/fhir/us/core -output c:\temp\outputPatient.xml -transform http://hl7.org/fhir/StructureMap/Patient3to4

Results:

FHIR Validation tool Version 3.8.0-SNAPSHOT - Built 2019-02-11T12:49:16.829-05:00 - Git 7a8671008476
Arguments: c:\temp\r3\patient.xml -version 3.0 -ig http://hl7.org/fhir/us/core -output c:\temp\outputPatient.xml -transform http://hl7.org/fhir/StructureMap/Patient3to4
.. connect to tx server @ http://tx.fhir.org
.. definitions from hl7.fhir.core#3.0.1
(v3.0.1)
+ .. load IG from http://hl7.org/fhir/us/core
... Using version 1.1.0
...Failure: null

Could it be failing because of this structure map url is returning a 404 not found?
http://hl7.org/fhir/StructureMap/Patient3to4

view this post on Zulip Lloyd McKenzie (Mar 05 2019 at 22:01):

That seems like a reasonable cause. Feel free to submit a change request to have the engine return a better message, but you'll definitely need to pass in a path to a transform that actually resolves :)

view this post on Zulip Grahame Grieve (Mar 06 2019 at 01:38):

it's not because of that....

view this post on Zulip Alexey Chistiakov (Apr 25 2019 at 12:28):

Hello! Do you have the implementation of engine of FHIR mapping language?

view this post on Zulip Lloyd McKenzie (Apr 25 2019 at 14:12):

The FHIR Validator includes an implementation

view this post on Zulip Alexey Chistiakov (Apr 25 2019 at 14:16):

Thank you so much!

view this post on Zulip Alexey Chistiakov (Apr 30 2019 at 12:06):

Hello!
We are planning R3/R4 Conversion and have some questions regarding ClaimResponse fields transformation described here: https://www.hl7.org/fhir/claimresponse-version-maps.html

1. ClaimResponse.outcome
Transition is described as follows:
src.outcome as vs then {
vs.coding as c then {
c.code where value in ('queued' | 'complete' | 'error' | 'partial') -> tgt.outcome;
};

Outcome field was a codeableConcept in R3 and became a code in R4. CodeableConcept is a list of Codings, so what will we get if we copy such list to a one variable? What if there are several codes which match the target codes (‘queued' | 'complete' | 'error' | 'partial') - which one will be chosen as tgt.outcome? What if there are no match at all ?

Currently, we are using claimStatus code set for .outcome (‘processed as primary’ | ‘secondary’ | ‘denied’ | ‘reversal’| ‘forwarded’) - could you suggest how can we convert to R4 in such case without loosing the initial .outcome value which is more reach than any target code?

2. In the old version of the resource .outcome field was optional but it became mandatory in R4. How can we do the switch to a new version of a resource if such a field does not exist in the old one?

view this post on Zulip Michele Mottini (Apr 30 2019 at 13:00):

What if there are no match at all ?

You can try to map the codes you have - eg ‘processed as primary’ -> 'complete'

Currently, we are using claimStatus code set for .outcome (‘processed as primary’ | ‘secondary’ | ‘denied’ | ‘reversal’| ‘forwarded’) - could you suggest how can we convert to R4 in such case without loosing the initial .outcome value which is more reach than any target code?

You can put it into an extension - but it will be something custom to your system

How can we do the switch to a new version of a resource if such a field does not exist in the old one?

You have to decide on a default value to use

view this post on Zulip Alexey Chistiakov (May 01 2019 at 08:31):

@Lloyd McKenzie
@Michele Mottini
Thanks a lot for useful information! By the way, I do not understand how I can convert the codeableConcept into code?

view this post on Zulip Lloyd McKenzie (May 01 2019 at 13:01):

Look through the Codings in the CodeableConcept and find the one that corresponds to the valueset for the target 'code'. If you find one, that's your code. If you don't find any, omit the element. Any extra Codings and CodeableConcept.text will need to be sent as extensions.

view this post on Zulip Alexey Chistiakov (May 01 2019 at 14:33):

@Lloyd McKenzie Thanks!

view this post on Zulip Anshu Nigam (Jun 23 2020 at 00:36):

I'm looking for FHIR Mapping engine, I know about Vonk/Firely. Is there any other stable engine available?
Thanks!

view this post on Zulip Lloyd McKenzie (Jun 23 2020 at 03:24):

There's one in the FHIR validator as well (https://wiki.hl7.org/Using_the_FHIR_Validator_to_transform_content)

view this post on Zulip Anshu Nigam (Jun 23 2020 at 16:29):

Thanks Lloyd, Is there any other Mapping Engine, which is commercially supported , support as API etc.?

view this post on Zulip Alexander Zautke (Jun 23 2020 at 17:33):

Out of curiosity, what are the criteria that you are looking for?

view this post on Zulip Anshu Nigam (Jun 23 2020 at 17:38):

Looking for FHIR mapping engine which can be called from FHIR server to translate custom objects to FHIR resource


Last updated: Apr 12 2022 at 19:14 UTC