This project has moved and is read-only. For the latest updates, please go here.

POI (present on admission) missing when parsing 837i?

Dec 23, 2012 at 7:11 PM
Edited Dec 23, 2012 at 7:12 PM

First, this X12 parser is an amazing resource and has saved me countless hours hacking away at EDI feeds.  Huge thanks to all contributors!

When parsing an 837i file, I see all my diagnoses, but no matter how I configure my source file, I never receive the POI to determine if the diagnosis was present upon admission.

My source file looks like this:

HI*BK:0340:::::::Y~

If I serialize the interchange, I see the POI code where I expect it to be:

<HI>
<!--Health Care Code Information-->
<HI01>
<HI0101>BF<!--Diagnosis (ICD-9)--></HI0101>
<HI0102>0340</HI0102>
<HI0103/>
<HI0104/>
<HI0105/>
<HI0106/>
<HI0107/>
<HI0108/>
<HI0109>Y</HI0109>
</HI01>
</HI> 

However, when I call Transform837ToClaimDocument, the POI field for my Diagnosis is always "Unknown".  

I've tried to step through the transformation process by debugging the source, but I'm having trouble finding where the POI field is populated.

Does anyone know what I'm missing here?

Thank you!

Dec 23, 2012 at 8:01 PM

I finally found where the transform is happening, in X12-837-To-ClaimDocument.xslt.  If I add a couple elements, I can interpret the PoiIndicator correctly:

  <xsl:template match="HI[HI01/HI0101='ABK' or HI01/HI0101='BK' or HI01/HI0101='ABJ' or HI01/HI0101='BJ' or HI01/HI0101='APR' or HI01/HI0101='PR' or HI01/HI0101='ABN' or HI01/HI0101='BN' or HI01/HI0101='ABF' or HI01/HI0101='BF']">
    <xsl:for-each select="child::*">
      <xsl:variable name="qualifier" select="*[1]"/>
      <xsl:variable name="code" select="*[2]"/>
      <xsl:variable name="poiIndicator" select="*[9]"/>
      <Diagnosis>
        <xsl:attribute name="Qualifier">
          <xsl:value-of select="$qualifier"/>
        </xsl:attribute>
        <xsl:attribute name="Code">
          <xsl:value-of select="$code"/>
        </xsl:attribute>
        <xsl:attribute name="PoiIndicator">
          <xsl:value-of select="$poiIndicator"/>
        </xsl:attribute>
      </Diagnosis>
    </xsl:for-each>
  </xsl:template>

Not sure though whether I'm still missing something, it seems strange that the POI attribute would be a member of the Diagnosis class without the corresponding transform happening out of the box....

Feb 17, 2013 at 7:52 PM
Thank you for catching this, it has been incorporated in changeset: http://x12parser.codeplex.com/SourceControl/changeset/23150.