837 XSLT

Apr 8, 2013 at 3:27 PM
Edited Apr 8, 2013 at 3:27 PM
Is there an 837P/I/D XSLT already defined to convert to a flat file?

Thanx
Jim H
Coordinator
Apr 8, 2013 at 3:36 PM
There is currently some code in the OopFactory.X12.Hipaa assembly that will convert the x12 to a more user friendly object model for claims. See here: Claim Parser Usage.

To convert to a flat file you can traverse this object model to pick the elements you need.

Look at the code for the console app OopFactory.X12.Hipaa.ClaimParser to see how to use this library.
Apr 8, 2013 at 4:28 PM
Thanks for the quick response. I downloaded the source and opened it in VS 2012. I am not a C# programmer. I usually can figure things out. I don't see in the code where the transformation is done. Can you point me in the right direction. I apologize for not knowing the language.

Thanx
Jim H
Coordinator
Apr 9, 2013 at 7:57 PM
Are you familiar with SQL Server? I have just checked in some code that will import the results to a database. I still need to add a console app so you don't have to touch any C# code.
When I am done I will post the instructions on how to use the console app and a sample query to get at the data you need.
Apr 10, 2013 at 1:46 PM
Yes, We have SQL Server installed. Thanks for all your help. You are truly going above and beyond anything I expected. I did find the XSLT code and was trying to "figure it out". I can do that. It probably doesn't help that we don't have VS installed at the office.
Thanx
Jim H
Apr 15, 2013 at 8:00 PM
I think I figured out the XSLT. However, when I tried to execute I'm not getting the results from my changes. It appears to be using the original x12-837-to-claimdocument.xslt. I did a build on oopfactory.x12.hippa and oopfactory.x12.hipaa.claimparser. I checked that the references are pointing to my xslt. What am I missing?

Thanx
Jim H
Apr 17, 2013 at 11:20 AM
Edited Apr 17, 2013 at 11:21 AM
Just to test my changes I added additional elements to the PAT segment and ran my changes. It looks like this PAT/19////D8/20130101/01/125/Y~. Slashes instead of asterisk. My coding looks like this <Relationship>
      <xsl:attribute name="Code">
        <xsl:value-of select="../PAT/PAT01"/>
      </xsl:attribute>
      <xsl:attribute name="DateofDeath">
            <xsl:value-of select="concat(substring(../PAT/PAT06,1,4),'-',substring(../PAT/PAT06,5,2),'-',substring(../PAT/PAT06,7,2))"/>
      </xsl:attribute>
      <xsl:attribute name="PatientWeight">
           <xsl:value-of select="../PAT/PAT08"/>
      </xsl:attribute>
        <xsl:attribute name="PregnancyIndicator">
          <xsl:value-of select="../PAT/PAT09"/>
        </xsl:attribute>
    </Relationship>
The only output I get is the PAT01 "Code".

Why?

I know this isn't an XSLT/XML forum. But I'm figuring the people here know more about the EDI and the X12Parser than anywhere else.
Thanx
Jim H
Coordinator
Apr 17, 2013 at 1:01 PM
Within the Visual Studio IDE, if you have your XSLT in the edit window, you will have an XML menu where you can run your xslt, after you set the Input in the properties window to the XML file created by the raw x12 parser. This will let you test your XSLT.

Other than that you also need to know that Visual Studio spits it's code out to a bin\Debug or bin\Release folder depending on what Configuration you compiled in. Make sure you are running what you really did compile and not the original compilation. (or just run in the development environment using the command arguments from the Project's property windows).
Apr 17, 2013 at 1:44 PM
Thanks for the information. I did read online about testing the XSLT in VS IDE. I did figure out the Debug/Release feature. I've made sure i was running my version rather than the one downloaded. I have learned quite a bit in the last few days. Can be frustrating though! I will let you know what I find...or don't.

Thanx
Jim H
Apr 18, 2013 at 1:19 AM
Ok, I've been at this for awhile. When I run the test stream with x12parser the output XML has my data parsed correctly. When I try to run the oopfactory.x12.hipaa.claimparser, the output XML does NOT have my data parsed. When I Debug my XSLT with the XML from x12parser, the output XML is correct. I'm confused! Again.
The other issue I have is executing the oopfactory.x12.hipaa.claimparser. I've read the documentation and I still have trouble executing from the command prompt. Example: oopfactory.x12.hipaa.claimparser "h:\release\test837p.txt" "." "h:\release\new.xml" I get errors about the path not being correct. If I execute it with no parameters, it will execute but the output XML is not correct. I've been looking at this too long today. Any additional help is appreciated.
Thanx
Jim H