https://github.com/cdcgov/sdp-cbr

https://github.com/cdcgov/sdp-cbr

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: CDCgov
  • License: apache-2.0
  • Language: Java
  • Default Branch: master
  • Size: 957 KB
Statistics
  • Stars: 3
  • Watchers: 11
  • Forks: 6
  • Open Issues: 0
  • Releases: 2
Created over 9 years ago · Last pushed almost 8 years ago
Metadata Files
Readme License

README.md

Surveillance Data Platform Content Based Routing (SDP-CBR)

This Github organization was created for use by CDC programs to collaborate on public health surveillance related projects in support of the CDC Surveillance Strategy. This third party web application is not hosted by the CDC, but is used by CDC and its partners to share information and collaborate on software.

This repository serves as a template for other repositories to follow in order to provide the appropriate notices for users in regards to privacy protection, contribution, licensing, copyright, records management and collaboration.

Public Domain:

This project constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this project will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.

License

The project utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.

This program is free software: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.

You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html

Privacy

This project contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Surveillance Platform Disclaimer and Code of Conduct. For more information about CDC's privacy policy, please visit http://www.cdc.gov/privacy.html.

Contributing

Anyone is encouraged to contribute to the project by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.

All comments, messages, pull requests, and other submissions received through CDC including this GitHub page are subject to the Presidential Records Act and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.

Records

This project is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site

Notices

Please refer to CDC's Template Repository for more information about contributing to this repository, public domain notices and disclaimers, and code of conduct.

Hat-tips

Thanks to 18F's open source policy and code of conduct that were very useful in setting up this GitHub organization. Thanks to CDC's Informatics Innovation Unit that was helpful in modeling the code of conduct.

SDP-CBR

This example demonstrates how to configure Camel routes in Spring Boot via a Spring XML configuration file.

The application utilizes the Spring @ImportResource annotation to load a Camel Context definition via a camel-context.xml file on the classpath.

Building

The application can be built with the following command

mvn clean package

Databases

The application depends on a number of databases and connections in order to run. All databases are defined in the application properties, which should be configured for the environment.

Required databases for deployment are the phinMsDataSource and sdpqDataSource. The phinMsDataSource should have the table messageinq, which can be created in SQLServer using the script at main/db/MSSQLmessage_inq.sql. The other tables will be created as needed by the application.

Testing

The application unit tests can be run with the following command

mvn test

In order for the tests to succeed, the test datasources must be properly configured. All test datasources are specified in the test properties file at src/test/resources/application.properties. If any of the datasources are not configured, the tests will fail.

Required databases for tests are nndssDataSource, sdpqDataSource, and phinMsDataSource. The phinMsDataSource should have the table messageinq, which can be created in SQLServer using the script at main/db/MSSQLmessage_inq.sql. The other tables will be created as needed by the application.

Running the application in OpenShift

The application is setup as a series of maven sub modules. The sub modules comprise both reusable components such as the database queue component as well as modules that comprise portions of the application that are meant to be run. The two modules that are meant to be run are the phinms and foodnet modules. You can run either of these on OpenShift with the following description provided the commands are executed from within the modules sub directory. It is assumed that: - OpenShift platform is already running, if not you can find details how to Install OpenShift at your site. - Your system is configured for Fabric8 Maven Workflow, if not you can find a Get Started Guide

The application can be built and run on OpenShift using a single goal:

mvn fabric8:deploy

To list all the running pods:

oc get pods

Then find the name of the pod that runs this quickstart, and output the logs from the running pods with:

oc logs <name of pod>

You can also use the OpenShift web console to manage the running pods, and view logs and much more.

Running via an S2I Application Template

Application templates allow you deploy applications to OpenShift by filling out a form in the OpenShift console that allows you to adjust deployment parameters. This template uses an S2I source build so that it handle building and deploying the application for you.

First, import the Fuse image streams:

oc create -f https://raw.githubusercontent.com/jboss-fuse/application-templates/GA/fis-image-streams.json

Then create the quickstart template:

oc create -f https://raw.githubusercontent.com/jboss-fuse/application-templates/GA/quickstarts/spring-boot-camel-xml-template.json

Now when you use "Add to Project" button in the OpenShift console, you should see a template for this quickstart.

