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)
-> + Error in Stylus Studio - canno... (2)
-> + Saxon Assign (2)
-> - License Authentication Failed (1)
-> + Stylus Studio 2007 Download (2)
-> + EDI to XML validation (2)
-> + Reports: can't remove "undead"... (3)
-> + Document Wizard Incomplete (6)
-> + Opening xml converter (4)
-> + Node depth limit with MySQL? (5)
-> + Basics (2)
-> - Node depth limit with MySQL? (1)
-> + Creating an XML Schema from a ... (4)
-> - Issue with XSD (1)
-> + XSL-FO and Apache FOP (2)
-> + How Come Stylus Studio Fails T... (6)
-> + no suitable driver (8)
-> + 211,19: no declaration found f... (6)
-> - Validate HEX (1)
-> + Crashing when connected to dat... (3)
-> - Interface with quickbooks (1)
-> - CDATA control (1)
-> + [resolved] Namespace (and pref... (5)
-> - Hiding and Revealing Child Nod... (1)
-> + Cannot see values in Watch whe... (4)
-> - Help with CSV to XML and Regio... (1)
-> + How do I verify "opt=yes" URI ... (4)
-> - Stylus Studio claims xsd is in... (1)
-> + Can a generated XSD be used in... (4)
-> + I am not a developer I'm just ... (2)
-> + Stylus crash when deleting dat... (6)
-> - Preserving Structure (1)
-> - Preserving Structure (1)
-> - HL7 ORU group tags (1)
-> + Fixed Length Record Layout to ... (2)
-> + WebService Connect (6)
-> - WebService conection problems (1)
-> + Could not detect EDI dialect a... (3)
-> + I am a bookkeeper not a progra... (2)
-> + fatal error (4)
-> - Saxon linebreak (1)
-> + task scheduler (2)
-> - Number of Elements in Grid vie... (1)
-> + Compile Java (2)
-> + What happened to the EDI Wizar... (15)
-> + setting Transformer for java b... (3)
-> + XML Schema Documentation Gener... (3)
-> + EANCOM xsd-files (4)
-> + Failure of CDATA converting pr... (4)
-> + XML File created from text fil... (3)
-> + After purchase AND activation ... (2)
-> + XQuery Format of XML code snip... (4)
-> + Error during conversion (9)
-> - testing for empty nodes (1)
-> + edi converter - java fails (10)
-> + ddtek:serialize (3)
-> - File explorer view (1)
-> - Java Extension Functions (1)
-> + err:FODC0004 (18)
-> - Removing Attributes when Null (1)
-> + CDATA preservation (6)
-> + Help converting xml report to ... (2)
-> + Converting text to XML issue (3)
-> - example not working (1)
-> + XML Editing (2)
-> + Multiple EDI messages within s... (5)
-> + Mapping RDBMS and XML Schema t... (2)
-> + MySQL Database importing (2)
-> + XSD validation using XSV fails... (3)
-> + Is this really well-formed? (3)
-> - HL7 EDI to XML problems -'ORU_... (11)
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> ->HL7 EDI to XML problems -...
-> + How do I modify the Xquery to ... (2)
-> + XML mapping difficulty (3)
-> + XLST Conversion (2)
-> + HTML TO XSL Conversion (2)
-> - Convert an EBCDIC file to XML (1)
-> + License Manager still indicate... (4)
-> + Still sometimes getting beat b... (2)
-> + What versions of MySQL are sup... (5)
-> - External XSLT processor proble... (1)
-> + DDEE0082 Erro Internal system ... (6)
-> + Calling function from .NET C# (2)
-> + Stylus studio projects bound t... (3)
-> + Report Designer mistakenly gen... (3)
-> + Choose Nodes in pipelines (3)
-> + Custom external processor and ... (2)
-> + predefined (4)
-> + translate function in java (2)
-> + XMLPipeline trouble in Linux (7)
-> + Converting Custom EDI Message ... (2)
-> + tab delimetered file with vari... (2)
-> + XML validation with XSD (2)
-> + Missing documentation: SSL_Cer... (2)
-> + Parse Xcel input file which is... (2)
-> + XML Publisher post processors (2)
-> + Alignment of table items in XM... (2)
-> + XML to PDF using XML Publisher (2)
-> + Blurry Background image / Vect... (4)
-> + URIResolver error on command l... (2)
-> + stylus studio - the (3)
-> + problem with omit from output ... (3)
-- Previous [481-500] [501-520] [521-540] 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.