Initial commit

master
James Dempsey 2014-12-04 12:10:53 -05:00
commit 11233cf04f
6 changed files with 434 additions and 0 deletions

17
Dockerfile 100644
View File

@ -0,0 +1,17 @@
FROM ubuntu
RUN apt-get update && apt-get -y install software-properties-common
RUN apt-add-repository ppa:webupd8team/java -y
RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN apt-get update && apt-get -y install tasksel lamp-server^ oracle-java7-installer curl && apt-get purge openjdk-\*
ADD templates/mirthconnect /usr/local/mirthconnect
WORKDIR /usr/local/mirthconnect
RUN curl -O http://downloads.mirthcorp.com/connect/3.1.1.7461.b23/mirthconnect-3.1.1.7461.b23-unix.sh
RUN chmod +x mirthconnect-3.1.1.7461.b23-unix.sh mirthconnect-install-wrapper.sh mirthconnect-wrapper.sh
RUN ./mirthconnect-install-wrapper.sh
EXPOSE 8080 8443 6661
CMD ./mirthconnect-wrapper.sh

17
README.md 100644
View File

@ -0,0 +1,17 @@
Build the image and run with the following command:
docker run -p 8080:8080 -p 8443:8443 -p 6661:6661 IMAGE_NAME
You can launch Mirth Connect Administrator by visiting <docker ip>:8080
The default username and password are admin/admin
You should see the test channel deployed and running on the dashboard view.
To test that this is working, you'll need a tool like [HL7 Inspector](http://sourceforge.net/projects/hl7inspector/)
Download some [sample HL7 messages](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=228)
Import the ADT_A01.xsd sample HL7 message in Inspector and open the Message Sender pane. Open Send Options and change the Host/Port to <docker ip>:6661
Highlight the message and click Send. You should see an Acknowledge message in the pane below and the message statistics should increase in Mirth Connect Administrator.

View File

@ -0,0 +1,2 @@
import "mirthconnect-test-channel.xml"
deploy

View File

@ -0,0 +1,41 @@
#!/bin/sh
./mirthconnect-3.1.1.7461.b23-unix.sh <<!
/opt/mirthconnect/apps
/opt/mirthconnect/logs
n
!
exit 0

View File

