none
Mapping the first occurance of condition RRS feed

  • Question

  • HI friends,

    I am mapping the 271 Inbound mapping.I am receiving the Multiple EB segment.

    Only I need to map the first occurrences of the Segment.

    EB*B*IND*30***29*200~

    EB*B*IND*88****3~

    EB*B*IND*91****3~

    EB*B*IND*92****1~

    EB*1*IND*MH~

    EB*1*IND*82~

    EB*1*IND*88~

    EB*R*IND*30~

    REF*18*098806799M

    Condition is if Eb1= B i need to Map EB7 value to copayment field.

    this scenario i need to map the value of 200.

    Thanks


    hk

    Wednesday, December 18, 2013 12:07 PM

Answers

  • To clarify, you want EB07 from the first EB where EB02=='B', not just the first EB.

    The problem is the Index functoid works just at the Record level, you can't apply a filter.  So, this is a little more difficult that it sounds.

    The easiest solution really is a bit of inline XSLT.

    The relative path would be "(/EB[/EB07='B'])[1]/text()" or similar.  You will have to edit for your namespace.

    • Marked as answer by Pengzhen Song Monday, December 30, 2013 1:07 AM
    Wednesday, December 18, 2013 3:11 PM

All replies

  • You should be able to use the following if I understand you correctly.

    From your looping node, add a link to an Iteration functoid. Then use an Equals functiod to check if the iteration is 1 (i.e. the first iteration in the loop), then add a link from the Equals functoid to your destination (or maybe do an AND with your condition mentioned above). Then you will only create the resulting node if the source is the first iteration.

    Wednesday, December 18, 2013 12:21 PM
  • To clarify, you want EB07 from the first EB where EB02=='B', not just the first EB.

    The problem is the Index functoid works just at the Record level, you can't apply a filter.  So, this is a little more difficult that it sounds.

    The easiest solution really is a bit of inline XSLT.

    The relative path would be "(/EB[/EB07='B'])[1]/text()" or similar.  You will have to edit for your namespace.

    • Marked as answer by Pengzhen Song Monday, December 30, 2013 1:07 AM
    Wednesday, December 18, 2013 3:11 PM
  • Hi Friends,

    I am able to XSLT for 271 inbound copay amount.But this is XSLT giving the first occurrence of subscriber loop.It not giving the all subscribers for copay amount.Any idea how do we need map all occurances for subscriber loop.

    <xsl:if test="(//*[local-name()='EB_SubscriberEligibilityorBenefitInformation'][EB01_EligibilityorBenefitInformation='B'])[1]/EB07_BenefitAmount/text()">
    <Co-PaymentAmount><xsl:value-of select="(//*[local-name()='EB_SubscriberEligibilityorBenefitInformation'][EB01_EligibilityorBenefitInformation='B'])[1]/EB07_BenefitAmount/text()"/></Co-PaymentAmount>
    </xsl:if>


    hk

    Tuesday, December 31, 2013 12:43 AM