Error in data transformation, HL7 message is only partially generated

102 views
Skip to first unread message

cjoh...@gmail.com

unread,
Aug 23, 2013, 2:51:04 PM8/23/13
to Ensemble-in...@googlegroups.com
Hey all,

I have been working on creating MFN^M16 HL7 messages populated with some values from a CSV file. The good news is that I get the messages to generate, and all the explicit set actions in the data transformation are performed (i.e. if I set MSH-11 to "2.6", it comes out that way on the generated message).

However, none of the set actions based on the source CSV data get applied to the message. I am not sure why this is occurring, but when I look in the contents of the trace from the business process to the business operation, I see the following error:

Build Map Status = 'ERROR <EnsEDI>ErrMapRequired: Missing required MFEgrp(1) element at segment 3'


So, it seems that I haven't initialized a required field of the message. But I'm not quite sure which one--what is segment 3 referring to? Is it attempting to reference a specific field?


I would appreciate any insight anyone has into the above error message as well as any guidance anyone can provide in troubleshooting this issue.


Thanks,


Cyriak

David Loveluck

unread,
Aug 23, 2013, 3:40:23 PM8/23/13
to Ensemble-in...@googlegroups.com

Look at the structure definition for MFN_M16 in the HL7 schema page.

 

If a group of segments are marked as repeating or optional we give it a group name based on the first segment in the group.

 

You will see that there is repeating group starting with the MFE segment so we call that group MFEgrp. Since this group is repeating and required, it expects to see that group of segments and doesn’t find it.

 

Segment 3 is exactly what it says – it is has got to the third segment (presumably you had MSH and MFI as the first 2) and it isn’t the start of the MFgrp. Or to be exact, it is expecting the first group so it would be called MFEgrp(1)

 

If it had found an MFE segment at segment 3 it would be referenced as MFEgrp(1).MFE.

 

As an odd twist, if a group is not marked optional, but all segments in the group are optional you still need the group. So at least one of the optional segments must be present. This occurred in several places in the earlier HL7 V2.n versions to much confusion

 

dave

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Lori Fassman

unread,
Aug 23, 2013, 3:58:33 PM8/23/13
to Ensemble-in...@googlegroups.com

Hi Cyriak,

 

Can you send us the code behind your transformation, or at least an excerpt where you handle the MFE group?  It looks like MFE and ITM are required segments – maybe there’s something funky about the syntax you’re using to create them.

 

Lori

 

 

From: Ensemble-in...@googlegroups.com [mailto:Ensemble-in...@googlegroups.com] On Behalf Of cjoh...@gmail.com
Sent: Friday, August 23, 2013 2:51 PM
To: Ensemble-in...@googlegroups.com
Subject: [InterSystems-EnsHlth] Error in data transformation, HL7 message is only partially generated

 

Hey all,

--

cjoh...@gmail.com

unread,
Aug 30, 2013, 10:35:55 AM8/30/13
to Ensemble-in...@googlegroups.com
Hi Lori,

Thanks for your message. I will post the DTL markup for the transformation below. I tried to set all the required fields based on what I found in the HL7 Schema Viewer for MFN^M16. Please let me know if you required any other information for diagnostic purposes.

Thanks,

Cyriak

Class TestInterfaces.MaterialsManagementCSVToHL7Test.TestTransformSpec Extends Ens.DataTransformDTL [ DependsOn = (Test.TestRecordMap.Record, EnsLib.HL7.Message) ]
{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl]
{
<transform sourceClass='Test.TestRecordMap.Record' targetClass='EnsLib.HL7.Message' targetDocType='2.6:MFN_M16' create='new' language='objectscript' >
<assign value='"MFN"' property='target.{MSH:MessageType.MessageCode}' action='set' />
<assign value='"M16"' property='target.{MSH:MessageType.TriggerEvent}' action='set' />
<assign value='"SendingProgram"' property='target.{MSH:SendingApplication}' action='set' />
<assign value='..CurrentDateTime()' property='target.{MFI:EffectiveDateTime}' action='set' />
<assign value='"ReceivingProgram"' property='target.{MSH:ReceivingApplication}' action='set' />
<assign value='"FacilityB"' property='target.{MSH:ReceivingFacility}' action='set' />
<assign value='"1"' property='target.{MFEgrp().NTE():SetIDNTE}' action='set' />
<assign value='"TEST"' property='target.{MFEgrp().NTE():Comment()}' action='set' />
<assign value='"D"' property='target.{MSH:ProcessingID}' action='set' />
<assign value='"2.6"' property='target.{MSH:VersionID}' action='set' />
<assign value='"SUP"' property='target.{MFI:MasterFileIdentifier}' action='set' />
<assign value='"ABC"' property='target.{MFI:FileLevelEventCode}' action='set' />
<assign value='"NE"' property='target.{MFI:ResponseLevelCode}' action='set' />
<assign value='source.PARTDESC' property='target.{MFEgrp().ITM:ItemDescription}' action='set' />
<assign value='source.PROVIDERITEMNUM' property='target.{MFEgrp().ITM:ItemIdentifier}' action='set' />
<assign value='"12"' property='target.{MFEgrp().VNDgrp().VND:SetIdVND}' action='set' />
<assign value='"ABCDE"' property='target.{MFEgrp().VNDgrp().VND:VendorIdentifier}' action='set' />
<assign value='"1234"' property='target.{MFEgrp().IVTgrp().IVT:SetIdIVT}' action='set' />
<assign value='"ABCDE"' property='target.{MFEgrp().IVTgrp().IVT:InventoryLocationIdentifier}' action='set' />
<assign value='"123"' property='target.{MFEgrp().IVTgrp().ILT():SetIdILT}' action='set' />
<assign value='"ABCDE"' property='target.{MFEgrp().IVTgrp().ILT():InventoryLotNumber}' action='set' />
<assign value='"12"' property='target.{MFEgrp().VNDgrp().PKGgrp().PKG:SetIdPKG}' action='set' />
<assign value='"12"' property='target.{MFEgrp().VNDgrp().PKGgrp().PCE():SetIDPCE}' action='set' />
<assign value='source.GHXATTRNOUN' property='target.{MFEgrp().ITM:ItemCategory}' action='set' />
<assign value='source.MFRNAME' property='target.{MFEgrp().ITM:ManufacturerIdentifier}' action='set' />
<assign value='source.MFRNAME' property='target.{MFEgrp().ITM:ManufacturerName}' action='set' />
<assign value='source.MFRPARTNUM' property='target.{MFEgrp().ITM:ManufacturerCatalogNumber}' action='set' />
<assign value='"MAD"' property='target.{MFEgrp().MFE:RecordLevelEventCode}' action='set' />
<assign value='"12345"' property='target.{MFEgrp().MFE:PrimaryKeyValueMFE()}' action='set' />
<assign value='"CE"' property='target.{MFEgrp().MFE:PrimaryKeyValueType()}' action='set' />
</transform>

}

}

