Written by

Technical Delivery Master at Deloitte
Question Michael Wood · Sep 18, 2023

Mapping error

I am mapping a field to the FHIR Location resource field address.line.  Using message class HS.FHIR.DTL.vR4.Model.Resource.Location

The line field is repeating

I set field as such,

This causes the error,

ERROR <Ens>ErrException: <INVALID OREF>zTransform+71^AH.AHEDSLPFD.Transforms.ReltioEntityToPFDFHIRLocation.1 -- logged as '-' number - @' If 'tIgnore { Set tSC=target.address.line.SetAt(zVALz,(1)) }'

Any suggestions on how I can format the target?

Product version: IRIS 2021.2

Comments

Ashok Kumar T · Sep 19, 2023

Hello @Michael Wood,

The line property is actually a list of string in address object property. So You should use direct Insert action instead of Set for that property when doing mapping in DTL for single values. If it's list/collection the you should foreach the list property and insert the values to the line() property. Refer the screenshots below for both scenarios.

Direct single Insert

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='CSVtoHL7.Inputfile.Record' targetClass='HS.FHIR.DTL.vR4.Model.Resource.Location' create='new' language='objectscript' >
<assign value='source.FirstName' property='target.address.line' action='insert' key='1' />
</transform>
}

List 

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='CSVtoHL7.Inputfile.Record' targetClass='HS.FHIR.DTL.vR4.Model.Resource.Location' create='new' language='objectscript' >
<foreach property='source.AddressLine()' key='k1' >
<assign value='source.AddressLine.(k1)' property='target.address.line' action='insert' key='k1' />
</foreach>
</transform>
}

result

0
Michael Wood  Sep 19, 2023 to Ashok Kumar T

Worked like a charm. Thanks Ashok

0