› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › XML to HL7
[0:TEST] Error generated during parsing. – Datatype error: Type:InvalidDatatypeValueException, Message:The unary operation node had a binary node type. – Line 1, Col 510
Can anyone tell me what this means?
Thanks in advance….
XML can be finicky at best… Not sure if I can answer your question as to what the error means (other than it appears that the data that is coming in an associated tag does not match the datatype of the tag)…
With that said… I generally just use string as the datatype for every tag…
Though this may not be ideal, it has worked in my very limited use of XML through the engine and generally once converted to format needed, the original datatype is not important anyway.
Not sure if that helps, but if you change a block of tags (saving out your original) you may be able to find the culprit by process of elimination.
Hope this helps,
Robert Milfajt
Northwestern Medicine
Chicago, IL
The way the XML specs talk about ‘nodes’ is a pain; your “unary operation node” is a great example. EVERYthing is a node. You’d think that humans had nothing better to do than parse XML and keep track of where they are in some abstract syntax tree. It appears that something was being parsed that resulted in the parser expecting some ‘single node’ (maybe a tag without attributes) but it got a tree of some sort instead.
I’d try to go out to character 510 of the input file and figure out what the parser thinks it’s looking at at that point.
What Cloverleaf version are you working with?
after
I’d almost bet there is an extraneous ‘<' character in your input. That could cause the kind of parser error you're seeing. If the lexer reports that a tag is opening, and the parser is a validating parser, it's possible that the parser would decide there was an extra node where none was expected.
Also, I just noticed this thread: https://usspvlclovertch2.infor.com/viewtopic.php?t=2498https://usspvlclovertch2.infor.com/viewtopic.php?t=2498
From what Charlie says the error is coming from the schema, so you can find out what the parser was expecting by counting into the schema, but you’ll have to eyeball the input to find the bad data. I’d still guess it’s an “un-entified” less-than, though.
Element “OrderingPhysicianID” is not valid for content model: ”((AppointmentID,Patient,TechnologistID,Technologist,StressorID,Stressor,OrderingPhysicianID,OrderingPhysician,ReferringID,Referring,ReadingPhysicianID,ReadingPhysician,Date_x0020_Of_x0020_Test,Location,Status,NoShow,TestType),ReferringPhysicianID)’ – Line 1, Col 711
This is never ending….and why is everyone in such a hurry to implement XML?
The next thing to look for is to make sure that your data is consistant with your schema, Check your data file to make sure that every tag is present and that it is in the correct order with correct spelling… One thing I have done to make it a little more functional and error resistant is to add minOccurs=0 to the tag defininition… This won’t fix wrong order, but if a tag is missing as some apps will not send an empty tag.
check out this website for more details… I have found it to be very helpful.
Well, anyway.
I see that the type for CPI is unsignedInt, not string, so you might want to look at that in a bit.
The schema shows that the spGetCardioSchedule element is expecting a sequence of tags. If my memory serves me correctly it wants all of those tags in the order specified with none of them missing (I’ll be checking this and get back with the answer, but I think that’s what the xsd means.)
Is the OrderingPhysicianID element in the wrong position?
Ryan, where are you located now? I haven’t talked to you since you left LabCorp…..
sigh. I have barely worked with XMLSchema (I use RelaxNG and DTDs mostly) and its been more than a year since I did anything serious with XML. I’m getting tired of saying “I seem to recall” and “I’m pretty sure that”–I guess it’s time to brush up on W3C-ish stuff.
Command: hcixlttest cardiodx_idxrad_oru.xlt
[0:TEST] Error loading XML Definition. – Unable to resolve the namespace of root element – ns1:ChlXmlExport
[0:TEST] Can’t get record definition for ‘xml Cardio ChlXmlExport ns1:ChlXmlExport’.
[0:TEST] Unable to compile XLT ‘cardiodx_idxrad_oru.xlt’.
The frustrating part of this is that the exact same schema is used in the HL7 to XML Xlate that is other half of this bi-directional interface and it compiles cleanly. Is CL more fussy on inbound XML then it is on Outbound XML?
I suspect that when I am using the XML package manager I am not choosing the correct option in the namespace and/or options panels
Any help would be appreciated
I am sure there may be a better way to do this, so others, please feel free to respond…
But in the meantime… one thing that I have done is make sure that my root tag looks like the following
as the first three lines… seems to load up ok..
Ryan