Stream: implementers
Topic: Grouping multiple values into one in the mapping
Ivan Dubrov (Jan 10 2019 at 17:27):
I'm trying to figure out how to map ElementDefinition.type element between R3 and R4. It looks like for R3 -> R4, one needs to group all the values that have the same value of ".code" field and concatenate their "profile" and "targetProfile" into lists (in R4, ElementDefinition.profile and ElementDefinition.targetProfile are lists).
However, I don't really understand how can I do that in the mapping language. Out of the box maps for R3 -> R4 seem to be incorrect, they just copy that field as-is.
Grahame Grieve (Jan 12 2019 at 14:25):
hmm
Grahame Grieve (Jan 12 2019 at 14:39):
there is a way, for sure. I'll have a go later today
Ivan Dubrov (Apr 05 2019 at 18:21):
Any update? Currently R3 => R4 would produce invalid StructureDefinition's, I think, because it will not group things properly.
Grahame Grieve (Apr 05 2019 at 20:41):
see the code in org.hl7.fhir.convertors.VersionConvertor_30_40.convertTypeRefComponent in the java reference implementatoin
Ivan Dubrov (Apr 09 2019 at 22:05):
Right, but is it possible to do that via Mapping Language (https://www.hl7.org/fhir/mapping-language.html)?
Grahame Grieve (Apr 09 2019 at 22:19):
yes. see ... oh I see we have not published that in the spec....
Grahame Grieve (Apr 09 2019 at 22:22):
hmm. I think it is possible but I didn't do it. I'll review.
Last updated: Apr 12 2022 at 19:14 UTC