web stats
can I do hl7 to pdf? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2007, 12:38 PM
julia1231 julia1231 is offline
OBX.1 Kenobi
 
Join Date: Mar 2007
Posts: 46
julia1231
Default can I do hl7 to pdf?

I created a inbound file to file channel and tried to make pdf work. Does v1.3.2 support hl7 to pdf? How does it work?
thanks,
Reply With Quote
  #2  
Old 03-19-2007, 12:42 PM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re: can I do hl7 to pdf?

He PDF writer generates PDF, using HTML as a template. So, you need to create a HTML template
Reply With Quote
  #3  
Old 03-19-2007, 01:01 PM
julia1231 julia1231 is offline
OBX.1 Kenobi
 
Join Date: Mar 2007
Posts: 46
julia1231
Default Re: can I do hl7 to pdf?

I created a html temp file and it still generates error:

com.webreach.mirth.model.converters.SerializerExce ption: ca.uhn.hl7v2.parser.EncodingNotSupportedException: Can't parse message beginning <html xmlns="http://www.w3.org/1999/xhtml">
<head>
at com.webreach.mirth.model.converters.HAPIMessageSer ializer.deserialize(HAPIMessageSerializer.java:54)
at com.webreach.mirth.server.mule.transformers.HL7ToM essageObject.doTransform(HL7ToMessageObject.java:8 0)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:492)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:271)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:230)
at org.mule.providers.file.FileMessageReceiver.proces sFile(FileMessageReceiver.java:183)
at org.mule.providers.file.FileMessageReceiver.poll(F ileMessageReceiver.java:111)
at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:73)
at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
at java.lang.Thread.run(Unknown Source)
Caused by: ca.uhn.hl7v2.parser.EncodingNotSupportedException: Can't parse message beginning <html xmlns="http://www.w3.org/1999/xhtml">
<head>
at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:140)
at com.webreach.mirth.model.converters.HAPIMessageSer ializer.deserialize(HAPIMessageSerializer.java:52)
... 17 more
---------------------------------------
this is my html template:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
.style1 {color: #FF6600}
.style2 {color: #3366FF}
.style3 {
color: #99FF00;
font-weight: bold;
font-size: 18px;
}
.style4 {
font-size: 18px;
font-weight: bold;
}
-->
</style>
</head>

<body>
<p><span class="style3">LEXUS RULES </span></p>
<p><span class="style4"><BR/>
<span class="style2">LEXUS RULES </span><BR/>
</span></p>
<p><span class="style4"><span class="style1">LEXUS RULES</span></span><BR/>
</p>
</body>
</html>
Reply With Quote
  #4  
Old 03-19-2007, 01:11 PM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re: can I do hl7 to pdf?

¿What kind of input endpoint are you using?

This seems than your input is HL7-XML, not HL7-ER7: please, mark the "XML pre-encoded" check box at the channel definition panel (at "summary" tab)
Reply With Quote
  #5  
Old 03-19-2007, 01:24 PM
julia1231 julia1231 is offline
OBX.1 Kenobi
 
Join Date: Mar 2007
Posts: 46
julia1231
Default Re: can I do hl7 to pdf?

yes, I checked the following check box without success. I also unchecked them to test...
1. Enabled
2. Channel will receive XML pre-encoded messages
3. User transactional endpoints
4. Synchronize source connector
-----------------------------------
I think we are using dtd xhtml 1.0 transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm...sitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>

<body>

Lexus rules!

</body>
</html>


Reply With Quote
  #6  
Old 03-19-2007, 05:24 PM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re: can I do hl7 to pdf?

Please, could you post your channel, please?

When I talked about "HTML template" i refer to the template of the PDF endpoint, not the template of the transformer.
Reply With Quote
  #7  
Old 03-20-2007, 07:20 AM
julia1231 julia1231 is offline
OBX.1 Kenobi
 
Join Date: Mar 2007
Posts: 46
julia1231
Default Re: can I do hl7 to pdf?

I am not able to post any image here in this message board. maybe it's my browser...
Is there an email I can send screen shots?
are you saying in my source tab, I need to put file name *.pdf ?
Reply With Quote
  #8  
Old 03-20-2007, 07:25 AM
julia1231 julia1231 is offline
OBX.1 Kenobi
 
Join Date: Mar 2007
Posts: 46
julia1231
Default Re: can I do hl7 to pdf?

<com.webreach.mirth.model.Channel>
<id>65024310-ac97-4a20-96ff-76426eebe612</id>
<name>adt1_pdf</name>
<description></description>
<enabled>true</enabled>
<version>1.3.2</version>
<revision>164</revision>
<direction>INBOUND</direction>
<protocol>HL7</protocol>
<mode>BROADCAST</mode>
<sourceConnector>
<name>sourceConnector</name>
<properties>
<property name="sortAttribute">date</property>
<property name="pollingFrequency">1000</property>
<property name="DataType">File Reader</property>
<property name="fileAge">0</property>
<property name="moveToPattern"></property>
<property name="charsetEncoding">DEFAULT_ENCODING</property>
<property name="checkFileAge">0</property>
<property name="autoDelete">0</property>
<property name="host">C:/ADT</property>
<property name="fileFilter">*.*</property>
<property name="moveToDirectory"></property>
</properties>
<transformer>
<steps/>
<template></template>
</transformer>
<filter>
<rules/>
<template></template>
</filter>
<transportName>File Reader</transportName>
</sourceConnector>
<destinationConnectors>
<com.webreach.mirth.model.Connector>
<name>Destination 1</name>
<properties>
<property name="DataType">PDF Writer</property>
<property name="outputPattern">${ORIGINALNAME}&amp;${DATE}.p df</property>
<property name="password"></property>
<property name="template">${message.rawData}${message.id}</property>
<property name="host">C:/ADT/PDFOUTPUT</property>
<property name="encrypt">0</property>
</properties>
<transformer>
<steps/>
</transformer>
<filter>
<rules/>
</filter>
<transportName>PDF Writer</transportName>
</com.webreach.mirth.model.Connector>
</destinationConnectors>
<properties>
<property name="initialState">started</property>
<property name="synchronous">true</property>
<property name="store_messages">true</property>
<property name="recv_xml_encoded">true</property>
<property name="encryptData">false</property>
<property name="transactional">true</property>
<property name="max_message_age">-1</property>
<property name="error_messages_only">false</property>
</properties>
<preprocessingScript>// Modify the message variable below to pre process data&#x0D;
return message;&#x0D;</preprocessingScript>
</com.webreach.mirth.model.Channel>
Reply With Quote
  #9  
Old 03-20-2007, 12:19 PM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re: can I do hl7 to pdf?

Ok. I see the problem.

1. Create a new channel. An Inboud one.
2. Define a File Reader endpoint (he one you've defined is ok)
3. Define a PDF Write as a destination. In the PDF endpont, in the TextBox titled as "Template", write:
Code:
<title>Untitled Document</title>

Lexus <b>rules!</b>
Deploy the channel, and copy an ER7 HL7 file into the directory you configured at the file reader (I'm posting an ER7 example file)
Code:
MSH|^~\&|ADT-HIS||HL7INSPECTOR||20060101103100||ADT^A02|1|P|2.3
EVN|A01|20060101||
PID||||4711|Doe^John||19701024|M|||Sesamstreet 11^76137^Karlsruhe^D|||||GS|EV||||
PV1||I|S1^23^3^CHI^^1||||||||||||||||1234|||||||||||||||||||||||||200601010930||||||||
A very simple PDF will be generated.

4. Now, you can configure Mirth to generate customized and complex PDF. You'll need to create a new Transformer, and map into variables, the differnt ER7 elements. As soon as you define new maps, you will can use themes at hte PDF endpoint template (they'll apear into the "Source Mappings" box) Just Drag-and-drop the one you want to use into the Template Box.
Reply With Quote
  #10  
Old 03-21-2007, 06:54 AM
julia1231 julia1231 is offline
OBX.1 Kenobi
 
Join Date: Mar 2007
Posts: 46
julia1231
Default Re: can I do hl7 to pdf?

Yes. I create a new channel and put the hl7 file in my file directory. Then I put the simple template for pdf and it's working!
Thank you very much!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation