web stats
Mirth Community - View Single Post - change outbound message template value through transformer
View Single Post
  #1  
Old 10-12-2011, 05:31 AM
khan.kashif khan.kashif is offline
Mirth Newb
 
Join Date: May 2011
Posts: 10
khan.kashif is on a distinguished road
Default change outbound message template value through transformer

Dear all,

I have a CCD document template as below which I used as outbound message template but before sending to destination I want to change some value in this template with javascript transformer like

tmp['recordTarget']['patientRole']['id'] ['@extension']=msg['e_sender'].toString();

tmp['recordTarget']['patientRole']['patient']['name']['given']=msg['e_sender'].toString();

But these values are not getting replaced. can anybody suggest us what we will need to do for this?

Sample template message:

<?xml version="1.0" encoding="utf-8"?>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:sdtc="urn:hl7-org:sdtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 http://xreg2.nist.gov:8080/hitspValidation/schema/cdar2c32/infrastructure/cda/C32_CDA.xsd" classCode="DOCCLIN" moodCode="EVN">
<realmCode code="US"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.10.20.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="2.16.840.1.113883.3.88.11.32.1"/>
<id root="b465c926-ebc6-41f4-197b-eba2f20d7ae2"/>
<code code="34133-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Summarization of episode note"/>
<title>Continuity of Care Document from </title>
<effectiveTime value="201110031417-0500"/>
<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
<languageCode code="en-US"/>
<recordTarget>
<patientRole>
<id extension="" root="2.16.840.1.113883.3.271"/>
<addr use="H">
<streetAddressLine>UNK</streetAddressLine>
<city>UNK</city>
<state>UNK</state>
<postalCode>UNK</postalCode>
<country/>
</addr>
<telecom use="HP" value="tel: UNK"/>
<patient>
<name>
<given></given>
<family></family>
<suffix/>
</name>
<administrativeGenderCode codeSystem="2.16.840.1.113883.5.1" code="F" displayName="Female"/>
<birthTime value="20110815"/>
<ethnicityCode codeSystem="2.16.840.1.113883.6.238" codeSystemName="CDC Race and Ethnicity" code="E1"/>
<raceCode codeSystem="2.16.840.1.113883.6.238" codeSystemName="CDC Race and Ethnicity" code="R3" displayName="Black or African American"/>
<languageCommunication>
<templateId root="2.16.840.1.113883.3.88.11.83.2" assigningAuthorityName="HITSP/C83"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.1" assigningAuthorityName="IHE/PCC"/>
<languageCode code="armenian"/>
<preferenceInd value="true"/>
</languageCommunication>
</patient>
</patientRole>
</recordTarget>
<author typeCode="AUT">
<time value="201110031417-0500"/>
<assignedAuthor classCode="ASSIGNED">
<id extension="5476" root="2.16.840.1.113883.3.271"/>
<addr use="H">
<streetAddressLine>UNK</streetAddressLine>
<city>UNK</city>
<state>UNK</state>
<postalCode>UNK</postalCode>
<country/>
</addr>
<telecom use="HP" value="tel: UNK"/>
<assignedPerson>
<name>
<given></given>
<family></family>
<suffix/>
</name>
</assignedPerson>
</assignedAuthor>
</author>
<custodian>
<assignedCustodian>
<representedCustodianOrganization>
<id extension="5476" root="2.16.840.1.113883.3.271"/>
<telecom use="HP" value="tel: UNK"/>
<addr use="H">
<streetAddressLine>UNK</streetAddressLine>
<city>UNK</city>
<state>UNK</state>
<postalCode>UNK</postalCode>
<country/>
</addr>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
<documentationOf>
<serviceEvent classCode="PCPR">
<effectiveTime>
<low value="20110916"/>
<high value="20110916"/>
</effectiveTime>
<performer typeCode="PRF">
<functionCode code="PP" codeSystem="2.16.840.1.113883.12.443" displayName="Primary Care Provider"/>
<assignedEntity>
<id extension="123456" root="1.2.3.4.5.65.88.2"/>
<assignedPerson>
<name>
<prefix>Dr.</prefix>
<given> One</given>
<family>MD</family>
</name>
</assignedPerson>
<representedOrganization>
<name>4815</name>
</representedOrganization>
</assignedEntity>
</performer>
</serviceEvent>
</documentationOf>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.13" assigningAuthorityName="CCD"/>
<code code="48764-5" codeSystem="2.16.840.1.113883.6.1"/>
<title>Purpose</title>
<text>Summary of patient information</text>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
Reply With Quote