The s2i templates will build the entire project and assumes that the resulting build will place the application in a single jar file in the top level target directory of the project. As this is not the case for this project's setup you will need to add an environment variable that will inform the s2i template where to look for the resulting jar file to run. The variable is ARTIFACT_DIRECTORY and it must be set to either phinms/target or foodNet/target depending on which route is being deployed.

Deploying SDP-CBR in an empty OpenShift project

A repository of scripts and templates has been created which can be used to generate a deployment of CBR in an empty OpenShift project. The command used to generate the initial (un-parameterized) version of the main CBR template is the following:

oc export is,bc,dc,svc,cm,secret,pvc -l promotion-group=cbr -o yaml --as-template="cbr" > sdp-cbr-project-template.yaml

In order to replicate the resource quotas/constraints present across environments, the following commands were used to generate the Quota and LimitRange files:

oc export quota/sdpcbr-quota -o yaml > sdpcbr-quota.yaml

oc export LimitRange/sdpcbr-limits -o yaml > sdpcbr-limits.yaml

Running the application locally

The maven command to build the application described above produces an all-in-one jar file that can be run locally for both the foodnet and phinms sub modules. The jar files are created in the target directory of the individual sub projects and can be run with the following commands.

 java -jar foodNet/target/sdp-cbr-foodnet-1.1.0.jar 
 java -jar phinms/target/sdp-cbr-phinms-1.1.0.jar 

When running locally, the application can be configured through extenal properties files according to the spring boot framework conventions. Information on this external configuration can be found in the Spring Boot documentation in the chapter Externalized Configuration.

The base properties for the application are contained in the src/main/resources/application.properties file. This file is basically a template for fields that will need to be filled out in order for the routes to run. Please review the file in order to understand the configuration parameters that are required.

Running CBR in Minishift or Red Hat Container Development Kit (CDK)

It does not seem possible to run CBR successfully in Minishift or CDK while connected to a VPN and behind a corporate firewall. The workaround suggested in Minishift and CBR documentation is to shutdown the VPN, but this may be a violation of your orgainization's policies.

Filtering on HL7 message contents

The HL7Terser is designed to allow for complex filter parameters to be defined via the routes in the camel-context.xml file. For more information on filter syntax, please review the syntax instruction in Definitions.txt.

Owner

  • Name: Centers for Disease Control and Prevention
  • Login: CDCgov
  • Kind: organization
  • Email: data@cdc.gov
  • Location: Atlanta, GA

CDC's collaborative software projects to protect America from health, safety, and security threats, both foreign and in the U.S.

GitHub Events

Total
  • Fork event: 2
