XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + JVM detection not finding JDK ... (2)
-> - stylus studio version 2011 pro... (1)
-> - WSDL 2.0 (1)
-> + Special characters in xml (2)
-> + cannot connect to mysql commun... (2)
-> + create a report from an existi... (2)
-> + Content not allowed in prolog (2)
-> + DB IInformix with database loc... (8)
-> + Stylus Report Designer (XML Re... (4)
-> - error: cos-nonambig: Content m... (1)
-> - UNIX .csv conversion and java ... (1)
-> + Nillable element, Validation e... (2)
-> + EDI Converter Error (2)
-> - CSV FILE INTO CARGO-IMP MESSAG... (1)
-> + BUG: Validation in piple will ... (2)
-> + Is there a 64-Bit Stylus Studi... (2)
-> + BUG: Read structure on SQL Ser... (3)
-> + [Customer Toyoto Motors Europe... (2)
-> - Get a schema for a JSON file (1)
-> + UNOC:4 forces converter to inp... (2)
-> - java class for xs:any elements (1)
-> + changing component separator (3)
-> + Output view disappeared (6)
-> + How to convert deeply nested X... (2)
-> + javax.net.ssl.SSLException (4)
-> + error converting .csv in a uni... (10)
-> + Menu bar disappeared (3)
-> - No Topic (1)
-> - What does "XML" stand for? So... (1)
-> - So XML is just HTML on steroid... (1)
-> + XHTML to XML conversion (2)
-> - Stylus Studio with DDTek xml c... (1)
-> + Installation fails (3)
-> + Is there a keyboard shortcut t... (2)
-> - Bug: Adding a scenario to an X... (1)
-> - Bug: Bug reporting outputs an ... (1)
-> - Tradacoms Invoice 9 Batch Quer... (1)
-> - problem with the product regis... (1)
-> + Help: Documentation... ends in... (2)
-> + How to install LIBxml2 (2)
-> - line numbers in validator outp... (1)
-> + Sharing Viollation in Stylus v... (5)
-> - support for asp.net in stylus... (1)
-> + how to use the latest java xml... (2)
-> - how to show xsd element relate... (1)
-> - Testing Stylus in a secure env... (1)
-> + How do you remove linemarkings... (3)
-> - Bug: Comment / Uncomment via C... (1)
-> + Setting escape (release) chara... (2)
-> + Xalan processor not showing up (2)
-> + Is there a keyboard shortcut t... (3)
-> - Modifying reports outside of S... (1)
-> + Run ALL Scenarios? (2)
-> + predefined macros ${ (4)
-> - TRADACOMS - EDI (1)
-> + SUM not working (3)
-> - Large xml file handling gives ... (1)
-> + 2011 Enterprise code folding f... (9)
-> + custom xml converter (3)
-> - Start Excel feter the mapping ... (1)
-> + Uninstall (2)
-> + xpath to compare two values fr... (2)
-> - xpath to compare two values fr... (1)
-> + SS2011 cannot save XML files u... (3)
-> + SS 2011 Enterprise saying 2010... (2)
-> + How to change the way whitespa... (7)
-> + Updating Relational Data Using... (4)
-> - Contract Stylus Studio help. ... (1)
-> + UTF_8 characters not displayed (6)
-> + Problem XSL to PDF ( dont reco... (2)
-> + HIPAA EDI - Looping question (4)
-> - HIPAA EDI - Looping question (1)
-> + Does XML Report support column... (2)
-> + Limited choice of XSL elements... (2)
-> + Single Source Publishing? (3)
-> - Stylus Stodio License (1)
-> - Stylus Stodio License (1)
-> + relax ng (3)
-> + having problem converting csv ... (8)
-> + error when selecting items fro... (2)
-> + CSV File to XML (3)
-> + Software registration - How to... (4)
-> - Software registration - How to... (1)
-> + .Net Saxon not supported by th... (2)
-> + How do I extend the Evaluation... (2)
-> + dst file (4)
-> + Flat File Custom XML conversio... (4)
-> + converting ascii file to xml f... (2)
-> + Evaluation Copy of Stylus Stud... (8)
-> + Batch process for soap (4)
-> + Strange error when running gen... (5)
-> + Merge Files (2)
-> + Convert cvs to XML (2)
-> + Stylus studio 2010 crashes in ... (5)
-> + excel to text (2)
-> + licence key? (2)
-> + JVM Heap error (4)
-> + How Do I clean TXT File? (2)
-> + SS Web Service Call Tester Pay... (3)
-> - SS Web Service Call Tester Mic... (1)
-- Previous [421-440] [441-460] [461-480] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
ben MantSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: ben Mant
Date: 07 May 2010 08:36 AM
Hi
I'm a SAS programmer and I am attempting to import HL7 files into readable SAS datasets. To do this I am using stylus studio to convert the HL7 files to XML and then using an XML map import these XML files directly to SAS.
This worked fine for an 'order request' where stylus studio identified the EDI stype as HL7 version 2.3 and everything worked fine.

However we have 2 type of Hl7 an order and then a 'result request' unfortunately stylus studio could not determine the EDI format.I though decided to try and use HL7 version 2.3 EDI and got the follwing error:

"Likely the specific version is not recognized. Try disabling some of the validation options.

Dialect: HL7

Version: codelist=230/;message=230

Message: ORU_R01

Segment: MSH (segment 1)

Native error: 203, in table: H0357

A required table in the repository is missing. Typically this is caused by trying to decode an
EDI dialect that is not supported. Consider disabling all validation or creating a SEF file to
define the necessary tables."

It appears the message is not set up but I have attempted to add it in a SEF file and am getting quite stuck...

Any help would be greatly appreciated

many thanks

Ben


Documentx20090710444.HL7
Hl7 file to convert

Postnext
Tony LavinioSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: Tony Lavinio
Date: 11 May 2010 09:18 AM
The version number should be "2.3" in the header, not "230".

That's why it is getting confused.

If you can alter those files, they should load without difficulty.

Postnext
ben MantSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: ben Mant
Date: 11 May 2010 10:21 AM
HI
many thanks for your help
the problem was as you suggested that the version was not correct in the files. The version was entered as '2.30' in the message line and not '2.3' and hence it was not read in correctly.

Is there a way this could be automatically detected by the software to prevent me having to manually edit all Hl7 files as due to the volume of files this is not really practical.

Many thanks for your help

Kind regards

Ben

Postnext
Tony LavinioSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: Tony Lavinio
Date: 11 May 2010 11:41 AM
The next version of the XML Converters will have an option that lets you override the version stating in the incoming data stream, specifically to avoid this problem.

Postnext
ben MantSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: ben Mant
Date: 11 May 2010 01:05 PM
HI
many thanks for confirming that it will be fixed in the new version.

Now that I have used the software and have it working converting a single HL7 file to XML which I have successfully read into to SAS I would like to know the potential for the software.

What I am looking to do is basially is to read an entire set of multiple HL7 files from a single location have them map all using the same schema and create multiple XML files which I can then process in SAS and database. What would be even better would be if a single XML file would be created.

So what I am basically looking for the software to do is:
i) Set source directory of all Hl7 EDI files
ii) Stylus reads in all HL7 files from the given location into a project
iii) XML files are all written out using a determined schema i.e. HL7 2.3 and saved to a given location (or single XML file by appending data???)

Is this at all a possibility using this software

Kind regards and many thanks in advance

Ben


Postnext
Tony LavinioSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: Tony Lavinio
Date: 13 May 2010 08:20 AM
The documentation contains information here:
http://media.datadirect.com/download/docs/ddxquery/allddxq/reference/wwhelp/wwhimpl/js/html/wwhelp.htm?href=advancedfeatures3.html#wp219064
that will guide you to writing an XQuery program that will read all of the files in a given location; it will convert them en masse as it reads them.

Postnext
ben MantSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: ben Mant
Date: 13 May 2010 12:50 PM
HI
Many thanks for your answer. Looks like potentially this could solve my problems and create a workable interface for all my HL7 files.

I have therefore written an XQUERY as follows which runs without any errors (having added the opt=yes and seg=no option as prompted from my first run):

fn:collection("converter:///EDI:opt=yes:seg=no?file:///Y:/Import/BACKUP/20070527?select=*.hl7;recurse=yes;sort=a")/Hl7

the file directory contains 2 Hl7 files I've put there as a test.

The program appears to process fine BUT the xml output I was expecting in the preview window does not appear. It is instead simply blank. I did also set an outout URL location for the file using the 'Edit scenario properties' and this just create a completely blank XML file too...

Any help would be greatly appreciated. Must be something simple I'm not doing right

Kind regards and many thanks in advance

Ben

Postnext
Tony LavinioSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: Tony Lavinio
Date: 13 May 2010 04:59 PM
Two things right off:

"converter:EDI" not "converter:///EDI" (no slashes there)

and

"/HL7" not "Hl7" (XML is case-sensitive)

Postnext
ben MantSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: ben Mant
Date: 14 May 2010 05:34 AM
Many thanks for the reply
These quick fixes corrected the problem and an XML file was created successfully.

However as the file is created by appending each XML output to the next the XML becomes malformed.

i.e. in my data the root element is <HL7> but as this closes with </HL7> at the end of each hl7 file processed and then starts again with the next file it has no true encompassing root element when appended.

Adding a new root element at the start and end to the XML is easy enough manually but can this be done automatically?

Many thanks again for all your help

Kind regards

Ben

Postnext
Tony LavinioSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: Tony Lavinio
Date: 14 May 2010 09:29 AM
Try something like this:

<HL7>
{
fn:collection("converter:EDI:opt=yes:seg=no?file:///Y:/Import/BACKUP/20070527?select=*.hl7;recurse=yes;sort=a")/HL7/*
}
</HL7>

That should expand all of the elements under the HL7's without getting the top-level elements themselves, while wrapping the whole result in an HL7.

Posttop
ben MantSubject: HL7 EDI to XML problems -'ORU_R0'1-message'
Author: ben Mant
Date: 14 May 2010 10:49 AM
many thanks for your assistance this now creates the XML perfectly.

thanks again for your help let me know when the new version is ready i.e. with the version override

Ben

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.