Question
Kathy Ward · Oct 28, 2022

Maxstring Error for encoded pdf while using GetFieldStreamRaw

<assign value='source.{ORC:FillerOrderNumber}' property='target.{OBR:FillerOrderNumber}' action='set' />
<assign value='##class(%IO.FileStream).%New()' property='tempStream' action='set' />
<assign value='tempStream.Open(,"NEWR")' property='Status' action='set' />
<foreach property='source.{OBXgrp()}' key='g1' >
<foreach property='source.{OBXgrp(g1).OBX()}' key='s1' >
<if condition='source.{OBXgrp(g1).OBX(s1):ValueType} = "ED"' >
<true>
<assign value='SetID + 1' property='SetID' action='set' disabled='1' />
<assign value='"1"' property='target.{OBX(1):SetIDOBX}' action='set' />
<assign value='source.{OBXgrp(g1).OBX(s1):ValueType}' property='target.{OBX(1):ValueType}' action='set' />
<assign value='source.{OBXgrp(g1).OBX(s1):ObservationIdentifier}' property='target.{OBX(1):ObservationIdentifier}' action='set' />
<assign value='source.{OBXgrp(g1).OBX(s1):ObservationValue()}' property='target.{OBX(s1):ObservationValue()}' action='set' disabled='1' />
<assign value='"EPIPHANY"' property='target.{OBX(1):5.1}' action='set' />
<assign value='source.{OBR:UniversalServiceIdentifier.Text}' property='target.{OBX(1):5.2}' action='set' />
<assign value='"PDF"' property='target.{OBX(1):5.3}' action='set' />
<assign value='"BASE64"' property='target.{OBX(1):5.4}' action='set' />
<assign value='tempStream.Clear()' property='Status' action='set' />
<assign value='source.GetFieldStreamRaw(.tempStream,"OBXgrp("_g1_").OBX("_s1_"):5(1).5",.tRemainder)' property='Status' action='set' />
<code>
<![CDATA[ do tempStream.Rewind()]]></code>
<assign value='target.StoreFieldStreamRaw(tempStream,"OBX(1):ObservationValue",tRemainder)' property='Status' action='set' />
</true>
</if>
</foreach>
</foreach>
</transform>

Product version: IRIS 2021.1
0
1 217
Discussion (1)1
Log in or sign up to continue

Hi @Kathy Ward 
Are you trying to transform from HL7 2.x to HL7 2.x?
If that's the case you should be able to map the OBX()-5 from target to source.

Regards

Stuart