On Friday, August 23, 2013 3:58:33 PM UTC-4, Lori Fassman wrote:

Hi Cyriak,

 

Can you send us the code behind your transformation, or at least an excerpt where you handle the MFE group?  It looks like MFE and ITM are required segments – maybe there’s something funky about the syntax you’re using to create them.

 

Lori

 

 

From: Ensemble-in...@googlegroups.com [mailto:Ensemble-in-Healt...@googlegroups.com] On Behalf Of cjoh...@gmail.com
Sent: Friday, August 23, 2013 2:51 PM
To: Ensemble-in...@googlegroups.com
Subject: [InterSystems-EnsHlth] Error in data transformation, HL7 message is only partially generated

 

Hey all,

 

I have been working on creating MFN^M16 HL7 messages populated with some values from a CSV file. The good news is that I get the messages to generate, and all the explicit set actions in the data transformation are performed (i.e. if I set MSH-11 to "2.6", it comes out that way on the generated message).

 

However, none of the set actions based on the source CSV data get applied to the message. I am not sure why this is occurring, but when I look in the contents of the trace from the business process to the business operation, I see the following error:

 

Build Map Status = 'ERROR <EnsEDI>ErrMapRequired: Missing required MFEgrp(1) element at segment 3'

 

So, it seems that I haven't initialized a required field of the message. But I'm not quite sure which one--what is segment 3 referring to? Is it attempting to reference a specific field?

 

I would appreciate any insight anyone has into the above error message as well as any guidance anyone can provide in troubleshooting this issue.

 

Thanks,

 

Cyriak

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com

To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com


For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.

To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healthcare+unsub...@googlegroups.com.

cjoh...@gmail.com

unread,
Sep 4, 2013, 1:05:13 PM9/4/13
to Ensemble-in...@googlegroups.com
Any advice on this issue? I've tried filling fields based on the 2.6 schema, and it's still not working. Only the MSH and MFI segments are coming over.

Thanks,

Cyriak

Lori Fassman

unread,
Sep 4, 2013, 1:52:17 PM9/4/13
to Ensemble-in...@googlegroups.com

Hi Cyriak,

 

I just got the same exact question from someone else, and the solution was plugging  1 into the empty parentheses in all the MFEgrp() references.  (In his case there wouldn’t be more than one MFEgrp(), so it was okay to hard-code it instead of putting it in a loop and using the counter instead of 1.)

 

cid:image004.jpg@01CEA8B0.E3EA59E0

 

Just to be safe, I also plugged 1 into some of the empty parens within repeating fields (e.g., PRA:Specialty(1)).

 

Let me know if that fixes your problem.

 

Lori

 

 

From: Ensemble-in...@googlegroups.com [mailto:Ensemble-in...@googlegroups.com] On Behalf Of cjoh...@gmail.com


Sent: Wednesday, September 04, 2013 1:05 PM
To: Ensemble-in...@googlegroups.com

--

You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com

To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com


For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.

To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.

image001.jpg

cjoh...@gmail.com

unread,
Sep 6, 2013, 3:45:56 PM9/6/13
to Ensemble-in...@googlegroups.com
Hi Lori,

Yes, that seems to have worked! I tried to do a little testing to narrow down what the fix entails. I think it's sufficient to replace MFEgrp() with MFEgrp(1). It seems to work without replacing the segments with parentheses under the group.

Thanks very much for your help. I am very happy that it's working now.

Thanks,

Cyriak

To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com


For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.

To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healthcare+unsub...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages