db9155b6-14a6-4dff-86cc-9f0723dd3969Load hQuery Gateway Databasetrue2.2.1.5861America/Vancouver19sourceConnectorDatabase Readerjdbc:mysql://localhost:3306/Oscar12com.mysql.jdbc.Driverquerykzwp3743500000interval1SELECT 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 demographic00root0firstNameMapperVariablefirstNameDefaultValueMappingmsg['demographic_first_name'].toString()RegularExpressionsisGlobalchannel1lastNameMapperVariablelastNameDefaultValueMappingmsg['demographic_last_name'].toString()RegularExpressionsisGlobalchannel2genderMapperVariablegenderDefaultValueMappingmsg['demographic_sex'].toString()RegularExpressionsisGlobalchannel3pidMapperVariablepidDefaultValueMappingmsg['demographic_hin'].toString()RegularExpressionsisGlobalchannel4birthDateMapperVariablebirthDateDefaultValueRegularExpressionsMappingmsg['demographic_year_of_birth'].toString() + msg['demographic_month_of_birth'].toString() + msg['demographic_date_of_birth'].toString()isGlobalchannel5New birthDate StepJavaScriptScriptvar 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==XMLHL7V2truetruefalsefalsetruefalsefalseDatabase ReaderSOURCEtrue2.2.1.5861Destination 1HTTP SenderBasicUTF-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/>0post1<properties/>sink300000http://localhost:3000/records/relay2001000000HL7V2HL7V2truefalsefalsetruefalsefalsetruefalsefalsetruefalsefalseHTTP SenderDESTINATIONtrue2.2.1.5861truefalsefalsefalsestarted-1truetruefalse// 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;