· 10 years ago · Aug 25, 2016, 01:02 PM
1## ABOUT BSHC
2
3IN ONE SENTENCE
4BSHC will help quickly find the right medication or component, its full description
5and patent to which it belongs.
6
7THE LONGER PITCH
8BSHC 24 hours a day looking for new drugs, new components and new patents. Updates,
9if exists new information in FDA Database. With BSHC you will be informed about all
10the news from pharmacy USA.
11
12Any doctor need to know what components are included in one or another drug. Lack
13of such knowledge could lead to tragic consequences, because the patient may be
14allergic to the drug component. BSHC allows you to quickly find the product with
15its complete description.
16
17Pharmacies must keep up with the demand for drugs. Watch for the appearance of new
18and better medicines. BSHC allows you to monitor the flow of new medicines with the
19help of special pages featuring the latest made medication.
20
21And all of this is open 24 hours a day!
22
23## PROJECT GOALS
24
25### 1.Keep members informed of new drugs created, components and registered patents.
26
27* Customize the search for new drugs, components, and patents(24/7).
28* Create a table in which are stored the search results.
29
30### 2.Create a convenient and affordable search
31
32* Create a comfortable working panel.
33* Create rankings by ... (past 30 days, etc.).
34
35## SYSTEM INFRASTRUCTURE AND ARCHITECTURE
36
37### FRAMEWORK
38
39Use Ruby on Rails (RoR) - framework written in the Ruby programming language that implements
40the architectural pattern Model-View-Controller for Web applications, and also provides
41integration with the Web server and database server. It is open source software and is
42distributed under the MIT license
43
44
45### Basic Rails plugins currently in use:
46
47* Grape-Swagger (adding an API explorer and exposing the API documentation)
48* Sass (to generate css)
49* PostgreSQL (Database Management System)
50* Frontend is built on Angular.js v.1.5.6
51* Devise (for authentication)
52* Capystrano (framework for building automated deployment scripts)
53* Rspec (for Behavior Driven Testing)
54* VCR (provides a macro that makes it easy to use a VCR cassette for an RSpec
55 example group)
56* Cucumber (for Behavior Driven Testing)
57* Capybara (test web applications by simulating how a real user)
58* Factory Girl (Test data and Mock Object fabrication)
59* For other, see Gemfile
60
61## USER DIALOGS AND CONTROL FLOW
62
63### Firstly, the login page
64
65You will not go to the home page, if you do not register or enter. You will send the login page
66and controller will start processing by 'AuthController' and action 'login'.
67
68If you are registered, fill all fields and click on 'Sign in' , the 'POST' will start 'access/login'
69and the controller will start processing by 'SessionsController' and action 'create'.
70Action will create a cookie and the browser save it. From database select the user
71with entered email and if user is found, you will be directed to the main page.
72
73### New Patents page
74
75When you click 'new patent',dispatched path in 'AuthController' action 'redirect'. It will be checked
76for authorization. Then you translate the page '/new_patents' if you are logged in.
77The page is loading via angular and data selected from the database in accordance with the pagination.
78
79* Other pages are also working with angular
80
81## BACKGROUND TASKS
82
83Background tasks in the project are the parsers pages. They make the background tasks for the main
84application, so it is not interrupted due to problems with parsers and for improve performance.
85
86* Background tasks are done with the help of Delayed Jobs gem.
87* To start that job on your local machine use: "rake jobs:work". Once a day running a background tasks:
88 * New drugs
89 * Label update
90 * Patent update
91 * Paragraph IV
92 * Patent Use Code
93 * Exclusivity Code
94
95## DATABASE MODEL
96
97Use PostgreSQL - is an object-relational database management system (ORDBMS). Choose this DBMS, analyzing
98various surveys, blogs, experts and the presence of utilities for database clustering.
99
100## INTERFACES TO OTHER SYSTEMS
101
102### API made using Grape Swagger gem gives access to:
103
104* Login
105* logout
106* Register
107* Get drugs application(25 at a time)
108* Get drugs(Return drug details, and any...see link)
109* View all available API can link '/apidoc'
110
111## NON FUNCTIONAL REQUIREMENTS
112
113### Perfomance
114
115Response time:
116
117* The longest request is expiring_exclusivities API - 0.089s. This is because in the controller occurs
118sorting, and in the model occurs serialization data.
119
120### Security
121
122Security is provided by Devise gem and for mobile devices provided by devise-token_authenticatable gem.
123Every time a new token is generated.
124
125### Operating constraints
126
127For stable operation of the application need:
128
129* Rails version 4.2.6
130* Ruby version 2.3.0
131* Other in Gemfile
132
133### Usability
134
135The app is aimed at ease of use. Principle: pressed - received.
136
137## DICTIONARY FOR ALL RELEVANT CONCEPTS/ENTITIES
138
139### TERMS
140
141* Drugs - medications are looking for, refreshes and adds the system.
142* Patents - belong to a specific drug.
143* Exclusivities expiring - drugs description.
144* Labels - the reference to the detailed description.
145* Paragraph IV - patent certifications.
146
147### ASSERTIONS
148
149* Admin receives e-mail message, at the end of the work of the background process. The report says there
150were new drugs and what grugs, or message that there is no change.
151* Background tasks by complete updating the database.