Question
· Jun 8, 2021

DTL Compile error involving invalid name

In a DTL to transform from HL7v2 to FHIR; select the code for the attending provider within a for each statement

<foreach property='source.AttendingClinicians()' key='st' >

<if condition='source.AttendingClinicians.(st).Code&apos;=""' >

<true>

<if condition='..In(source.AttendingClinicians.(st).IdentifierTypeCode ,"NPI","PNPI")' >

<true>

<trace value='source.AttendingClinicians.GetAt(st).Code' disabled='1' />

<assign value='source.AttendingClinicians.Code' property=' npicode' action='set' />

At compile get this error

Compilation started on 06/08/2021 21:30:03 with qualifiers 'k', using worker jobs Compiling class PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter Compiling routine PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1 ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+157) #1027: Error in SET command : 'npicode=source.AttendingClinicians.Code' : Offset:16 [zTransform+156^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: Try { Set npicode=source.AttendingClinicians.Code } ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+158) #1026: Invalid command : 'Catch' : Offset:10 [zTransform+157^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: Catch ex { If (..#IGNOREMISSINGSOURCE&&($$GetOneStatusText^%apiOBJ(ex.AsStatus())["<INVALID OREF>")) { Set tSC = 1 } Else { Set tSC=ex.AsStatus() } } ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+164) #1063: Invalid TRY statement : '}' : Offset:5 [zTransform+163^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: } ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+353) #1026: Invalid command : 'Catch' : Offset:8 [zTransform+352^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: } Catch thrownErr { ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+362) #1043: QUIT argument not allowed : '}' : Offset:11 [zTransform+361^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: Quit tSC } Detected 5 errors during compilation in 0.259s.

Retry by changing the setting to GetAt:

<foreach property='source.AttendingClinicians()' key='st' >

<if condition='source.AttendingClinicians.(st).Code&apos;=""' >

<true>

<if condition='..In(source.AttendingClinicians.(st).IdentifierTypeCode ,"NPI","PNPI")' >

<true>

<assign value='source.AttendingClinicians.GetAt(st).Code' property=' npicode' action='set' />

The green highlighted statement causes this error when compiling

Compilation started on 06/08/2021 21:16:15 with qualifiers 'k', using worker jobs Compiling class PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter Compiling routine PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1 ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+157) #1027: Error in SET command : 'npicode=source.AttendingClinicians.GetAt(st).Code' : Offset:16 [zTransform+156^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: Try { Set npicode=source.AttendingClinicians.GetAt(st).Code } ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+158) #1026: Invalid command : 'Catch' : Offset:10 [zTransform+157^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: Catch ex { If (..#IGNOREMISSINGSOURCE&&($$GetOneStatusText^%apiOBJ(ex.AsStatus())["<INVALID OREF>")) { Set tSC = 1 } Else { Set tSC=ex.AsStatus() } } ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+164) #1063: Invalid TRY statement : '}' : Offset:5 [zTransform+163^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: } ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+353) #1026: Invalid command : 'Catch' : Offset:8 [zTransform+352^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: } Catch thrownErr { ERROR: PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.cls(Transform+362) #1043: QUIT argument not allowed : '}' : Offset:11 [zTransform+361^PCPIPE.FHIR.DTL.SDA3.vR4.Encounter.Encounter.1] TEXT: Quit tSC } Detected 5 errors during compilation in 0.184s.

A similar error in a Case statement used the GetAt as a workaround but that should be fixed in this version. https://community.intersystems.com/post/dtl-editor-actions-persistentser...

Thanks for your thoughts.

Product version: IRIS 2020.3
Discussion (3)0
Log in or sign up to continue