Question
Eduardo Gonzále... · Jun 6, 2019

How to manage transformations with dynamic data types

Hi, i am trying to transform a mensage HL7 ORUR01. The  segmnet OBX.5 is dynamic and i'm calling  to subtranform item but fail.

this is the error:
ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zTransform+16 ^es.gra.informes.transformaciones.OBXToInforme.1 *GetSegmentAt,EnsLib.HL7.Segment -- - registrado como '-'
número - @'
Set zSrcOBJz=source.GetSegmentAt("5",.tSC1)'

<ORU_R01.OBSERVATION>
  <OBX>
    <OBX.1>1</OBX.1>
    <OBX.2>ED</OBX.2>
    <OBX.3>
      <CE.1>INFHEMAT</CE.1>
      <CE.2>INFORME HEMATOLOGIA</CE.2>
    </OBX.3>
    <OBX.5>
      <ED.1>
        <HD.1>1709265</HD.1>
      </ED.1>
      <ED.2>AP</ED.2>
      <ED.3>PDF</ED.3>
      <ED.4>Base64</ED.4>
      <ED.5>base64filedates</ED.5>
    </OBX.5>
    <OBX.11>F</OBX.11>
  </OBX>
</ORU_R01.OBSERVATION>

this is my code on parent transforme item

<if condition='source.{ValueType}="ED"' >
<true>
<subtransform class='es.gra.informes.transformaciones.OBXObservationsToInforme' targetObj='target' sourceObj='source.{5}' aux='1' disabled='1' /></true>
</if>
</transform>

subtransform class CODE:

Class es.gra.informes.transformaciones.OBXObservationsToInforme Extends Ens.DataTransformDTL [ DependsOn = (EnsLib.HL7.Segment, es.gra.informes.mensajes.Informe) ]
{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='EnsLib.HL7.Segment' targetClass='es.gra.informes.mensajes.Informe' sourceDocType='2.5:ED1' create='existing' language='objectscript' >
<assign value='source.{Data.SourceApplication.NamespaceID}' property='target.IdInforme' action='set' />
<assign value='source.{Data.DataSubtype}' property='target.Formato' action='set' />
<assign value='source.{Data.Data}' property='target.BASE64' action='set' />
</transform>
}

}

Thanks you very much

00
1 0 0 191
Log in or sign up to continue