none
Count 2000A loops in 837P instance RRS feed

  • Question

  • I have an hipaa 837 processing project in biztalk 2010, and have one final business rule that I would like to add to my policy.  The 837P schema allows for more than one 2000A loop, but we want people submitting files to us to only include one.  I know I could modify the schema, but I would prefer to count loops and reject if more than one.  I have found a couple places online that show that you can create a vocabulary item that customizes both the xpath selector and the xpath field to produce a total count for node.  I have tried to use these, but when I test the policy with a document instance that has two 2000A loops, I seem to be getting back 0 for a count.  Here are the values I have for selector and field:


    /*[local-name()='X12_00401_837_P' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/X12/2006']


    count(/*[local-name()='X12_00401_837_P' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/X12/2006']/*[local-name()='TS837Q1_2010AA_Loop' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/X12/2006'])


    can anyone give me some pointers on where my syntax is wrong?  Again, just trying to get count of 2000A loops in a 837P instance...


    Mike Dugan
    • Moved by Ben Cline1Moderator Thursday, March 31, 2011 11:26 PM Related to EDI (From:BizTalk Server General)
    Thursday, March 31, 2011 3:18 PM

Answers

  • Do these xpath selectors work on the document itself?  BizBert XmlViewer is the best tool I've found to play around with this type of test; it's free.  Though you can also just use an XSLT in Visual Studio.  When I've had this problem it's normally been one of xpath query issues.

    Kind Regards,

    -Dan

    • Marked as answer by Mike J Dugan Thursday, March 31, 2011 3:54 PM
    Thursday, March 31, 2011 3:22 PM

All replies

  • Do these xpath selectors work on the document itself?  BizBert XmlViewer is the best tool I've found to play around with this type of test; it's free.  Though you can also just use an XSLT in Visual Studio.  When I've had this problem it's normally been one of xpath query issues.

    Kind Regards,

    -Dan

    • Marked as answer by Mike J Dugan Thursday, March 31, 2011 3:54 PM
    Thursday, March 31, 2011 3:22 PM
  • Dan

    You are the man!  This is a great utility in general, and copying/pasting xquery syntax from here into vocabulary definition window worked - my rule now acts as expected.  Again, Thanks!

     

     


    Mike Dugan
    Thursday, March 31, 2011 3:54 PM