From: <jav...@us...> - 2011-01-31 15:15:51
|
Revision: 14796 http://dcm4che.svn.sourceforge.net/dcm4che/?rev=14796&view=rev Author: javawilli Date: 2011-01-31 15:15:45 +0000 (Mon, 31 Jan 2011) Log Message: ----------- [#DCMEE-1612] Possibility to map HL7 process to a specific hostname/ip Modified Paths: -------------- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-hl7/src/java/org/dcm4chex/archive/hl7/HL7SendService.java Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-hl7/src/java/org/dcm4chex/archive/hl7/HL7SendService.java =================================================================== --- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-hl7/src/java/org/dcm4chex/archive/hl7/HL7SendService.java 2011-01-31 15:15:13 UTC (rev 14795) +++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-hl7/src/java/org/dcm4chex/archive/hl7/HL7SendService.java 2011-01-31 15:15:45 UTC (rev 14796) @@ -361,20 +361,10 @@ } private byte[] preprocessForward(byte[] hl7msg, Document msg, MSH msh, String sending) { - String xslFile = FORWARD_XSL+"_"+msh.messageType+"^"+msh.triggerEvent+XSL_EXT; - Templates xslt = templates.getTemplatesForAET(sending, xslFile); - if (xslt == null) { - log.debug("No "+xslFile+" for "+sending+" found. Try to find hl7 forward stylesheet with message type."); - xslFile = FORWARD_XSL+"_"+msh.messageType+XSL_EXT; - xslt = templates.getTemplatesForAET(sending, xslFile); - if (xslt == null) { - log.debug("No "+xslFile+" for "+sending+" found. Try to find generic hl7 forward stylesheet."); - xslFile = FORWARD_XSL+XSL_EXT; - xslt = templates.getTemplatesForAET(sending, xslFile); - } - } + String[] variations = new String[] {"_"+msh.messageType+"^"+msh.triggerEvent, "_"+msh.messageType, "" }; + Templates xslt = templates.findTemplates(new String[]{sending}, FORWARD_XSL, variations, XSL_EXT); if (xslt != null) { - log.info("Transform HL7 message with hl7forward stylesheet "+xslFile+ " for " + sending); + log.info("Transform HL7 message with hl7forward stylesheet!"); try { Transformer t = xslt.newTransformer(); ByteArrayOutputStream bos = new ByteArrayOutputStream(hl7msg.length); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |