FHIR Chat · FHIR Mapping Language - Tutorial - Step#1 · implementers

Stream: implementers

Topic: FHIR Mapping Language - Tutorial - Step#1


view this post on Zulip Oliver Egger (Nov 21 2016 at 21:47):

newbie mapping question: should in step#1 of the mapping tutorial (http://build.fhir.org/mapping-tutorial.html) the element a be created with the rule
"rule_a" : for source.a as a make target.a = a
if target.a is not defined?

it works, if I provide an TRight as target with an a element and empty value
<TRight xmlns="http://hl7.org/fhir/tutorial"><a value="" /></TRight>,

but if I provide an empty TRight as a start without an element there is an error message returned.
<TRight xmlns="http://hl7.org/fhir/tutorial"></TRight>.

view this post on Zulip Grahame Grieve (Nov 22 2016 at 04:53):

where is the error message returned from?

view this post on Zulip Oliver Egger (Nov 22 2016 at 07:13):

org.hl7.fhir.dstu3.elementmodel.Element.setProperty - not done yet.
I adapted the StructureMapTests to use my TRight structuredefinition as a target and then feed that into the transform:

Element tright = Manager.build(TestingUtilities.context, tRight);
scu.transform(null, tleft, maps.get("http://hl7.org/fhir/StructureMap/tutorial"), tright);

It the element should be created, i will enhance the code, however I first wanted to know if that was the intended behaviour or if I understood it wrong.

view this post on Zulip Grahame Grieve (Nov 22 2016 at 09:06):

setProperty should be done. let me look into that


Last updated: Apr 12 2022 at 19:14 UTC