I have been given a project to create HL7 Continuity of Care Documents (CCD) using data stored in a SQL Server 2008 database. I have intermediate to advanced knowledge in SQL programming but I have never used FOR XML statements.
Has anybody ever built a stored procedure that would successfully create CCD's strictly using only SQL programming with FOR XML?
Any tips would be greatly appreciated. If anybody used anything else besides SQL, feel free to let me know, but my background is mainly in SQL, T-SQL, with some knowledge in Java and VB.
Thanks
The way that we approached this issue in our .Net application is that we first created classes from the CCD or CDA xsd (which can be obtained from several locations, including the HL7 store) using Microsoft's xsd tool.
We then wrote (a lot of) code that creates and populates the CCD classes from data in the database.
In order to present the data to the user, we first serialized the record to string using the XMLSerializer, then converted the generated XML to HTML using the ccd.xsl transform file. There are several locations for the ccd.xsl including this one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With