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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 03 Mar 2014 08:41 AM
Several elements are defined as typeFM which is ultimatly defined as decimal. When there is nothing sent back from the payer for this element we still see the element definition which causes parsing issues. I've tried making the element properties nillable but that doesn't seem to help. The only thing which works is altering the datatype to string which we'd like to not have to do.

Is there a setting in the SEF file to not generate this documentation of each element? I can't seem to find such a setting in the stylus studio tool.

Thank You.

Example:

<S2315>
<!--FM: Basis Of Reimbursement Determination-->
</S2315>

Postnext
Ivan PedruzziSubject: Telco EDI to XML output on optional numeric elements
Author: Ivan Pedruzzi
Date: 03 Mar 2014 09:35 AM

Hi Daniel,

Which "parsing issues"?
Do you get an error in XML Converters when converting from XML to Telco?


The following URL parameters turn off inline comments

Where to place decoded data values
decode=no

Comment element types
field=no



Ivan Pedruzzi
Stylus Studio Team

Postnext
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 03 Mar 2014 09:40 AM
The EDI to XML convesion has no issues whatsoever. It's when we parse the XML which flags the field as an error since "" doesn't match the codelist of 0 thru 9.

I'd like to modify the SEF file by turning off the comment or annotation to see if this does the trick but I can't easily seem to find the "Comment=off" options within the studio product.

Thank You.

Postnext
Ivan PedruzziSubject: Telco EDI to XML output on optional numeric elements
Author: Ivan Pedruzzi
Date: 03 Mar 2014 09:51 AM
field=no turns off the comment as I mentioned in previous post.

Is your code performing a schema validation or you are getting error binding XML to Object (JAXB or alike)?


Ivan Pedruzzi
Stylus Studio Team

Postnext
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 03 Mar 2014 09:55 AM
We use the Tibco product which has an XML parsing activity.

Regarding the "field=no" option.

Is this something which can be handled within the SEF file or only by modifying the java conversion code options?

Thank You.

Postnext
Ivan PedruzziSubject: Telco EDI to XML output on optional numeric elements
Author: Ivan Pedruzzi
Date: 03 Mar 2014 01:31 PM

The SEF private section captures the URL parameters you have set in the "EDI to XML" editor, here an example

.PRIVATE DataDirect XML Converter
.URL converter:EDI:field=no


XML Converters uses the URL embedded in the SEF file. In case of clash, the parameters set in the Java code take precedence over the URL.

For example given the SEF above, if your Java code overwrites the parameter "field", the Java code wins and the comments are generated.

ConvertToXML c = factory.newConvertToXML("EDI:field=yes");

In short, if your Java code does not set field, changing the SEF file should give the result you want.


Does it help?
-Ivan



Ivan Pedruzzi
Stylus Studio Team

Postnext
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 03 Mar 2014 02:05 PM
That does help yes, but doesn't address the ultimate problem.

S2315 is an optional element, but even with this removing of comments, we still fail on parsing.

With this override, we receive:
" <S2315 />"

which still fails parsing. Ideally if it's not presented with content, I would think the EDI To XML converted would not send the element as output at all???

Since it's an optional element, I may need to go back to see if we can have another fix from the data direct folks.

NOTE: I made the change you recommended, but would you know where in the stylus studio UI I could do the same thing? I've looked all over the place an don't seem to see these sort of options.

Thank You.

Postnext
Ivan PedruzziSubject: Telco EDI to XML output on optional numeric elements
Author: Ivan Pedruzzi
Date: 03 Mar 2014 02:44 PM

Which Stylus Studio version are you running?
X15 screenshot attached

If the EDI element type is decimal and the value is missing Converter should throw an error.

Which URL parameters you have set in the Java code?
Could you send us a sample of TELCO to replicate the problem?

Postnext
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 04 Mar 2014 10:19 AM
Originally Posted: 03 Mar 2014 03:04 PM
I'm running X15 of the studio package. How did you get to the screen below ~ I can't seem to find that anywhere.

The code below has no problems with the conversion ~ it just converts what should be decimal if provided to an empty element ~ again it's optional.

Attaced is the SEF file we use on the EDI to XML conversion as well as a sample which fails.

NOTE: We're running the latest progress jar hotfix as we seem to find challenges other clients haven's come across yet.

Thank You.

The code esentially does these steps:

ConverterFactory factory = new ConverterFactory();

Result converterResult = new StreamResult(output);

StreamSource converterSource = new StreamSource();
converterSource.setInputStream(is);

Converter toXml = factory.newConvertToXML("converter:EDI:opt=yes");

toXml.getConfiguration().setEDIExtension(new StreamSource( fromEdiSefFileName));

toXml.convert(converterSource, converterResult);

Postnext
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 04 Mar 2014 07:40 AM
Note: the RESPc.txt file is the EDI input to convert to XML. The opt=yes is used since it was recommended to us for other conversion issues and finally, I found the options your screen shot showed ~ thank you.

Postnext
Ivan PedruzziSubject: Telco EDI to XML output on optional numeric elements
Author: Ivan Pedruzzi
Date: 04 Mar 2014 09:57 AM
RESPc.txt cannot be converted by EDI to XML using Stylus Studio 1910n as is.

[DDEF0054] FATAL ERROR Unable to determine type of EDI file.
The file is not recognized as a type of EDI data stream that the
XML Converter knows how to handle.

If I remove part of the header which is the following then it works
0555032OKLDX601983512097662 01


opt=yes is really the last resort to get to the data even when the message structure is completely unreliable.


I don't think the EDI transaction is valid.
If element S2315 is present it should have a value from code-list FM.

When enabling code list validation (tbl=yes) XML Converters reports
<<' ' not in code-list FM>>.

One way to workaround the problem would be to post-process the XML using XSLT to get rid of the empty elements which prevent Tibco to parse it.

-Ivan




Posttop
Daniel HuesmanSubject: Telco EDI to XML output on optional numeric elements
Author: Daniel Huesman
Date: 04 Mar 2014 10:13 AM
Yes I understand the "opt=yes" is a last resort but unfortunately not all healthcare payers were forced to conform. Basically we're stuck dealing with work arounds. Thanks for all your assistance and yes I understand I can get around the mapping issue ideally I'm not a fan of extra code unless others can't deal with it.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
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.