db9155b6-14a6-4dff-86cc-9f0723dd3969 Load hQuery Gateway Database true 2.2.1.5861 America/Vancouver 19 sourceConnector Database Reader jdbc:mysql://localhost:3306/Oscar12 com.mysql.jdbc.Driver query kzwp3743 500000 interval 1 SELECT demographic.demographic_no AS demographic_demographic_no, demographic.last_name AS demographic_last_name, demographic.first_name AS demographic_first_name, demographic.year_of_birth AS demographic_year_of_birth, demographic.month_of_birth AS demographic_month_of_birth, demographic.date_of_birth AS demographic_date_of_birth, demographic.hin AS demographic_hin, demographic.sex AS demographic_sex FROM demographic 0 0 root 0 firstName Mapper Variable firstName DefaultValue Mapping msg['demographic_first_name'].toString() RegularExpressions isGlobal channel 1 lastName Mapper Variable lastName DefaultValue Mapping msg['demographic_last_name'].toString() RegularExpressions isGlobal channel 2 gender Mapper Variable gender DefaultValue Mapping msg['demographic_sex'].toString() RegularExpressions isGlobal channel 3 pid Mapper Variable pid DefaultValue Mapping msg['demographic_hin'].toString() RegularExpressions isGlobal channel 4 birthDate Mapper Variable birthDate DefaultValue RegularExpressions Mapping msg['demographic_year_of_birth'].toString() + msg['demographic_month_of_birth'].toString() + msg['demographic_date_of_birth'].toString() isGlobal channel 5 New birthDate Step JavaScript Script var year = msg['demographic_year_of_birth'].toString(); var month = msg['demographic_month_of_birth'].toString(); var day = msg['demographic_date_of_birth'].toString(); if (month.length == 1) { month = '0' + month; }else if (month.length != 2){ logger.error('Patient with invalid birth month'); } if (day.length == 1) { day = '0' + day; }else if (month.length != 2){ logger.error('Patient with invalid birth day'); } channelMap.put('birthDate2',year + month + day); PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxy ZXN1bHQ+CiAgICA8ZGVtb2dyYXBoaWNfZGVtb2dyYXBoaWNfbm8+dmFsdWU8L2RlbW9ncmFwaGlj X2RlbW9ncmFwaGljX25vPgogICAgPGRlbW9ncmFwaGljX2xhc3RfbmFtZT52YWx1ZTwvZGVtb2dy YXBoaWNfbGFzdF9uYW1lPgogICAgPGRlbW9ncmFwaGljX2ZpcnN0X25hbWU+dmFsdWU8L2RlbW9n cmFwaGljX2ZpcnN0X25hbWU+CiAgICA8ZGVtb2dyYXBoaWNfeWVhcl9vZl9iaXJ0aD52YWx1ZTwv ZGVtb2dyYXBoaWNfeWVhcl9vZl9iaXJ0aD4KICAgIDxkZW1vZ3JhcGhpY19tb250aF9vZl9iaXJ0 aD52YWx1ZTwvZGVtb2dyYXBoaWNfbW9udGhfb2ZfYmlydGg+CiAgICA8ZGVtb2dyYXBoaWNfZGF0 ZV9vZl9iaXJ0aD52YWx1ZTwvZGVtb2dyYXBoaWNfZGF0ZV9vZl9iaXJ0aD4KICAgIDxkZW1vZ3Jh cGhpY19oaW4+dmFsdWU8L2RlbW9ncmFwaGljX2hpbj4KICAgIDxkZW1vZ3JhcGhpY19zZXg+dmFs dWU8L2RlbW9ncmFwaGljX3NleD4KPC9yZXN1bHQ+Cg== XML HL7V2 true true false false true false false Database Reader SOURCE true 2.2.1.5861 Destination 1 HTTP Sender Basic UTF-8 <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="CDA.xsl"?> <!-- Readers should be aware of the evolving "Using SNOMED CT in HL7 Version 3" implementation guide, currently in a draft state. The guide, co-developed by HL7 and the College of American Pathologists, will be balloted by HL7 as an Informative Document. Recommendations in the final published guide should usurp patterns of SNOMED CT usage found in this sample instance. --> <ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"> <!-- ******************************************************** CDA Header ******************************************************** --> <effectiveTime value="20000407"/> <templateId root="scoop_basic"/> <recordTarget> <patientRole> <id extension="${pid}" root="2.16.840.1.113883.19.5"/> <patient> <name> <given>${firstName}</given> <family>${lastName}</family> </name> <administrativeGenderCode code="${gender}" codeSystem="2.16.840.1.113883.5.1"/> <birthTime value="${birthDate2}"/> </patient> </patientRole> </recordTarget> </ClinicalDocument> text/xml <properties/> 0 post 1 <properties/> sink 30000 0 http://localhost:3000/records/relay 200 10000 0 0 HL7V2 HL7V2 true false false true false false true false false true false false HTTP Sender DESTINATION true 2.2.1.5861 true false false false started -1 true true false // Modify the message variable below to pre process data return message; // This script executes once after a message has been processed return; // This script executes once when the channel is deployed // You only have access to the globalMap and globalChannelMap here to persist data return; // This script executes once when the channel is undeployed // You only have access to the globalMap and globalChannelMap here to persist data return;