CDCgov/SDP-Vocabulary-Service

Name: SDP-Vocabulary-Service

Owner: Centers for Disease Control and Prevention Surveillance Strategy

Description: Repository for the development of the initial SDP vocabulary service.

Created: 2016-09-19 19:28:16.0

Updated: 2018-05-23 19:22:00.0

Pushed: 2018-05-24 01:58:30.0

Homepage: null

Size: 24333

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

SDP Vocabulary Service

Repository for the development of the initial Surveillance Data Platform (SDP) vocabulary service.

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

Please visit the SDP CDC Web Site or SDP Wiki for more information on the project and new services.

This service is designed as part of the SDP and other services are available through the platform repository.

Getting Started
Prerequisites

The SDP Vocabulary Service requires: Ruby (version 2.3 or later), bundler (version 1.13.6 or later), Yarn (version 0.27 or later), Node.js (version 5.5 or later), Postgres (version 9.6 or later) and optionally Elasticsearch (version 5.3.1 or later), Chrome (version 59 or later), and ChromeDriver (version 2.30 or later).

Ruby >= 2.3 Bundler >= 1.13.6
install bundler
Yarn >= 0.27.5 Node.js >= 5.5 PostgreSQL >= 9.6
 apt-get postgresql-server-dev-9.6
: FATAL:  role "<username>" does not exist
 -u postgres createuser -d <username>
(Optional) Install Elasticsearch >= 5.3.1 (Optional) Install Chrome >= 59 (Optional) Install ChromeDriver >= 2.30
Install Dependencies
Ruby Dependencies
le install
 apt-get install build-essential
Dependencies
 install
Set up the database
rails db:create
rails db:migrate RAILS_ENV=development

rails db:migrate RAILS_ENV=test

rails db:seed
 cdc:import_jupiter
 csv file with systems
 cdc:import_systems[<your csv file with systems.csv>]

 csv file with programs
 cdc:import_programs[<your csv file with programs.csv>]

n excel file with programs and systems
import_excel[<your excel file with programs and systems.xlsx>]
Start the Service
man start -p 3000
Run Tests

le exec cucumber
Elasticsearch
 es:sync
Useful commands
 admin:create_user[useremail@example.com, password123, false]
 admin:make_publisher[useremail@example.com]
 admin:revoke_publisher[useremail@example.com]
 data:load_test[useremail@example.com]
Developer Notes

This application manages assets, such as JavaScript and CSS/SCSS with webpack. All development of assets should be done in the webpack folder.

Database Model

Entity relationship diagram

To regenerate the ERD from the Rails database models, first install graphviz, then:

rake generate_erd
Public Domain

This project constitutes a work of the United States government and is not subject to domestic copyright protection under 17 USC Section 105. This project is in the public domain within the United States, and copyright 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 it 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 v2, 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 participants are covered by the Surveillance Data Platform Disclaimer and Code of Conduct. For more information regarding 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 want to start with a basic tutorial. By contributing to this project, you grant a worldwide, 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 it is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC website.

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.