Announcement

Collapse
No announcement yet.

Document Writer not rendering ${..} code in the PDF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Document Writer not rendering ${..} code in the PDF

    Hi,

    I'm testing the Document Writer destination, trying to save a PDF with some data from an HL7 v2.x message. I'm on Mirth 3.4.1.8057 / Java 7.

    This is my HTML Template:

    <html>
    <body>
    <h1>${message.encodedData['MSH']['MSH-9'][MSH-9-1']}</h1>
    <p>${date.get('yyyy-M-d H.m.s')}</p>
    </body>
    </html>


    The file is generated but when I open it, what I see is:

    ${message.encodedData['MSH']['MSH-9'][MSH-9-1']}
    ${date.get('yyyy-M-d H.m.s')}


    Is there any example of valid HTML Templates that actually work?
    Is this a bug of the Document Writer?

    Thanks!

  • #2
    This looks incorrect.

    <h1>${message.encodedData['MSH']['MSH-9'][MSH-9-1']}</h1>

    You should be using just message.encodedData to write the entire HL7 message.
    Last edited by siddharth; 08-01-2016, 12:21 AM. Reason: correction.
    HL7v2.7 Certified Control Specialist!

    Comment

    Working...
    X