none
Mapping problem, Will not loop on HL7 FT1 segment. RRS feed

  • Question

  • Input: 4 schemas one of those will have multiple records we will call that looping one FinancialLoop with a TableName of FINANCIAL, so this one is InputMessage1: FINANCIAL

     

    Output:  MSG_DFT_PO3

     

    I need the output to be a DFT_P03 with only one person at a time (so all segments out will only have 1 value, except for the FT1). (One to one for all  segments except ft1 is many to many.)

     

    The FT1 should make a new FT1 segment for ever record returned by the FinancialLoop, however I am not receiving any data out.  I purposely bugged my orchestration so I could put in a break and look at the incoming message.  I am receiving 10 rows for the input from the FINANCIAL TABLE.

     

    Any of the one to one (no looping) outputs properly.

    Even if I break every other mapping when I link my header FINANCIAL to the FT1 header by straight map or by using the looping functoid nothing is output.

     

    The rest of the map builds fine.

     

    I read an article that would make me think that you would tie the header of my input table to the <Sequence> above FT1, however the mapper does not allow for this only from the header of my input DB to the header of my output schema.

     

    Any help is appreciated. If I can't find an answer soon I am going to just hand write the DFT_P03 into XML and loadXML();

    Monday, September 29, 2008 12:02 PM

Answers

  • Hi,

     

    Custom XSLT is sometimes a good option here. You can either replace the whole map, or just a part of it, using the scripting functid.

     

    As it happens, I'm planning a webcast on custom XSLT mapping, I'll post a link if i get it done today.

     

    Regards,

     

    ALan

     

     

     

    Tuesday, September 30, 2008 11:13 AM
  •  

    My problem was I left the XMLDATA on the end of the stored procedure.

    I also think this is my problem when trying to create a sql adapter.

     

     

    When you create the original SQL adapter schema you need to keep the

     

    FOR XML AUTO, ELEMENTS, XMLDATA

    In the stored procedure or you will get a sql adapter error and have to copy and paste the select statement into the SQL adapter (since trying to use it as a stored proc will fail). The better way is to use the XMLDATA then remove it after.

     

    When you are completed with the sql adapter and you are ready to pull you need to remove the ",  XMLDATA" from the end.

     

    I was pulling the schema then the values (since I kept the xmldata on the end) which made the map which was created not work properly since the values were expected without the schema.

     

    Your answer is correct, just didnt pertain to this specific instance. I look forward to watching it

     

    Thank you for your time and repost the tutorial when your done.

    Tuesday, September 30, 2008 12:01 PM

All replies

  • Hi,

     

    Custom XSLT is sometimes a good option here. You can either replace the whole map, or just a part of it, using the scripting functid.

     

    As it happens, I'm planning a webcast on custom XSLT mapping, I'll post a link if i get it done today.

     

    Regards,

     

    ALan

     

     

     

    Tuesday, September 30, 2008 11:13 AM
  •  

    My problem was I left the XMLDATA on the end of the stored procedure.

    I also think this is my problem when trying to create a sql adapter.

     

     

    When you create the original SQL adapter schema you need to keep the

     

    FOR XML AUTO, ELEMENTS, XMLDATA

    In the stored procedure or you will get a sql adapter error and have to copy and paste the select statement into the SQL adapter (since trying to use it as a stored proc will fail). The better way is to use the XMLDATA then remove it after.

     

    When you are completed with the sql adapter and you are ready to pull you need to remove the ",  XMLDATA" from the end.

     

    I was pulling the schema then the values (since I kept the xmldata on the end) which made the map which was created not work properly since the values were expected without the schema.

     

    Your answer is correct, just didnt pertain to this specific instance. I look forward to watching it

     

    Thank you for your time and repost the tutorial when your done.

    Tuesday, September 30, 2008 12:01 PM
  •  

    Hi,

     

    >>I look forward to watching it

     

    Just finished it, it's online here:

    http://bloggersguides.net/media/p/22.aspx

     

    Regards,

     

    Alan

     

    Tuesday, September 30, 2008 7:39 PM
  • This file could not be viewed.

     

    Thursday, October 2, 2008 12:04 PM