In reading this thread the last couple days, I recall the reasons that I
originally investigated possible adoption of HAPI. A few years ago, I built
some proof of concepts around Mirth, and discovered it to be error prone, at
least for the portions of its functionality I was using. It is likely that some
of these bugs have been worked out in the meantime. In looking under the
covers, I came to realize that it used HAPI, and the functionality that HAPI
provided was really what I needed at the time, so I decided to go the straight
HAPI route. From what I recall, the version of HAPI in Mirth was modified, and
because of this, it is likely that when using Mirth one should expect a delay
between the version of HAPI it uses, and the latest available version of HAPI.
Note that I did need to make a minor change in HAPI, which I noticed was
similar to what Mirth had done after comparing source code between the two, in
order to work with the framework I built for
my client, but other than that it was a smooth adoption.
Thanks, Erik
________________________________
From: Paulo Ferreira <ferreira.rob...@gmail.com>
To: nic...@skynet.be
Cc: hl7api-devel@lists.sourceforge.net
Sent: Tuesday, March 20, 2012 4:20 AM
Subject: Re: [HAPI-devel] Converting HL7v2.x ASCII messages to HL7 XML
Hello Nico,
You are completely right this is the Mirth Connect internal schema, i thought
that was the
HL7.org official schema but i was wrong. I will consider if i should/need
transform the XML to another schema or not. I will try the James sugestion.
Cheers,
Paulo.
On 19 March 2012 19:14, <nic...@skynet.be> wrote:
Hi Paulo, James,
>
>
>HAPI is generating the right XML format according to the v2 specs.
>
>You can verify this by validating the generated instances against the xml
>schema provided by HL7.org.
>
>The xml you're referring to Paul (root node HL7Message) is a custom/internal
>format used by Mirth Connect.
>
>
>Hope this helps
>
>Best Regards
>
>Nico
>
>
>>________________________________
>
>Hi Paulo,
>
>I'm not an expert in HL7 XML encoding syntax, but I just checked and the
>latest version of the spec that I have a copy of shows HAPI's current
>behaviour as being correct. It says "The message structure ID is used as a
>root element for the XML instance documents."
>
>This may have changed though, as the document I have (HL7 Version 2: XML
>Encoding Syntax Release 1) is dated from June 2003. Do you (or anyone on the
>list) know differently?
>
>All of that said, it would probably be possible to implement that behaviour
>you describe by subclassing DefaultXMLParser and then
overriding encodeDocument(String) so that it calls the super implementation and
then modifies the name of the root element that is returned.
>
>If by chance you do this and want to contribute it as an example for the HAPI
>documentation, that would be awesome!
>
>Cheers,
>James
>
>
>On Mon, Mar 19, 2012 at 11:21 AM, Paulo Ferreira <ferreira.rob...@gmail.com>
>wrote:
>
>Hello,
>>
>>Hi need to convert an ASCII message to HL7 XML, i already do this with HAPI,
>>but the XML proceduced is not the HL7 XML standard schema. The XML root
>>starts with (for example) and not with . My method use the HAPI library and
>>it is written like this. Can you help me
please?
>> public InputStream transformMessageToInputStream(InputStream message)
>> throws Exception {
>> try {
>> return new ByteArrayInputStream(new DefaultXMLParser().encode(
>> new PipeParser().parse(StreamToStringUtility.getInstance()
>> .convert(message, false))).getBytes("UTF-8"));
>> } catch (Exception e) {
>> throw MessageTransformationException.getInstance()
>> .definesException(
>> this.getClass().getName()
>> .concat(".transformDocument()"), "", false,
>> LoggingSeverity.ERROR);
>> }
>> }
>>
>>Cheers,
>>Paulo Ferreira.
>>
>>------------------------------------------------------------------------------
>>This SF email is sponsosred by:
>>Try Windows
Azure free for 90 days Click Here
>>http://p.sf.net/sfu/sfd2d-msazure
>>_______________________________________________
>>Hl7api-devel mailing list
>>Hl7api-devel@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>
>>
>
>
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel