Written by

MOD
Question Nicky Zhu · Sep 3, 2018

Why does a DT succeed in test while failed in run time

Hi, guys,

I've written a DT for a partner which transfers a csv file into SDA3. 

I', using record map to gather data from a folder storing csv files and using the DT to tranfer the records into sda3 entities.

The followings are the codes of that DT:

Class POC.DT.CSV2SDA3 Extends Ens.DataTransformDTL [ DependsOn = (User.PhysicalExam.Record, POC.SDA.Container) ]

{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]

{

}

}

POC.SDA.Container is a entity class inherited from HS.SDA3.Container, as below:

Class POC.SDA.Container Extends (%Persistent, %XML.Adaptor, HS.SDA3.Container)

{}

The I used test the DT in management portal, with the input:

<test>
<Record>
  <ExamNumber>1805030190021</ExamNumber>
  ...
  <UBadguanxing>0</UBadguanxing>
  ...
</Record>
</test>

The value of UBadguanxing will trigger the generation of labresult.

the result is as below:

<Container>
  <Patient>
    <MPIID>210304198510110216</MPIID>
    .....
  <LabOrders>
    <LabOrder>
      <PlacerId>TRDY</PlacerId>
      <Result>
        <ResultType>尿常规</ResultType>
        <ResultItems>
          <LabResultItem>
            <TestItemCode>
              <Code>bingliguanxing</Code>
              <Description>病理管型</Description>
            </TestItemCode>
            <ResultValue>0</ResultValue>
            <SubId>1</SubId>
            <ResultValueUnits>个</ResultValueUnits>
            <EncounterNumber>210304198510110216</EncounterNumber>
          </LabResultItem>
        </ResultItems>
        <EncounterNumber>210304198510110216</EncounterNumber>
      </Result>
      <Specimens>
        <Specimen>
          <EncounterNumber>210304198510110216</EncounterNumber>
          <SpecimenType>
            <Code>Urine</Code>
            <Description>尿</Description>
          </SpecimenType>
        </Specimen>
      </Specimens>
      <EncounterNumber>210304198510110216</EncounterNumber>
    </LabOrder>
  </LabOrders>
  <Action>AddOrUpdate</Action>
  <UpdateECRDemographics>true</UpdateECRDemographics>
  <SendingFacility>TRDY</SendingFacility>
</Container>

Please notice that the node LabOrder has content.

Then I used the production which reads a csv file into the record map and calling the dt , the same data was loaded into record map, but the output SDA file looks as below:

......

<LabOrders>
<LabOrder xsi:nil="true"></LabOrder>
</LabOrders>

......

LabOrder is Empty.

Any idea will be helpful. Thank you guys. 

Comments

Robert Cemper · Feb 24, 2022

Sorry ,
I assume this is out of date meanwhile.

0