The Lollipop Router is an LLP listener that can route incoming HL7 messages based on their content to HTTP or LLP endpoints. Endpoints can use protocols LLP, HoH or HTTP/S via simple POST. Content based routing and endpoints are configured via a configuration file. The default configuration parser is a YAML parser for a file in the format, as shown below. All attributes are optional. Any attribute not explicitly defined is treated as a wild card (matching any incoming message value). Other types of configuration (parsers or factories) can be injected using beans.xml mechanism.
For information on HL7 over HTTP, see http://hl7api.sourceforge.net/
The example configuration below is one way to implement the diagram above. "routing3" below will match all incoming messages. However, ADT_A01 and OMP_O09 messages will be routed based on "routing1" and "routing2"; respectively. The routings are searched and compared with incoming messages based on the order presented in the configuration file. Protocols handled are http, hoh and llp.
name: Example Configuration port: 36500 acceptedSocketTimeout: 15000 threadPoolSize: 10 threadPoolMax: 25 threadKeepAlive: 8000 routings: - name: routing1 responseTimeout: 15000 messageType: ADT triggerEvent: A01 protocol: hoh endpoint: http://example.com/v251/adt version: 2.5.1 sendingApplication: ZJTH VISTA sendingFacility: 2204 receivingApplication: ZJTH HOH receivingFacility: 36500 - name: routing2 responseTimeout: 15000 messageType: OMP triggerEvent: O09 protocol: http endpoint: http://example.com/v26/omp version: 2.6 sendingApplication: ZJTH VISTA sendingFacility: 2204 receivingApplication: ZJTH HOH receivingFacility: 36500 - name: routing3 responseTimeout: 15000 protocol: llp endpoint: llp://example.com:5188
Quick Start (daemon)
Go to Maven Repository
download the latest lollipop-services.jar, lollipop-daemon.jar version.
These additional libraries are required (and are easily extracted from the lollipop-webapp.war (zip) and located under WEB-INF/lib folder):
bcmail-jdk16-1.46.jar hapi-hl7overhttp-2.2.jar okhttp-2.2.0.jar bcprov-jdk16-1.46.jar jcl-over-slf4j-1.7.10.jar okio-1.2.0.jar cal10n-api-0.8.1.jar log4j-over-slf4j-1.7.10.jar slf4j-api-1.7.10.jar commons-lang-2.6.jar logback-classic-1.1.2.jar slf4j-ext-1.7.10.jar guava-18.0.jar logback-core-1.1.2.jar snakeyaml-1.14.jar hapi-base-2.2.jar
- Put lollipop-services.jar and lollipop-daemon.jar into a lib folder
- Put the above jars into the same lib folder
- Create a routing.yml configuration in the current directory
- Execute the following command
java -cp "lib/*" -Dconfig.file=routing.yml us.hornerscorners.lollipop.Main
Quick Start (webapp)
Go to Maven Repository
download the latest lollipop-webapp.war version.
- Create a routing.yml configuration
- Set a system property in your application server
- -Dconfig.file=[some location]/routing.yml
- restart server
- Deploy lollipop-webapp.war
The project is available from the Maven Central Repository, thanks to Sonatype OSS Repository Hosting.