Hi Martin,
>IMHO this very bad idea (especialy for HL7).
In my experience typical company implemented very limited subset of HL7 standard.
Beside in many cases their implementation doesn't strictly follow letter of the standard.
So in many cases it makes sense to create customized version that applied only to particular company.
Our implementation of HL7 messages divided in two parts.
First part used to generate HL7 messages in XML based format(see example below) and other part contains converter that just transform XML to HL7 EDI format.
There is a chance in future everybody will be used HL7 interchange based on XML. In this case we will get rid from convert part of our implementation.
Using HL7 XML Schema as validation tools and EL as way to easy get data we have very simple and powerful way to produce HL messages. Also it's working very fast at least if compare it with XLST as template engine.
>If you can, use HAPI.
Thank you for referring I found their site. I definitely will take a look on it.
For now we capture response from template using the javax.servlet.Filter.
Idea taken from "Core JavaServer Faces 2nd ed." by Geary & Hortsmann.
But it is somewhat inconvenient.
Here is the fragment of our working template:
<?xml version="1.0" encoding="UTF-8"?>
<f:view xmlns:ui="
http://java.sun.com/jsf/facelets"
xmlns:h="
http://java.sun.com/jsf/html"
xmlns:f="
http://java.sun.com/jsf/core">
<ORM_O01 xmlns="urn:hl7-org:v2xml" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hl7-org:v2xml D:\SPS\doc\HL7\XMLENC~1\XMLENC~1\Support\v231-200307\v231-200307\v231-200307\xsd\ORM_O01.xsd">
<MSH>
<MSH.1>|</MSH.1>
<MSH.2>^~\&</MSH.2>
<MSH.3>
<HD.1>#{edi.laboratoryAccount.myApplication}</HD.1>
</MSH.3>
<MSH.4>
<HD.1>#{edi.laboratoryAccount.myAccountId}</HD.1>
</MSH.4>
<MSH.5>
<HD.1>#{edi.laboratoryAccount.partnerApplication}</HD.1>
</MSH.5>
<MSH.6>
<HD.1>#{edi.laboratoryAccount.myAccountId}</HD.1>
</MSH.6>
<MSH.7>
<TS.1><h:outputText value="#{jsf.newDate}">
<f:convertDateTime pattern="yyyyMMddHHmm"/>
</h:outputText></TS.1>
</MSH.7>
<MSH.9>
<MSG.1>ORM</MSG.1>
<MSG.2>O01</MSG.2>
</MSH.9>
<MSH.10>#{edi.controlNumber}</MSH.10>
<MSH.11>
<PT.1>#{edi.processingMode()}</PT.1>
</MSH.11>
<MSH.12>
<VID.1>2.3</VID.1>
</MSH.12>
</MSH>
Thank you for your response!
[Message sent by forum member 'vladperl' (vladperl_at_hotmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=387246