@ -0,0 +1,351 @@
<channel version="3.1.1">
<id>c2a8a9a3-cdeb-46ea-9f93-65f40140a0ac</id>
<nextMetaDataId>2</nextMetaDataId>
<name>test</name>
<description></description>
<enabled>true</enabled>
<lastModified>
<time>1417634430586</time>
<timezone>America/New_York</timezone>
</lastModified>
<revision>1</revision>
<sourceConnector version="3.1.1">
<metaDataId>0</metaDataId>
<name>sourceConnector</name>
<properties class="com.mirth.connect.connectors.tcp.TcpReceiverProperties" version="3.1.1">
<pluginProperties/>
<listenerConnectorProperties version="3.1.1">
<host>0.0.0.0</host>
<port>6661</port>
</listenerConnectorProperties>
<sourceConnectorProperties version="3.1.1">
<responseVariable>Auto-generate (After source transformer)</responseVariable>
<respondAfterProcessing>true</respondAfterProcessing>
<processBatch>false</processBatch>
<firstResponse>true</firstResponse>
</sourceConnectorProperties>
<transmissionModeProperties class="com.mirth.connect.plugins.mllpmode.MLLPModeProperties">
<pluginPointName>MLLP</pluginPointName>
<startOfMessageBytes>0B</startOfMessageBytes>
<endOfMessageBytes>1C0D</endOfMessageBytes>
<useMLLPv2>false</useMLLPv2>
<ackBytes>06</ackBytes>
<nackBytes>15</nackBytes>
<maxRetries>2</maxRetries>
</transmissionModeProperties>
<serverMode>true</serverMode>
<remoteAddress></remoteAddress>
<remotePort></remotePort>
<overrideLocalBinding>false</overrideLocalBinding>
<reconnectInterval>5000</reconnectInterval>
<receiveTimeout>0</receiveTimeout>
<bufferSize>65536</bufferSize>
<maxConnections>10</maxConnections>
<keepConnectionOpen>true</keepConnectionOpen>
<dataTypeBinary>false</dataTypeBinary>
<charsetEncoding>DEFAULT_ENCODING</charsetEncoding>
<respondOnNewConnection>0</respondOnNewConnection>
<responseAddress></responseAddress>
<responsePort></responsePort>
</properties>
<transformer version="3.1.1">
<steps/>
<inboundDataType>HL7V2</inboundDataType>
<outboundDataType>HL7V2</outboundDataType>
<inboundProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DataTypeProperties" version="3.1.1">
<serializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2SerializationProperties" version="3.1.1">
<handleRepetitions>true</handleRepetitions>
<handleSubcomponents>true</handleSubcomponents>
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<stripNamespaces>true</stripNamespaces>
<segmentDelimiter>\r</segmentDelimiter>
<convertLineBreaks>true</convertLineBreaks>
</serializationProperties>
<deserializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DeserializationProperties" version="3.1.1">
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<segmentDelimiter>\r</segmentDelimiter>
</deserializationProperties>
<batchProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2BatchProperties" version="3.1.1">
<splitType>MSH_Segment</splitType>
<batchScript></batchScript>
</batchProperties>
<responseGenerationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseGenerationProperties" version="3.1.1">
<segmentDelimiter>\r</segmentDelimiter>
<successfulACKCode>AA</successfulACKCode>
<successfulACKMessage></successfulACKMessage>
<errorACKCode>AE</errorACKCode>
<errorACKMessage>An Error Occurred Processing Message.</errorACKMessage>
<rejectedACKCode>AR</rejectedACKCode>
<rejectedACKMessage>Message Rejected.</rejectedACKMessage>
<msh15ACKAccept>false</msh15ACKAccept>
</responseGenerationProperties>
<responseValidationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseValidationProperties" version="3.1.1">
<successfulACKCode>AA,CA</successfulACKCode>
<errorACKCode>AE,CE</errorACKCode>
<rejectedACKCode>AR,CR</rejectedACKCode>
</responseValidationProperties>
</inboundProperties>
<outboundProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DataTypeProperties" version="3.1.1">
<serializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2SerializationProperties" version="3.1.1">
<handleRepetitions>true</handleRepetitions>
<handleSubcomponents>true</handleSubcomponents>
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<stripNamespaces>true</stripNamespaces>
<segmentDelimiter>\r</segmentDelimiter>
<convertLineBreaks>true</convertLineBreaks>
</serializationProperties>
<deserializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DeserializationProperties" version="3.1.1">
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<segmentDelimiter>\r</segmentDelimiter>
</deserializationProperties>
<batchProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2BatchProperties" version="3.1.1">
<splitType>MSH_Segment</splitType>
<batchScript></batchScript>
</batchProperties>
<responseGenerationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseGenerationProperties" version="3.1.1">
<segmentDelimiter>\r</segmentDelimiter>
<successfulACKCode>AA</successfulACKCode>
<successfulACKMessage></successfulACKMessage>
<errorACKCode>AE</errorACKCode>
<errorACKMessage>An Error Occurred Processing Message.</errorACKMessage>
<rejectedACKCode>AR</rejectedACKCode>
<rejectedACKMessage>Message Rejected.</rejectedACKMessage>
<msh15ACKAccept>false</msh15ACKAccept>
</responseGenerationProperties>
<responseValidationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseValidationProperties" version="3.1.1">
<successfulACKCode>AA,CA</successfulACKCode>
<errorACKCode>AE,CE</errorACKCode>
<rejectedACKCode>AR,CR</rejectedACKCode>
</responseValidationProperties>
</outboundProperties>
</transformer>
<filter version="3.1.1">
<rules/>
</filter>
<transportName>TCP Listener</transportName>
<mode>SOURCE</mode>
<enabled>true</enabled>
<waitForPrevious>true</waitForPrevious>
</sourceConnector>
<destinationConnectors>
<connector version="3.1.1">
<metaDataId>1</metaDataId>
<name>Destination 1</name>
<properties class="com.mirth.connect.connectors.vm.VmDispatcherProperties" version="3.1.1">
<pluginProperties/>
<destinationConnectorProperties version="3.1.1">
<queueEnabled>false</queueEnabled>
<sendFirst>false</sendFirst>
<retryIntervalMillis>10000</retryIntervalMillis>
<regenerateTemplate>false</regenerateTemplate>
<retryCount>0</retryCount>
<rotate>false</rotate>
<threadCount>1</threadCount>
<validateResponse>false</validateResponse>
</destinationConnectorProperties>
<channelId>none</channelId>
<channelTemplate>${message.encodedData}</channelTemplate>
<mapVariables/>
</properties>
<transformer version="3.1.1">
<steps/>
<inboundDataType>HL7V2</inboundDataType>
<outboundDataType>HL7V2</outboundDataType>
<inboundProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DataTypeProperties" version="3.1.1">
<serializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2SerializationProperties" version="3.1.1">
<handleRepetitions>true</handleRepetitions>
<handleSubcomponents>true</handleSubcomponents>
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<stripNamespaces>true</stripNamespaces>
<segmentDelimiter>\r</segmentDelimiter>
<convertLineBreaks>true</convertLineBreaks>
</serializationProperties>
<deserializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DeserializationProperties" version="3.1.1">
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<segmentDelimiter>\r</segmentDelimiter>
</deserializationProperties>
<batchProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2BatchProperties" version="3.1.1">
<splitType>MSH_Segment</splitType>
<batchScript></batchScript>
</batchProperties>
<responseGenerationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseGenerationProperties" version="3.1.1">
<segmentDelimiter>\r</segmentDelimiter>
<successfulACKCode>AA</successfulACKCode>
<successfulACKMessage></successfulACKMessage>
<errorACKCode>AE</errorACKCode>
<errorACKMessage>An Error Occurred Processing Message.</errorACKMessage>
<rejectedACKCode>AR</rejectedACKCode>
<rejectedACKMessage>Message Rejected.</rejectedACKMessage>
<msh15ACKAccept>false</msh15ACKAccept>
</responseGenerationProperties>
<responseValidationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseValidationProperties" version="3.1.1">
<successfulACKCode>AA,CA</successfulACKCode>
<errorACKCode>AE,CE</errorACKCode>
<rejectedACKCode>AR,CR</rejectedACKCode>
</responseValidationProperties>
</inboundProperties>
<outboundProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DataTypeProperties" version="3.1.1">
<serializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2SerializationProperties" version="3.1.1">
<handleRepetitions>true</handleRepetitions>
<handleSubcomponents>true</handleSubcomponents>
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<stripNamespaces>true</stripNamespaces>
<segmentDelimiter>\r</segmentDelimiter>
<convertLineBreaks>true</convertLineBreaks>
</serializationProperties>
<deserializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DeserializationProperties" version="3.1.1">
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<segmentDelimiter>\r</segmentDelimiter>
</deserializationProperties>
<batchProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2BatchProperties" version="3.1.1">
<splitType>MSH_Segment</splitType>
<batchScript></batchScript>
</batchProperties>
<responseGenerationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseGenerationProperties" version="3.1.1">
<segmentDelimiter>\r</segmentDelimiter>
<successfulACKCode>AA</successfulACKCode>
<successfulACKMessage></successfulACKMessage>
<errorACKCode>AE</errorACKCode>
<errorACKMessage>An Error Occurred Processing Message.</errorACKMessage>
<rejectedACKCode>AR</rejectedACKCode>
<rejectedACKMessage>Message Rejected.</rejectedACKMessage>
<msh15ACKAccept>false</msh15ACKAccept>
</responseGenerationProperties>
<responseValidationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseValidationProperties" version="3.1.1">
<successfulACKCode>AA,CA</successfulACKCode>
<errorACKCode>AE,CE</errorACKCode>
<rejectedACKCode>AR,CR</rejectedACKCode>
</responseValidationProperties>
</outboundProperties>
</transformer>
<responseTransformer version="3.1.1">
<steps/>
<inboundDataType>HL7V2</inboundDataType>
<outboundDataType>HL7V2</outboundDataType>
<inboundProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DataTypeProperties" version="3.1.1">
<serializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2SerializationProperties" version="3.1.1">
<handleRepetitions>true</handleRepetitions>
<handleSubcomponents>true</handleSubcomponents>
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<stripNamespaces>true</stripNamespaces>
<segmentDelimiter>\r</segmentDelimiter>
<convertLineBreaks>true</convertLineBreaks>
</serializationProperties>
<deserializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DeserializationProperties" version="3.1.1">
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<segmentDelimiter>\r</segmentDelimiter>
</deserializationProperties>
<batchProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2BatchProperties" version="3.1.1">
<splitType>MSH_Segment</splitType>
<batchScript></batchScript>
</batchProperties>
<responseGenerationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseGenerationProperties" version="3.1.1">
<segmentDelimiter>\r</segmentDelimiter>
<successfulACKCode>AA</successfulACKCode>
<successfulACKMessage></successfulACKMessage>
<errorACKCode>AE</errorACKCode>
<errorACKMessage>An Error Occurred Processing Message.</errorACKMessage>
<rejectedACKCode>AR</rejectedACKCode>
<rejectedACKMessage>Message Rejected.</rejectedACKMessage>
<msh15ACKAccept>false</msh15ACKAccept>
</responseGenerationProperties>
<responseValidationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseValidationProperties" version="3.1.1">
<successfulACKCode>AA,CA</successfulACKCode>
<errorACKCode>AE,CE</errorACKCode>
<rejectedACKCode>AR,CR</rejectedACKCode>
</responseValidationProperties>
</inboundProperties>
<outboundProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DataTypeProperties" version="3.1.1">
<serializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2SerializationProperties" version="3.1.1">
<handleRepetitions>true</handleRepetitions>
<handleSubcomponents>true</handleSubcomponents>
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<stripNamespaces>true</stripNamespaces>
<segmentDelimiter>\r</segmentDelimiter>
<convertLineBreaks>true</convertLineBreaks>
</serializationProperties>
<deserializationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2DeserializationProperties" version="3.1.1">
<useStrictParser>false</useStrictParser>
<useStrictValidation>false</useStrictValidation>
<segmentDelimiter>\r</segmentDelimiter>
</deserializationProperties>
<batchProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2BatchProperties" version="3.1.1">
<splitType>MSH_Segment</splitType>
<batchScript></batchScript>
</batchProperties>
<responseGenerationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseGenerationProperties" version="3.1.1">
<segmentDelimiter>\r</segmentDelimiter>
<successfulACKCode>AA</successfulACKCode>
<successfulACKMessage></successfulACKMessage>
<errorACKCode>AE</errorACKCode>
<errorACKMessage>An Error Occurred Processing Message.</errorACKMessage>
<rejectedACKCode>AR</rejectedACKCode>
<rejectedACKMessage>Message Rejected.</rejectedACKMessage>
<msh15ACKAccept>false</msh15ACKAccept>
</responseGenerationProperties>
<responseValidationProperties class="com.mirth.connect.plugins.datatypes.hl7v2.HL7v2ResponseValidationProperties" version="3.1.1">
<successfulACKCode>AA,CA</successfulACKCode>
<errorACKCode>AE,CE</errorACKCode>
<rejectedACKCode>AR,CR</rejectedACKCode>
</responseValidationProperties>
</outboundProperties>
</responseTransformer>
<filter version="3.1.1">
<rules/>
</filter>
<transportName>Channel Writer</transportName>
<mode>DESTINATION</mode>
<enabled>true</enabled>
<waitForPrevious>true</waitForPrevious>
</connector>
</destinationConnectors>
<preprocessingScript>// Modify the message variable below to pre process data
return message;</preprocessingScript>
<postprocessingScript>// This script executes once after a message has been processed
// Responses returned from here will be stored as &quot;Postprocessor&quot; in the response map
return;</postprocessingScript>
<deployScript>// This script executes once when the channel is deployed
// You only have access to the globalMap and globalChannelMap here to persist data
return;</deployScript>
<undeployScript>// This script executes once when the channel is undeployed
// You only have access to the globalMap and globalChannelMap here to persist data
return;</undeployScript>
<properties version="3.1.1">
<clearGlobalChannelMap>true</clearGlobalChannelMap>
<messageStorageMode>DEVELOPMENT</messageStorageMode>
<encryptData>false</encryptData>
<removeContentOnCompletion>false</removeContentOnCompletion>
<removeAttachmentsOnCompletion>false</removeAttachmentsOnCompletion>
<initialState>STARTED</initialState>
<storeAttachments>false</storeAttachments>
<tags class="linked-hash-set"/>
<metaDataColumns>
<metaDataColumn>
<name>SOURCE</name>
<type>STRING</type>
<mappingName>mirth_source</mappingName>
</metaDataColumn>
<metaDataColumn>
<name>TYPE</name>
<type>STRING</type>
<mappingName>mirth_type</mappingName>
</metaDataColumn>
</metaDataColumns>
<attachmentProperties>
<type>None</type>
<properties/>
</attachmentProperties>
<archiveEnabled>true</archiveEnabled>
</properties>
</channel>

View File

@ -0,0 +1,6 @@
#!/bin/bash
./mcservice start
while ! echo exit | nc localhost 8443; do sleep 0.1; done
java -jar mirth-cli-launcher.jar -a https://localhost:8443 -u admin -p admin -v 0.0.0 -s mirthconnect-cli.txt
tail -f /usr/local/mirthconnect/logs/mirth.log