Last Year
  • Fork event: 2

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 193
  • Total Committers: 10
  • Avg Commits per committer: 19.3
  • Development Distribution Score (DDS): 0.715
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Rob Dingwell r****b@r****g 55
Kevin Hennessy k****y@m****g 47
Betsy Cole e****e@m****g 36
Andy Gregorowicz a****y@m****g 20
Troy Crews t****s@m****g 19
Matthew Bajzek m****k@m****g 6
Betsy Cole E****E@M****G 5
Tim Taylor t****r@m****g 2
Yaremis Solá y****a@c****v 2
Joe Hunt j****t@m****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 115
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 days
  • Total issue authors: 0
  • Total pull request authors: 7
  • Average comments per issue: 0
  • Average comments per pull request: 0.3
  • Merged pull requests: 110
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • khennessy2 (18)
  • bccole (17)
  • rdingwell (12)
  • troycrews (8)
  • mkbajzek (4)
  • eedrummer (3)
  • ttaylor249 (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

aphl/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-common 1.2.0
database_queue/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-common 1.2.0
  • org.apache.activemq:activemq-broker 5.15.2
  • org.apache.activemq:activemq-camel 5.15.2
  • org.apache.activemq:activemq-client 5.15.2
  • org.apache.activemq:activemq-pool 5.15.2
foodNet/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-aphl 1.2.0
  • gov.cdc.sdp:sdp-cbr-common 1.2.0
  • gov.cdc.sdp:sdp-cbr-queue 1.2.0
hl7v2filter/pom.xml maven
  • ca.uhn.hapi:hapi-base 2.2
  • ca.uhn.hapi:hapi-structures-v21 2.2
  • ca.uhn.hapi:hapi-structures-v22 2.2
  • ca.uhn.hapi:hapi-structures-v23 2.2
  • ca.uhn.hapi:hapi-structures-v231 2.2
  • ca.uhn.hapi:hapi-structures-v24 2.2
  • ca.uhn.hapi:hapi-structures-v25 2.2
  • ca.uhn.hapi:hapi-structures-v251 2.2
  • ca.uhn.hapi:hapi-structures-v26 2.2
  • junit:junit 4.4
  • org.antlr:antlr4-runtime 4.7
  • org.slf4j:log4j-over-slf4j 1.6.2
  • org.slf4j:slf4j-api 1.6.0
  • org.slf4j:slf4j-simple 1.6.0
phinms/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-aphl 1.2.0
  • gov.cdc.sdp:sdp-cbr-common 1.2.0
  • gov.cdc.sdp:sdp-cbr-filter 1.2.0
  • gov.cdc.sdp:sdp-cbr-queue 1.2.0
pom.xml maven
  • io.fabric8:fabric8-project-bom-camel-spring-boot 2.2.170.redhat-000010 import
  • ca.uhn.hapi:hapi-base 2.2
  • ca.uhn.hapi:hapi-structures-v21 2.2
  • ca.uhn.hapi:hapi-structures-v22 2.2
  • ca.uhn.hapi:hapi-structures-v23 2.2
  • ca.uhn.hapi:hapi-structures-v231 2.2
  • ca.uhn.hapi:hapi-structures-v24 2.2
  • ca.uhn.hapi:hapi-structures-v25 2.2
  • ca.uhn.hapi:hapi-structures-v251 2.2
  • ca.uhn.hapi:hapi-structures-v26 2.2
  • com.amazonaws:aws-java-sdk-s3 1.11.133
  • com.google.code.gson:gson 2.8.0
  • com.google.guava:guava 22.0
  • com.microsoft.sqlserver:mssql-jdbc 6.1.0.jre8
  • commons-dbcp:commons-dbcp
  • de.saly:javamail-mock2-fullmock 0.5-beta3
  • javax.inject:javax.inject
  • mysql:mysql-connector-java 5.1.6
  • org.apache.camel:camel-aws 2.18.1.redhat-000012
  • org.apache.camel:camel-hl7 2.18.1.redhat-000012
  • org.apache.camel:camel-http4
  • org.apache.camel:camel-jackson 2.18.1.redhat-000012
  • org.apache.camel:camel-mail
  • org.apache.camel:camel-mail 2.18.1.redhat-000012
  • org.apache.camel:camel-script 2.18.1.redhat-000012
  • org.apache.camel:camel-script-starter 2.18.1.redhat-000012
  • org.apache.camel:camel-spring-boot-starter 2.18.1.redhat-000012
  • org.apache.camel:camel-sql
  • org.apache.camel:camel-sql 2.18.1.redhat-000012
  • org.apache.camel:camel-sql-starter 2.18.1.redhat-000012
  • org.apache.camel:camel-test
  • org.apache.camel:camel-test-spring
  • org.apache.commons:commons-csv 1.3
  • org.apache.derby:derby
  • org.apache.httpcomponents:httpclient-osgi 4.5.3
  • org.apache.httpcomponents:httpmime
  • org.postgresql:postgresql
  • org.springframework.boot:spring-boot-starter-actuator
  • org.springframework.boot:spring-boot-starter-web
  • io.fabric8:fabric8-arquillian test
  • io.findify:s3mock_2.12 0.2.3 test
  • junit:junit test
  • org.apache.camel:camel-test 2.18.1.redhat-000012 test
  • org.apache.camel:camel-test-spring 2.18.1.redhat-000012 test
  • org.jboss.arquillian.junit:arquillian-junit-container test
  • org.openjdk.jmh:jmh-core 1.13 test
  • org.springframework.boot:spring-boot-starter-test test
  • org.springframework:spring-test test
restapi/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-trace 1.2.0
sdp-cbr-filter/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-common 1.2.0
trace_log/pom.xml maven
  • gov.cdc.sdp:sdp-cbr-common 1.2.0