diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb3489a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
diff --git a/.rspec b/.rspec
new file mode 100644
index 0000000..53607ea
--- /dev/null
+++ b/.rspec
@@ -0,0 +1 @@
+--colour
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..d742feb
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,57 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.2'
+#gem 'rspec-rails'
+#gem 'cucumber-rails'
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'mysql2'
+gem 'gruff'
+gem 'rmagick'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ # gem 'therubyracer'
+
+ gem 'uglifier', '>= 1.0.3'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# To use Jbuilder templates for JSON
+# gem 'jbuilder'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
+group :development do
+gem 'database_cleaner'
+gem 'rspec-rails'
+gem 'cucumber-rails'
+gem 'capybara'
+#gem 'webrat'
+gem 'rack-test'
+end
+
+group :test do
+#gem 'database_cleaner'
+gem 'rspec-rails'
+gem 'rack-test'
+#gem 'webrat'
+gem 'cucumber-rails'
+gem 'capybara'
+end
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..32d06ec
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,171 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
+ mail (~> 2.4.0)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ addressable (2.2.7)
+ arel (3.0.2)
+ builder (3.0.0)
+ capybara (1.1.2)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.1)
+ ffi (~> 1.0.6)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.2.0)
+ cucumber (1.1.9)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (~> 2.9.0)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.6)
+ cucumber-rails (1.3.0)
+ capybara (>= 1.1.2)
+ cucumber (>= 1.1.8)
+ nokogiri (>= 1.5.0)
+ database_cleaner (0.7.2)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ ffi (1.0.11)
+ gherkin (2.9.3)
+ json (>= 1.4.6)
+ gruff (0.3.6)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ jquery-rails (2.0.2)
+ railties (>= 3.2.0, < 5.0)
+ thor (~> 0.14)
+ json (1.6.6)
+ libwebsocket (0.1.3)
+ addressable
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.18)
+ multi_json (1.2.0)
+ mysql2 (0.3.11)
+ nokogiri (1.5.2)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.2.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
+ bundler (~> 1.0)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rmagick (2.13.1)
+ rspec (2.9.0)
+ rspec-core (~> 2.9.0)
+ rspec-expectations (~> 2.9.0)
+ rspec-mocks (~> 2.9.0)
+ rspec-core (2.9.0)
+ rspec-expectations (2.9.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.9.0)
+ rspec-rails (2.9.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.9.0)
+ rubyzip (0.9.7)
+ sass (3.1.15)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ selenium-webdriver (2.21.2)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
+ rubyzip
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ term-ansicolor (1.0.7)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.32)
+ uglifier (1.2.4)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ capybara
+ coffee-rails (~> 3.2.1)
+ cucumber-rails
+ database_cleaner
+ gruff
+ jquery-rails
+ mysql2
+ rack-test
+ rails (= 3.2.2)
+ rmagick
+ rspec-rails
+ sass-rails (~> 3.2.3)
+ uglifier (>= 1.0.3)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1dadb27
--- /dev/null
+++ b/README.md
@@ -0,0 +1,15 @@
+This project hoping that it would solve the issue of cattle rustling in kenya particularly sub-sahara africa countries such as sudan, tanzania, uganda. The plan the initial plan in writting this project was that A.I could be used to predict and warn the community, and police about a rustling which is about to occur. The project is written in ruby on rails
+
+Requirements.
+This project requires Ruby at least ruby 1.8.1 to be running
+
+How to Run
+go to the project root
+then start
+Rails s
+visit localhost:3000 to see the project in action
+
+Future todos
+1. Include A.I into predicting cattle rustling which is about to occur
+2. Integrate with sms toolkit i.e for sending out sms
+
diff --git a/README.md~ b/README.md~
new file mode 100644
index 0000000..1dadb27
--- /dev/null
+++ b/README.md~
@@ -0,0 +1,15 @@
+This project hoping that it would solve the issue of cattle rustling in kenya particularly sub-sahara africa countries such as sudan, tanzania, uganda. The plan the initial plan in writting this project was that A.I could be used to predict and warn the community, and police about a rustling which is about to occur. The project is written in ruby on rails
+
+Requirements.
+This project requires Ruby at least ruby 1.8.1 to be running
+
+How to Run
+go to the project root
+then start
+Rails s
+visit localhost:3000 to see the project in action
+
+Future todos
+1. Include A.I into predicting cattle rustling which is about to occur
+2. Integrate with sms toolkit i.e for sending out sms
+
diff --git a/README.rdoc b/README.rdoc
new file mode 100644
index 0000000..7c36f23
--- /dev/null
+++ b/README.rdoc
@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+ rails new myapp (where myapp is the application name)
+
+2. Change directory to myapp and start the web server:
+ cd myapp; rails server (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+ "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+ class WeblogController < ActionController::Base
+ def destroy
+ @weblog = Weblog.find(params[:id])
+ @weblog.destroy
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+ end
+ end
+
+The result will be a message in your log file along the lines of:
+
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use sudo gem install ruby-debug. Example:
+
+ class WeblogController < ActionController::Base
+ def index
+ @posts = Post.all
+ debugger
+ end
+ end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+ >> @posts.inspect
+ => "[#nil, "body"=>nil, "id"=>"1"}>,
+ #"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+ >> @posts.first.title = "hello from a debugger"
+ => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+ >> f = @posts.first
+ => #nil, "body"=>nil, "id"=>"1"}>
+ >> f.
+ Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run rails console from the application
+directory.
+
+Options:
+
+* Passing the -s, --sandbox argument will rollback any modifications
+ made to the database.
+* Passing an environment name as an argument will load the corresponding
+ environment. Example: rails console production.
+
+To reload your controllers and models after launching the console run
+reload!
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through rails
+dbconsole. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like rails dbconsole production. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+ |-- app
+ | |-- assets
+ | |-- images
+ | |-- javascripts
+ | `-- stylesheets
+ | |-- controllers
+ | |-- helpers
+ | |-- mailers
+ | |-- models
+ | `-- views
+ | `-- layouts
+ |-- config
+ | |-- environments
+ | |-- initializers
+ | `-- locales
+ |-- db
+ |-- doc
+ |-- lib
+ | `-- tasks
+ |-- log
+ |-- public
+ |-- script
+ |-- test
+ | |-- fixtures
+ | |-- functional
+ | |-- integration
+ | |-- performance
+ | `-- unit
+ |-- tmp
+ | |-- cache
+ | |-- pids
+ | |-- sessions
+ | `-- sockets
+ `-- vendor
+ |-- assets
+ `-- stylesheets
+ `-- plugins
+
+app
+ Holds all the code that's specific to this particular application.
+
+app/assets
+ Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+ Holds controllers that should be named like weblogs_controller.rb for
+ automated URL mapping. All controllers should descend from
+ ApplicationController which itself descends from ActionController::Base.
+
+app/models
+ Holds models that should be named like post.rb. Models descend from
+ ActiveRecord::Base by default.
+
+app/views
+ Holds the template files for the view that should be named like
+ weblogs/index.html.erb for the WeblogsController#index action. All views use
+ eRuby syntax by default.
+
+app/views/layouts
+ Holds the template files for layouts to be used with views. This models the
+ common header/footer method of wrapping views. In your views, define a layout
+ using the layout :default and create a file named default.html.erb.
+ Inside default.html.erb, call <% yield %> to render the view using this
+ layout.
+
+app/helpers
+ Holds view helpers that should be named like weblogs_helper.rb. These are
+ generated for you automatically when using generators for controllers.
+ Helpers can be used to wrap functionality for your views into methods.
+
+config
+ Configuration files for the Rails environment, the routing map, the database,
+ and other dependencies.
+
+db
+ Contains the database schema in schema.rb. db/migrate contains all the
+ sequence of Migrations for your schema.
+
+doc
+ This directory is where your application documentation will be stored when
+ generated using rake doc:app
+
+lib
+ Application specific libraries. Basically, any kind of custom code that
+ doesn't belong under controllers, models, or helpers. This directory is in
+ the load path.
+
+public
+ The directory available for the web server. Also contains the dispatchers and the
+ default HTML files. This should be set as the DOCUMENT_ROOT of your web
+ server.
+
+script
+ Helper scripts for automation and generation.
+
+test
+ Unit and functional tests along with fixtures. When using the rails generate
+ command, template test files will be generated for you and placed in this
+ directory.
+
+vendor
+ External libraries that the application depends on. Also includes the plugins
+ subdirectory. If the app has frozen rails, those gems also go here, under
+ vendor/rails/. This directory is in the load path.
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..e0ba55f
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Chw::Application.load_tasks
diff --git a/app/assets/images/CHW-Good.jpg b/app/assets/images/CHW-Good.jpg
new file mode 100644
index 0000000..e492adb
Binary files /dev/null and b/app/assets/images/CHW-Good.jpg differ
diff --git a/app/assets/images/CHW.jpg b/app/assets/images/CHW.jpg
new file mode 100644
index 0000000..ba447a3
Binary files /dev/null and b/app/assets/images/CHW.jpg differ
diff --git a/app/assets/images/CHyW-Good.jpg b/app/assets/images/CHyW-Good.jpg
new file mode 100644
index 0000000..163f3f9
Binary files /dev/null and b/app/assets/images/CHyW-Good.jpg differ
diff --git a/app/assets/images/Love.png b/app/assets/images/Love.png
new file mode 100644
index 0000000..ec5d153
Binary files /dev/null and b/app/assets/images/Love.png differ
diff --git a/app/assets/images/Love2.png b/app/assets/images/Love2.png
new file mode 100644
index 0000000..b738f98
Binary files /dev/null and b/app/assets/images/Love2.png differ
diff --git a/app/assets/images/Love3.png b/app/assets/images/Love3.png
new file mode 100644
index 0000000..ea60f03
Binary files /dev/null and b/app/assets/images/Love3.png differ
diff --git a/app/assets/images/dots_report.png b/app/assets/images/dots_report.png
new file mode 100644
index 0000000..639a03a
Binary files /dev/null and b/app/assets/images/dots_report.png differ
diff --git a/app/assets/images/hiv_contraceptive_report.png b/app/assets/images/hiv_contraceptive_report.png
new file mode 100644
index 0000000..8df041d
Binary files /dev/null and b/app/assets/images/hiv_contraceptive_report.png differ
diff --git a/app/assets/images/hiv_drugs_report.png b/app/assets/images/hiv_drugs_report.png
new file mode 100644
index 0000000..ca33e0a
Binary files /dev/null and b/app/assets/images/hiv_drugs_report.png differ
diff --git a/app/assets/images/hiv_gender_report_pie.png b/app/assets/images/hiv_gender_report_pie.png
new file mode 100644
index 0000000..f3604d2
Binary files /dev/null and b/app/assets/images/hiv_gender_report_pie.png differ
diff --git a/app/assets/images/hiv_location_report_pie.png b/app/assets/images/hiv_location_report_pie.png
new file mode 100644
index 0000000..cb8982f
Binary files /dev/null and b/app/assets/images/hiv_location_report_pie.png differ
diff --git a/app/assets/images/locations_report.png b/app/assets/images/locations_report.png
new file mode 100644
index 0000000..ee51057
Binary files /dev/null and b/app/assets/images/locations_report.png differ
diff --git a/app/assets/images/malaria_gender_report_pie.png b/app/assets/images/malaria_gender_report_pie.png
new file mode 100644
index 0000000..26d3732
Binary files /dev/null and b/app/assets/images/malaria_gender_report_pie.png differ
diff --git a/app/assets/images/malaria_location_report_pie.png b/app/assets/images/malaria_location_report_pie.png
new file mode 100644
index 0000000..86cded7
Binary files /dev/null and b/app/assets/images/malaria_location_report_pie.png differ
diff --git a/app/assets/images/malaria_prevention_report_line.png b/app/assets/images/malaria_prevention_report_line.png
new file mode 100644
index 0000000..7f5d0ff
Binary files /dev/null and b/app/assets/images/malaria_prevention_report_line.png differ
diff --git a/app/assets/images/menu8.gif b/app/assets/images/menu8.gif
new file mode 100644
index 0000000..927b899
Binary files /dev/null and b/app/assets/images/menu8.gif differ
diff --git a/app/assets/images/mtabiri.png b/app/assets/images/mtabiri.png
new file mode 100644
index 0000000..68727d4
Binary files /dev/null and b/app/assets/images/mtabiri.png differ
diff --git a/app/assets/images/predictor_location_report.png b/app/assets/images/predictor_location_report.png
new file mode 100644
index 0000000..cb8982f
Binary files /dev/null and b/app/assets/images/predictor_location_report.png differ
diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png
new file mode 100644
index 0000000..d5edc04
Binary files /dev/null and b/app/assets/images/rails.png differ
diff --git a/app/assets/images/tb_location_report.png b/app/assets/images/tb_location_report.png
new file mode 100644
index 0000000..45370e2
Binary files /dev/null and b/app/assets/images/tb_location_report.png differ
diff --git a/app/assets/images/train-a-community-health-worker.jpg b/app/assets/images/train-a-community-health-worker.jpg
new file mode 100644
index 0000000..bec183d
Binary files /dev/null and b/app/assets/images/train-a-community-health-worker.jpg differ
diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/admin.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
new file mode 100644
index 0000000..9097d83
--- /dev/null
+++ b/app/assets/javascripts/application.js
@@ -0,0 +1,15 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
diff --git a/app/assets/javascripts/car.js.coffee b/app/assets/javascripts/car.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/car.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/cattlethefts.js.coffee b/app/assets/javascripts/cattlethefts.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/cattlethefts.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/childhealth.js.coffee b/app/assets/javascripts/childhealth.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/childhealth.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/community_health_workers.js.coffee b/app/assets/javascripts/community_health_workers.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/community_health_workers.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/conflicts.js.coffee b/app/assets/javascripts/conflicts.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/conflicts.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/dotsmembers.js.coffee b/app/assets/javascripts/dotsmembers.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/dotsmembers.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/firearms.js.coffee b/app/assets/javascripts/firearms.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/firearms.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/hivaid.js.coffee b/app/assets/javascripts/hivaid.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/hivaid.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/hivcases.js.coffee b/app/assets/javascripts/hivcases.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/hivcases.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/hivcontraceptionreports.js.coffee b/app/assets/javascripts/hivcontraceptionreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/hivcontraceptionreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/hivdrugreports.js.coffee b/app/assets/javascripts/hivdrugreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/hivdrugreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/hivgenderreports.js.coffee b/app/assets/javascripts/hivgenderreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/hivgenderreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/hivlocationreports.js.coffee b/app/assets/javascripts/hivlocationreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/hivlocationreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/immunization.js.coffee b/app/assets/javascripts/immunization.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/immunization.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/locationreports.js.coffee b/app/assets/javascripts/locationreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/locationreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/locations.js.coffee b/app/assets/javascripts/locations.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/locations.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/malaria.js.coffee b/app/assets/javascripts/malaria.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/malaria.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/malariacases.js.coffee b/app/assets/javascripts/malariacases.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/malariacases.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/malariagenderreports.js.coffee b/app/assets/javascripts/malariagenderreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/malariagenderreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/malarialocationreports.js.coffee b/app/assets/javascripts/malarialocationreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/malarialocationreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/malariapreventationreports.js.coffee b/app/assets/javascripts/malariapreventationreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/malariapreventationreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/members.js.coffee b/app/assets/javascripts/members.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/members.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/messages.js.coffee b/app/assets/javascripts/messages.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/messages.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/nightattacks.js.coffee b/app/assets/javascripts/nightattacks.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/nightattacks.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/patients.js.coffee b/app/assets/javascripts/patients.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/patients.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/roadcrimes.js.coffee b/app/assets/javascripts/roadcrimes.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/roadcrimes.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/sessions.js.coffee b/app/assets/javascripts/sessions.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/sessions.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/settings.js.coffee b/app/assets/javascripts/settings.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/settings.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/sms.js.coffee b/app/assets/javascripts/sms.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/sms.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/smsmessages.js.coffee b/app/assets/javascripts/smsmessages.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/smsmessages.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/tb.js.coffee b/app/assets/javascripts/tb.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/tb.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/tbcases.js.coffee b/app/assets/javascripts/tbcases.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/tbcases.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/tbdotreports.js.coffee b/app/assets/javascripts/tbdotreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/tbdotreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/tblocationreports.js.coffee b/app/assets/javascripts/tblocationreports.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/tblocationreports.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/test_it.js.coffee b/app/assets/javascripts/test_it.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/test_it.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/textmessage.js.coffee b/app/assets/javascripts/textmessage.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/textmessage.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/users.js.coffee b/app/assets/javascripts/users.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/users.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/javascripts/villageworkers.js.coffee b/app/assets/javascripts/villageworkers.js.coffee
new file mode 100644
index 0000000..7615679
--- /dev/null
+++ b/app/assets/javascripts/villageworkers.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss
new file mode 100644
index 0000000..6b55735
--- /dev/null
+++ b/app/assets/stylesheets/admin.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the admin controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
new file mode 100644
index 0000000..3b5cc66
--- /dev/null
+++ b/app/assets/stylesheets/application.css
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+*/
diff --git a/app/assets/stylesheets/car.css.scss b/app/assets/stylesheets/car.css.scss
new file mode 100644
index 0000000..9ca18d5
--- /dev/null
+++ b/app/assets/stylesheets/car.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Car controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/cattlethefts.css.scss b/app/assets/stylesheets/cattlethefts.css.scss
new file mode 100644
index 0000000..ef63dae
--- /dev/null
+++ b/app/assets/stylesheets/cattlethefts.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the cattlethefts controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/childhealth.css.scss b/app/assets/stylesheets/childhealth.css.scss
new file mode 100644
index 0000000..d3bd3b3
--- /dev/null
+++ b/app/assets/stylesheets/childhealth.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the childhealth controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/community_health_workers.css.scss b/app/assets/stylesheets/community_health_workers.css.scss
new file mode 100644
index 0000000..10379da
--- /dev/null
+++ b/app/assets/stylesheets/community_health_workers.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the CommunityHealthWorkers controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/conflicts.css.scss b/app/assets/stylesheets/conflicts.css.scss
new file mode 100644
index 0000000..a20ee33
--- /dev/null
+++ b/app/assets/stylesheets/conflicts.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the conflicts controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/dotsmembers.css.scss b/app/assets/stylesheets/dotsmembers.css.scss
new file mode 100644
index 0000000..669ce89
--- /dev/null
+++ b/app/assets/stylesheets/dotsmembers.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the dotsmembers controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/firearms.css.scss b/app/assets/stylesheets/firearms.css.scss
new file mode 100644
index 0000000..457310c
--- /dev/null
+++ b/app/assets/stylesheets/firearms.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the firearms controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/hivaid.css.scss b/app/assets/stylesheets/hivaid.css.scss
new file mode 100644
index 0000000..a0c8874
--- /dev/null
+++ b/app/assets/stylesheets/hivaid.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hivaid controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/hivcases.css.scss b/app/assets/stylesheets/hivcases.css.scss
new file mode 100644
index 0000000..fa426d0
--- /dev/null
+++ b/app/assets/stylesheets/hivcases.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hivcases controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/hivcontraceptionreports.css.scss b/app/assets/stylesheets/hivcontraceptionreports.css.scss
new file mode 100644
index 0000000..fedfa88
--- /dev/null
+++ b/app/assets/stylesheets/hivcontraceptionreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hivcontraceptionreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/hivdrugreports.css.scss b/app/assets/stylesheets/hivdrugreports.css.scss
new file mode 100644
index 0000000..cc3b4fe
--- /dev/null
+++ b/app/assets/stylesheets/hivdrugreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hivdrugreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/hivgenderreports.css.scss b/app/assets/stylesheets/hivgenderreports.css.scss
new file mode 100644
index 0000000..2eb4c36
--- /dev/null
+++ b/app/assets/stylesheets/hivgenderreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hivgenderreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/hivlocationreports.css.scss b/app/assets/stylesheets/hivlocationreports.css.scss
new file mode 100644
index 0000000..2844dfc
--- /dev/null
+++ b/app/assets/stylesheets/hivlocationreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hivlocationreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/immunization.css.scss b/app/assets/stylesheets/immunization.css.scss
new file mode 100644
index 0000000..18a1668
--- /dev/null
+++ b/app/assets/stylesheets/immunization.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the immunization controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/locationreports.css.scss b/app/assets/stylesheets/locationreports.css.scss
new file mode 100644
index 0000000..9dc9741
--- /dev/null
+++ b/app/assets/stylesheets/locationreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the locationreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/locations.css.scss b/app/assets/stylesheets/locations.css.scss
new file mode 100644
index 0000000..b6e6e3a
--- /dev/null
+++ b/app/assets/stylesheets/locations.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Locations controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/malaria.css.scss b/app/assets/stylesheets/malaria.css.scss
new file mode 100644
index 0000000..69e3fee
--- /dev/null
+++ b/app/assets/stylesheets/malaria.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the malaria controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/malariacases.css.scss b/app/assets/stylesheets/malariacases.css.scss
new file mode 100644
index 0000000..ec8dede
--- /dev/null
+++ b/app/assets/stylesheets/malariacases.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the malariacases controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/malariagenderreports.css.scss b/app/assets/stylesheets/malariagenderreports.css.scss
new file mode 100644
index 0000000..d4ed723
--- /dev/null
+++ b/app/assets/stylesheets/malariagenderreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the malariagenderreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/malarialocationreports.css.scss b/app/assets/stylesheets/malarialocationreports.css.scss
new file mode 100644
index 0000000..fcc11fd
--- /dev/null
+++ b/app/assets/stylesheets/malarialocationreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the malarialocationreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/malariapreventationreports.css.scss b/app/assets/stylesheets/malariapreventationreports.css.scss
new file mode 100644
index 0000000..012a09a
--- /dev/null
+++ b/app/assets/stylesheets/malariapreventationreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the malariapreventationreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/members.css.scss b/app/assets/stylesheets/members.css.scss
new file mode 100644
index 0000000..43b5cef
--- /dev/null
+++ b/app/assets/stylesheets/members.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the members controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/messages.css.scss b/app/assets/stylesheets/messages.css.scss
new file mode 100644
index 0000000..492f0fa
--- /dev/null
+++ b/app/assets/stylesheets/messages.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Messages controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/nightattacks.css.scss b/app/assets/stylesheets/nightattacks.css.scss
new file mode 100644
index 0000000..fb68ffc
--- /dev/null
+++ b/app/assets/stylesheets/nightattacks.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the nightattacks controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/patients.css.scss b/app/assets/stylesheets/patients.css.scss
new file mode 100644
index 0000000..f3c6973
--- /dev/null
+++ b/app/assets/stylesheets/patients.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the patients controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/roadcrimes.css.scss b/app/assets/stylesheets/roadcrimes.css.scss
new file mode 100644
index 0000000..366a844
--- /dev/null
+++ b/app/assets/stylesheets/roadcrimes.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the roadcrimes controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss
new file mode 100644
index 0000000..05188f0
--- /dev/null
+++ b/app/assets/stylesheets/scaffolds.css.scss
@@ -0,0 +1,56 @@
+body {
+ background-color: #fff;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px; }
+
+p, ol, ul, td {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px; }
+
+pre {
+ background-color: #eee;
+ padding: 10px;
+ font-size: 11px; }
+
+a {
+ color: #000;
+ &:visited {
+ color: #666; }
+ &:hover {
+ color: #fff;
+ background-color: #000; } }
+
+div {
+ &.field, &.actions {
+ margin-bottom: 10px; } }
+
+#notice {
+ color: green; }
+
+.field_with_errors {
+ padding: 2px;
+ background-color: red;
+ display: table; }
+
+#error_explanation {
+ width: 450px;
+ border: 2px solid red;
+ padding: 7px;
+ padding-bottom: 0;
+ margin-bottom: 20px;
+ background-color: #f0f0f0;
+ h2 {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 5px 5px 15px;
+ font-size: 12px;
+ margin: -7px;
+ margin-bottom: 0px;
+ background-color: #c00;
+ color: #fff; }
+ ul li {
+ font-size: 12px;
+ list-style: square; } }
diff --git a/app/assets/stylesheets/sessions.css.scss b/app/assets/stylesheets/sessions.css.scss
new file mode 100644
index 0000000..be7e354
--- /dev/null
+++ b/app/assets/stylesheets/sessions.css.scss
@@ -0,0 +1,8 @@
+// Place all the styles related to the sessions controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+.class login{
+margin-left:30%;
+margin-right:40%;
+}
diff --git a/app/assets/stylesheets/settings.css.scss b/app/assets/stylesheets/settings.css.scss
new file mode 100644
index 0000000..fbe6690
--- /dev/null
+++ b/app/assets/stylesheets/settings.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the settings controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/sms.css.scss b/app/assets/stylesheets/sms.css.scss
new file mode 100644
index 0000000..ea04153
--- /dev/null
+++ b/app/assets/stylesheets/sms.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the sms controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/smsmessages.css.scss b/app/assets/stylesheets/smsmessages.css.scss
new file mode 100644
index 0000000..3a09cd5
--- /dev/null
+++ b/app/assets/stylesheets/smsmessages.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the smsmessages controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/style.css b/app/assets/stylesheets/style.css
new file mode 100644
index 0000000..76336b2
--- /dev/null
+++ b/app/assets/stylesheets/style.css
@@ -0,0 +1,201 @@
+// Place all the styles related to the sessions controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+.class login{
+margin-left:30%;
+margin-right:40%;
+}
+
+body {
+background-color: white;
+}
+
+/*This is the div that wraps around the content of the webpage*/
+.content {
+width:100%;
+height:auto;
+margin:auto;
+}
+
+.top_menu {
+height:40px;
+width:100%;
+background-color:blue;
+border: 0px solid #ccc;
+margin-top:10px;
+
+}
+.top_menu ul{
+margin-left: 20%;
+
+}
+.top_menu li{
+float: left;
+display: block;
+font-size: 19px;
+font-weight:bold;
+color: white;
+padding-left:10px;
+padding-right: 7px;
+margin-top:10px;
+}
+
+
+
+.top_menu ul li a{
+float: left;
+display: block;
+font-size: 19px;
+font-weight:bold;
+color: white;
+padding: 0 5px;
+background-color: inherit;
+text-decoration:none;
+}
+.top_menu li a:hover{
+color: white;
+text-decoration: none;
+border-bottom: 5px solid white;
+}
+
+
+
+.logo {
+width:25%;
+height:70px;
+background-color: white;
+float:left;
+}
+
+
+.user_login {
+margin-top:0px;
+font-size: 16px;
+width:20%;
+height: 60px;
+float: right;
+}
+
+.depot_form{
+margin-top:5%;
+margin-left:25%;
+width:500px;
+}
+
+.depot_form label {
+width: 50px;
+}
+
+.header{
+width:100%;
+height:75px;
+}
+
+
+.side_menu{
+width: 17%;
+height: 500px;
+float:left;
+display:block;
+}
+.main_content{
+width: 82%;
+height:auto;
+float: left;
+border: 2px solid #eee;
+margin-top:15px;
+padding-left: 5px;
+}
+
+#menu8 {
+ width: 200px;
+ margin-top: 15px;
+}
+
+#menu8 li a {
+ text-decoration: none;
+ margin-bottom: 10px;
+ height: 38px;
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ height: 24px;
+}
+
+#menu8 li a:link, #menu8 li a:visited {
+ color: #777;
+ display: block;
+ background: url(menu8.gif);
+ padding: 8px 0 0 20px;
+}
+
+#menu8 li a:hover {
+ color: #257EB7;
+ background: url(menu8.gif) 0 -32px;
+ padding: 8px 0 0 25px;
+}
+
+#menu8 li a:active {
+ color: #fff;
+ background: url(menu8.gif) 0 -64px;
+ padding: 8px 0 0 25px;
+}
+
+#menu8 ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+
+}
+
+/* Report options dialog */
+.report_dlg{
+font-size:30px;
+width:100%;
+height:30px;
+background-color:#ccc;
+border: 2px solid brown;
+margin-left:-5px;
+}
+
+.table_list {
+ background-color: #f5f5f5;
+ padding: 5px;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border: 1px solid #ebebeb;
+ width:98%;
+ margin-left:1%;
+}
+.table_list tr th {
+ text-align:center;
+}
+.table_list td, .table_list th {
+ padding: 1px 5px;
+ text-align:center;
+}
+.table_list thead {
+ font: normal 15px Helvetica Neue,Helvetica,sans-serif;
+ text-shadow: 0 1px 0 white;
+ color: #999;
+ text-align:center;
+}
+.table_list th {
+ text-align: left;
+ border-bottom: 1px solid #fff;
+}
+.table_list td {
+ font-size: 14px;
+}
+.table_list td:hover {
+ background-color: #fff;
+}
+
+.footer{
+width:100%;
+height:70px;
+border: 1px solid #ccc;
+background-color:black;
+}
+
diff --git a/app/assets/stylesheets/tb.css.scss b/app/assets/stylesheets/tb.css.scss
new file mode 100644
index 0000000..850cd45
--- /dev/null
+++ b/app/assets/stylesheets/tb.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the tb controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/tbcases.css.scss b/app/assets/stylesheets/tbcases.css.scss
new file mode 100644
index 0000000..c17784e
--- /dev/null
+++ b/app/assets/stylesheets/tbcases.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the tbcases controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/tbdotreports.css.scss b/app/assets/stylesheets/tbdotreports.css.scss
new file mode 100644
index 0000000..bc00145
--- /dev/null
+++ b/app/assets/stylesheets/tbdotreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the tbdotreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/tblocationreports.css.scss b/app/assets/stylesheets/tblocationreports.css.scss
new file mode 100644
index 0000000..c3c1c98
--- /dev/null
+++ b/app/assets/stylesheets/tblocationreports.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the tblocationreports controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/test_it.css.scss b/app/assets/stylesheets/test_it.css.scss
new file mode 100644
index 0000000..dc2d876
--- /dev/null
+++ b/app/assets/stylesheets/test_it.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the test_it controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/textmessage.css.scss b/app/assets/stylesheets/textmessage.css.scss
new file mode 100644
index 0000000..52b61ec
--- /dev/null
+++ b/app/assets/stylesheets/textmessage.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the textmessage controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/users.css.scss b/app/assets/stylesheets/users.css.scss
new file mode 100644
index 0000000..1efc835
--- /dev/null
+++ b/app/assets/stylesheets/users.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the users controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/villageworkers.css.scss b/app/assets/stylesheets/villageworkers.css.scss
new file mode 100644
index 0000000..541e8d8
--- /dev/null
+++ b/app/assets/stylesheets/villageworkers.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the villageworkers controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/.car_controller.rb.swp b/app/controllers/.car_controller.rb.swp
new file mode 100644
index 0000000..59993c9
Binary files /dev/null and b/app/controllers/.car_controller.rb.swp differ
diff --git a/app/controllers/.community_health_workers_controller.rb.swp b/app/controllers/.community_health_workers_controller.rb.swp
new file mode 100644
index 0000000..2821198
Binary files /dev/null and b/app/controllers/.community_health_workers_controller.rb.swp differ
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
new file mode 100644
index 0000000..4f48d75
--- /dev/null
+++ b/app/controllers/admin_controller.rb
@@ -0,0 +1,30 @@
+class AdminController < ApplicationController
+ def index
+ @locations = Location.find(:all)
+ @drop_down_array = Array.new
+
+ if(defined? params[:location][:id])
+ @test = params[:location][:id]
+ @year = params[:date][:year]
+ if @test.empty?
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ else
+ @location_id = @test.to_i
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ end
+ else
+ #Basically this sets the default location
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+
+ end
+
+ @hivlocationreports = Hivlocationreport.new
+ @hivlocationreports.drawLocationGraph(@location_name,@location_id,@year)
+
+ end
+end
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
new file mode 100644
index 0000000..1607ec7
--- /dev/null
+++ b/app/controllers/application_controller.rb
@@ -0,0 +1,12 @@
+class ApplicationController < ActionController::Base
+before_filter :authorize
+protect_from_forgery
+
+protected
+
+def authorize
+unless User.find_by_id(session[:user_id])
+redirect_to login_url, :notice => "Please log in"
+end
+end
+end
diff --git a/app/controllers/cattlethefts_controller.rb b/app/controllers/cattlethefts_controller.rb
new file mode 100644
index 0000000..f991ca0
--- /dev/null
+++ b/app/controllers/cattlethefts_controller.rb
@@ -0,0 +1,85 @@
+class CattletheftsController < ApplicationController
+ # GET /cattlethefts
+ # GET /cattlethefts.json
+
+ layout 'conflict'
+ def index
+ @cattlethefts = Cattletheft.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @cattlethefts }
+ end
+ end
+
+ # GET /cattlethefts/1
+ # GET /cattlethefts/1.json
+ def show
+ @cattletheft = Cattletheft.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @cattletheft }
+ end
+ end
+
+ # GET /cattlethefts/new
+ # GET /cattlethefts/new.json
+ def new
+ @cattletheft = Cattletheft.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @cattletheft }
+ end
+ end
+
+ # GET /cattlethefts/1/edit
+ def edit
+ @cattletheft = Cattletheft.find(params[:id])
+ end
+
+ # POST /cattlethefts
+ # POST /cattlethefts.json
+ def create
+ @cattletheft = Cattletheft.new(params[:cattletheft])
+
+ respond_to do |format|
+ if @cattletheft.save
+ format.html { redirect_to @cattletheft, notice: 'Cattletheft was successfully created.' }
+ format.json { render json: @cattletheft, status: :created, location: @cattletheft }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @cattletheft.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /cattlethefts/1
+ # PUT /cattlethefts/1.json
+ def update
+ @cattletheft = Cattletheft.find(params[:id])
+
+ respond_to do |format|
+ if @cattletheft.update_attributes(params[:cattletheft])
+ format.html { redirect_to @cattletheft, notice: 'Cattletheft was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @cattletheft.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /cattlethefts/1
+ # DELETE /cattlethefts/1.json
+ def destroy
+ @cattletheft = Cattletheft.find(params[:id])
+ @cattletheft.destroy
+
+ respond_to do |format|
+ format.html { redirect_to cattlethefts_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/conflicts_controller.rb b/app/controllers/conflicts_controller.rb
new file mode 100644
index 0000000..ab4df7e
--- /dev/null
+++ b/app/controllers/conflicts_controller.rb
@@ -0,0 +1,80 @@
+class ConflictsController < ApplicationController
+ # GET /conflicts
+ # GET /conflicts.json
+layout "conflict"
+ def index
+ redirect_to "/firearms"
+ end
+
+
+ # GET /conflicts/1
+ # GET /conflicts/1.json
+ def show
+ @conflict = Conflict.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @conflict }
+ end
+ end
+
+ # GET /conflicts/new
+ # GET /conflicts/new.json
+ def new
+ @conflict = Conflict.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @conflict }
+ end
+ end
+
+ # GET /conflicts/1/edit
+ def edit
+ @conflict = Conflict.find(params[:id])
+ end
+
+ # POST /conflicts
+ # POST /conflicts.json
+ def create
+ @conflict = Conflict.new(params[:conflict])
+
+ respond_to do |format|
+ if @conflict.save
+ format.html { redirect_to @conflict, notice: 'Conflict was successfully created.' }
+ format.json { render json: @conflict, status: :created, location: @conflict }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @conflict.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /conflicts/1
+ # PUT /conflicts/1.json
+ def update
+ @conflict = Conflict.find(params[:id])
+
+ respond_to do |format|
+ if @conflict.update_attributes(params[:conflict])
+ format.html { redirect_to @conflict, notice: 'Conflict was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @conflict.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /conflicts/1
+ # DELETE /conflicts/1.json
+ def destroy
+ @conflict = Conflict.find(params[:id])
+ @conflict.destroy
+
+ respond_to do |format|
+ format.html { redirect_to conflicts_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/firearms_controller.rb b/app/controllers/firearms_controller.rb
new file mode 100644
index 0000000..26c4c33
--- /dev/null
+++ b/app/controllers/firearms_controller.rb
@@ -0,0 +1,85 @@
+class FirearmsController < ApplicationController
+ # GET /firearms
+ # GET /firearms.json
+layout 'conflict'
+
+ def index
+ @firearms = Firearm.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @firearms }
+ end
+ end
+
+ # GET /firearms/1
+ # GET /firearms/1.json
+ def show
+ @firearm = Firearm.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @firearm }
+ end
+ end
+
+ # GET /firearms/new
+ # GET /firearms/new.json
+ def new
+ @firearm = Firearm.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @firearm }
+ end
+ end
+
+ # GET /firearms/1/edit
+ def edit
+ @firearm = Firearm.find(params[:id])
+ end
+
+ # POST /firearms
+ # POST /firearms.json
+ def create
+ @firearm = Firearm.new(params[:firearm])
+
+ respond_to do |format|
+ if @firearm.save
+ format.html { redirect_to @firearm, notice: 'Firearm was successfully created.' }
+ format.json { render json: @firearm, status: :created, location: @firearm }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @firearm.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /firearms/1
+ # PUT /firearms/1.json
+ def update
+ @firearm = Firearm.find(params[:id])
+
+ respond_to do |format|
+ if @firearm.update_attributes(params[:firearm])
+ format.html { redirect_to @firearm, notice: 'Firearm was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @firearm.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /firearms/1
+ # DELETE /firearms/1.json
+ def destroy
+ @firearm = Firearm.find(params[:id])
+ @firearm.destroy
+
+ respond_to do |format|
+ format.html { redirect_to firearms_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/hivcases_controller.rb b/app/controllers/hivcases_controller.rb
new file mode 100644
index 0000000..2093885
--- /dev/null
+++ b/app/controllers/hivcases_controller.rb
@@ -0,0 +1,85 @@
+class HivcasesController < ApplicationController
+ # GET /hivcases
+ # GET /hivcases.json
+
+layout "hivaid"
+ def index
+ @hivcases = Hivcase.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @hivcases }
+ end
+ end
+
+ # GET /hivcases/1
+ # GET /hivcases/1.json
+ def show
+ @hivcase = Hivcase.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @hivcase }
+ end
+ end
+
+ # GET /hivcases/new
+ # GET /hivcases/new.json
+ def new
+ @hivcase = Hivcase.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @hivcase }
+ end
+ end
+
+ # GET /hivcases/1/edit
+ def edit
+ @hivcase = Hivcase.find(params[:id])
+ end
+
+ # POST /hivcases
+ # POST /hivcases.json
+ def create
+ @hivcase = Hivcase.new(params[:hivcase])
+
+ respond_to do |format|
+ if @hivcase.save
+ format.html { redirect_to @hivcase, notice: 'Hivcase was successfully created.' }
+ format.json { render json: @hivcase, status: :created, location: @hivcase }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @hivcase.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /hivcases/1
+ # PUT /hivcases/1.json
+ def update
+ @hivcase = Hivcase.find(params[:id])
+
+ respond_to do |format|
+ if @hivcase.update_attributes(params[:hivcase])
+ format.html { redirect_to @hivcase, notice: 'Hivcase was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @hivcase.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /hivcases/1
+ # DELETE /hivcases/1.json
+ def destroy
+ @hivcase = Hivcase.find(params[:id])
+ @hivcase.destroy
+
+ respond_to do |format|
+ format.html { redirect_to hivcases_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/hivcontraceptionreports_controller.rb b/app/controllers/hivcontraceptionreports_controller.rb
new file mode 100644
index 0000000..6840289
--- /dev/null
+++ b/app/controllers/hivcontraceptionreports_controller.rb
@@ -0,0 +1,110 @@
+class HivcontraceptionreportsController < ApplicationController
+ # GET /hivcontraceptionreports
+ # GET /hivcontraceptionreports.json
+ layout "hivaid"
+
+ def index
+
+ @locations = Location.find(:all)
+ @drop_down_array = Array.new
+
+ if(defined? params[:location][:id])
+ @test = params[:location][:id]
+ @year = params[:date][:year]
+ if @test.empty?
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ else
+ @location_id = @test.to_i
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ end
+ else
+ #Basically this sets the default location
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+
+ end
+
+ @hivcontraceptionreports = Hivcontraceptionreport.new
+ @hivcontraceptionreports.drawContraceptionGraph(@location_name,@location_id,@year)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @hivcontraceptionreports }
+ end
+ end
+
+ # GET /hivcontraceptionreports/1
+ # GET /hivcontraceptionreports/1.json
+ def show
+ @hivcontraceptionreport = Hivcontraceptionreport.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @hivcontraceptionreport }
+ end
+ end
+
+ # GET /hivcontraceptionreports/new
+ # GET /hivcontraceptionreports/new.json
+ def new
+ @hivcontraceptionreport = Hivcontraceptionreport.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @hivcontraceptionreport }
+ end
+ end
+
+ # GET /hivcontraceptionreports/1/edit
+ def edit
+ @hivcontraceptionreport = Hivcontraceptionreport.find(params[:id])
+ end
+
+ # POST /hivcontraceptionreports
+ # POST /hivcontraceptionreports.json
+ def create
+ @hivcontraceptionreport = Hivcontraceptionreport.new(params[:hivcontraceptionreport])
+
+ respond_to do |format|
+ if @hivcontraceptionreport.save
+ format.html { redirect_to @hivcontraceptionreport, notice: 'Hivcontraceptionreport was successfully created.' }
+ format.json { render json: @hivcontraceptionreport, status: :created, location: @hivcontraceptionreport }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @hivcontraceptionreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /hivcontraceptionreports/1
+ # PUT /hivcontraceptionreports/1.json
+ def update
+ @hivcontraceptionreport = Hivcontraceptionreport.find(params[:id])
+
+ respond_to do |format|
+ if @hivcontraceptionreport.update_attributes(params[:hivcontraceptionreport])
+ format.html { redirect_to @hivcontraceptionreport, notice: 'Hivcontraceptionreport was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @hivcontraceptionreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /hivcontraceptionreports/1
+ # DELETE /hivcontraceptionreports/1.json
+ def destroy
+ @hivcontraceptionreport = Hivcontraceptionreport.find(params[:id])
+ @hivcontraceptionreport.destroy
+
+ respond_to do |format|
+ format.html { redirect_to hivcontraceptionreports_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/hivlocationreports_controller.rb b/app/controllers/hivlocationreports_controller.rb
new file mode 100644
index 0000000..d7c351b
--- /dev/null
+++ b/app/controllers/hivlocationreports_controller.rb
@@ -0,0 +1,108 @@
+class HivlocationreportsController < ApplicationController
+ # GET /hivlocationreports
+ # GET /hivlocationreports.json
+layout "hivaid"
+ def index
+ @locations = Location.find(:all)
+ @drop_down_array = Array.new
+
+ if(defined? params[:location][:id])
+ @test = params[:location][:id]
+ @year = params[:date][:year]
+ if @test.empty?
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ else
+ @location_id = @test.to_i
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ end
+ else
+ #Basically this sets the default location
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+
+ end
+
+ @predictorreports = Predictorreport.new
+ @predictorreports.drawLocationGraph(@location_name,@location_id,@year)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @hivlocationreports }
+ end
+ end
+
+ # GET /hivlocationreports/1
+ # GET /hivlocationreports/1.json
+ def show
+ @hivlocationreport = Hivlocationreport.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @hivlocationreport }
+ end
+ end
+
+ # GET /hivlocationreports/new
+ # GET /hivlocationreports/new.json
+ def new
+ @hivlocationreport = Hivlocationreport.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @hivlocationreport }
+ end
+ end
+
+ # GET /hivlocationreports/1/edit
+ def edit
+ @hivlocationreport = Hivlocationreport.find(params[:id])
+ end
+
+ # POST /hivlocationreports
+ # POST /hivlocationreports.json
+ def create
+ @hivlocationreport = Hivlocationreport.new(params[:hivlocationreport])
+
+ respond_to do |format|
+ if @hivlocationreport.save
+ format.html { redirect_to @hivlocationreport, notice: 'Hivlocationreport was successfully created.' }
+ format.json { render json: @hivlocationreport, status: :created, location: @hivlocationreport }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @hivlocationreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /hivlocationreports/1
+ # PUT /hivlocationreports/1.json
+ def update
+ @hivlocationreport = Hivlocationreport.find(params[:id])
+
+ respond_to do |format|
+ if @hivlocationreport.update_attributes(params[:hivlocationreport])
+ format.html { redirect_to @hivlocationreport, notice: 'Hivlocationreport was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @hivlocationreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /hivlocationreports/1
+ # DELETE /hivlocationreports/1.json
+ def destroy
+ @hivlocationreport = Hivlocationreport.find(params[:id])
+ @hivlocationreport.destroy
+
+ respond_to do |format|
+ format.html { redirect_to hivlocationreports_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/locationreports_controller.rb b/app/controllers/locationreports_controller.rb
new file mode 100644
index 0000000..fdb7437
--- /dev/null
+++ b/app/controllers/locationreports_controller.rb
@@ -0,0 +1,113 @@
+class LocationreportsController < ApplicationController
+ # GET /locationreports
+ # GET /locationreports.json
+
+layout 'locations'
+ def index
+ @malarialocationreports = Malarialocationreport.new
+ @stuff = Malarialocationreport.new
+ @locations = Location.find(:all)
+ @drop_down_array = Array.new
+
+ if(defined? params[:location][:id])
+ @test = params[:location][:id]
+ @year = params[:date][:year]
+ if @test.empty?
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ else
+ @location_id = @test.to_i
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ end
+ else
+ #Basically this sets the default location
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+
+ end
+
+
+
+
+
+ @malarialocationreports.drawLocationGraph(@location_name,@location_id,@year)
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @locationreports }
+ end
+ end
+
+ # GET /locationreports/1
+ # GET /locationreports/1.json
+ def show
+ @locationreport = Locationreport.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @locationreport }
+ end
+ end
+
+ # GET /locationreports/new
+ # GET /locationreports/new.json
+ def new
+ @locationreport = Locationreport.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @locationreport }
+ end
+ end
+
+ # GET /locationreports/1/edit
+ def edit
+ @locationreport = Locationreport.find(params[:id])
+ end
+
+ # POST /locationreports
+ # POST /locationreports.json
+ def create
+ @locationreport = Locationreport.new(params[:locationreport])
+
+ respond_to do |format|
+ if @locationreport.save
+ format.html { redirect_to @locationreport, notice: 'Locationreport was successfully created.' }
+ format.json { render json: @locationreport, status: :created, location: @locationreport }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @locationreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /locationreports/1
+ # PUT /locationreports/1.json
+ def update
+ @locationreport = Locationreport.find(params[:id])
+
+ respond_to do |format|
+ if @locationreport.update_attributes(params[:locationreport])
+ format.html { redirect_to @locationreport, notice: 'Locationreport was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @locationreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /locationreports/1
+ # DELETE /locationreports/1.json
+ def destroy
+ @locationreport = Locationreport.find(params[:id])
+ @locationreport.destroy
+
+ respond_to do |format|
+ format.html { redirect_to locationreports_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb
new file mode 100644
index 0000000..259b5be
--- /dev/null
+++ b/app/controllers/locations_controller.rb
@@ -0,0 +1,85 @@
+class LocationsController < ApplicationController
+ # GET /locations
+ # GET /locations.json
+
+ layout "locations"
+ def index
+ @locations = Location.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @locations }
+ end
+ end
+
+ # GET /locations/1
+ # GET /locations/1.json
+ def show
+ @location = Location.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @location }
+ end
+ end
+
+ # GET /locations/new
+ # GET /locations/new.json
+ def new
+ @location = Location.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @location }
+ end
+ end
+
+ # GET /locations/1/edit
+ def edit
+ @location = Location.find(params[:id])
+ end
+
+ # POST /locations
+ # POST /locations.json
+ def create
+ @location = Location.new(params[:location])
+
+ respond_to do |format|
+ if @location.save
+ format.html { redirect_to @location, notice: 'Location was successfully created.' }
+ format.json { render json: @location, status: :created, location: @location }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @location.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /locations/1
+ # PUT /locations/1.json
+ def update
+ @location = Location.find(params[:id])
+
+ respond_to do |format|
+ if @location.update_attributes(params[:location])
+ format.html { redirect_to @location, notice: 'Location was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @location.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /locations/1
+ # DELETE /locations/1.json
+ def destroy
+ @location = Location.find(params[:id])
+ @location.destroy
+
+ respond_to do |format|
+ format.html { redirect_to locations_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/malaria_controller.rb b/app/controllers/malaria_controller.rb
new file mode 100644
index 0000000..c90955a
--- /dev/null
+++ b/app/controllers/malaria_controller.rb
@@ -0,0 +1,6 @@
+class MalariaController < ApplicationController
+
+def index
+redirect_to malariacases_path
+end
+end
diff --git a/app/controllers/malariacases_controller.rb b/app/controllers/malariacases_controller.rb
new file mode 100644
index 0000000..ebea149
--- /dev/null
+++ b/app/controllers/malariacases_controller.rb
@@ -0,0 +1,101 @@
+class MalariacasesController < ApplicationController
+ # GET /malariacases
+ # GET /malariacases.json
+layout "malaria"
+ def index
+ @malariacases = Malariacase.all
+ @locations = Villageworker.find(:all)
+ @drop_down_array = Array.new
+
+ @locations.each do |location|
+ @loc = Array.new
+ @loc << location.firstname
+ @loc << location.id
+ @drop_down_array << @loc
+ end
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @malariacases }
+ end
+ end
+
+ # GET /malariacases/1
+ # GET /malariacases/1.json
+ def show
+ @malariacase = Malariacase.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @malariacase }
+ end
+ end
+
+ # GET /malariacases/new
+ # GET /malariacases/new.json
+ def new
+ @malariacase = Malariacase.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @malariacase }
+ end
+ end
+
+#show malaria case report
+
+def showreport
+respond_to do |format|
+format.html
+end
+end
+
+
+ # GET /malariacases/1/edit
+ def edit
+ @malariacase = Malariacase.find(params[:id])
+ end
+
+ # POST /malariacases
+ # POST /malariacases.json
+ def create
+ @malariacase = Malariacase.new(params[:malariacase])
+
+ respond_to do |format|
+ if @malariacase.save
+ format.html { redirect_to @malariacase, notice: 'Malariacase was successfully created.' }
+ format.json { render json: @malariacase, status: :created, location: @malariacase }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @malariacase.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /malariacases/1
+ # PUT /malariacases/1.json
+ def update
+ @malariacase = Malariacase.find(params[:id])
+
+ respond_to do |format|
+ if @malariacase.update_attributes(params[:malariacase])
+ format.html { redirect_to @malariacase, notice: 'Malariacase was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @malariacase.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /malariacases/1
+ # DELETE /malariacases/1.json
+ def destroy
+ @malariacase = Malariacase.find(params[:id])
+ @malariacase.destroy
+
+ respond_to do |format|
+ format.html { redirect_to malariacases_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/malarialocationreports_controller.rb b/app/controllers/malarialocationreports_controller.rb
new file mode 100644
index 0000000..c6a24a5
--- /dev/null
+++ b/app/controllers/malarialocationreports_controller.rb
@@ -0,0 +1,135 @@
+class MalarialocationreportsController < ApplicationController
+layout "malaria"
+# GET /malarialocationreports
+ # GET /malarialocationreports.json
+ def index
+ @malarialocationreports = Malarialocationreport.new
+ @stuff = Malarialocationreport.new
+ @locations = Location.find(:all)
+ @drop_down_array = Array.new
+
+ if(defined? params[:location][:id])
+ @test = params[:location][:id]
+ @year = params[:date][:year]
+ if @test.empty?
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ else
+ @location_id = @test.to_i
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+ end
+ else
+ #Basically this sets the default location
+ @location_id = 1
+ @location_object = Location.find(@location_id)
+ @location_name = @location_object.name
+
+ end
+
+
+
+
+
+ @malarialocationreports.drawLocationGraph(@location_name,@location_id,@year)
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @malarialocationreports }
+ end
+ end
+
+
+
+ # GET /malarialocationreports/1
+ # GET /malarialocationreports/1.json
+ def show
+ @malarialocationreport = Malarialocationreport.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @malarialocationreport }
+ end
+ end
+
+ def show
+ @malarialocationreports = Malarialocationreport.all
+drawGraph
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @malarialocationreports }
+ end
+ end
+
+ # GET /malarialocationreports/1
+ # GET /malarialocationreports/1.json
+ def show
+ @malarialocationreport = Malarialocationreport.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @malarialocationreport }
+ end
+ end
+
+
+ # GET /malarialocationreports/new
+ # GET /malarialocationreports/new.json
+ def new
+ @malarialocationreport = Malarialocationreport.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @malarialocationreport }
+ end
+ end
+
+ # GET /malarialocationreports/1/edit
+ def edit
+ @malarialocationreport = Malarialocationreport.find(params[:id])
+ end
+
+ # POST /malarialocationreports
+ # POST /malarialocationreports.json
+ def create
+ @malarialocationreport = Malarialocationreport.new(params[:malarialocationreport])
+
+ respond_to do |format|
+ if @malarialocationreport.save
+ format.html { redirect_to @malarialocationreport, notice: 'Malarialocationreport was successfully created.' }
+ format.json { render json: @malarialocationreport, status: :created, location: @malarialocationreport }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @malarialocationreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /malarialocationreports/1
+ # PUT /malarialocationreports/1.json
+ def update
+ @malarialocationreport = Malarialocationreport.find(params[:id])
+
+ respond_to do |format|
+ if @malarialocationreport.update_attributes(params[:malarialocationreport])
+ format.html { redirect_to @malarialocationreport, notice: 'Malarialocationreport was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @malarialocationreport.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /malarialocationreports/1
+ # DELETE /malarialocationreports/1.json
+ def destroy
+ @malarialocationreport = Malarialocationreport.find(params[:id])
+ @malarialocationreport.destroy
+
+ respond_to do |format|
+ format.html { redirect_to malarialocationreports_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb
new file mode 100644
index 0000000..1a31b0d
--- /dev/null
+++ b/app/controllers/members_controller.rb
@@ -0,0 +1,83 @@
+class MembersController < ApplicationController
+ # GET /members
+ # GET /members.json
+ def index
+ @members = Member.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @members }
+ end
+ end
+
+ # GET /members/1
+ # GET /members/1.json
+ def show
+ @member = Member.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @member }
+ end
+ end
+
+ # GET /members/new
+ # GET /members/new.json
+ def new
+ @member = Member.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @member }
+ end
+ end
+
+ # GET /members/1/edit
+ def edit
+ @member = Member.find(params[:id])
+ end
+
+ # POST /members
+ # POST /members.json
+ def create
+ @member = Member.new(params[:member])
+
+ respond_to do |format|
+ if @member.save
+ format.html { redirect_to @member, notice: 'Member was successfully created.' }
+ format.json { render json: @member, status: :created, location: @member }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @member.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /members/1
+ # PUT /members/1.json
+ def update
+ @member = Member.find(params[:id])
+
+ respond_to do |format|
+ if @member.update_attributes(params[:member])
+ format.html { redirect_to @member, notice: 'Member was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @member.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /members/1
+ # DELETE /members/1.json
+ def destroy
+ @member = Member.find(params[:id])
+ @member.destroy
+
+ respond_to do |format|
+ format.html { redirect_to members_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
new file mode 100644
index 0000000..2f2cdfe
--- /dev/null
+++ b/app/controllers/messages_controller.rb
@@ -0,0 +1,6 @@
+class MessagesController < ApplicationController
+def create
+Messages.new(params[:message])
+redirect_to :action => "index"
+end
+end
diff --git a/app/controllers/nightattacks_controller.rb b/app/controllers/nightattacks_controller.rb
new file mode 100644
index 0000000..2f028ab
--- /dev/null
+++ b/app/controllers/nightattacks_controller.rb
@@ -0,0 +1,83 @@
+class NightattacksController < ApplicationController
+ # GET /nightattacks
+ # GET /nightattacks.json
+ def index
+ @nightattacks = Nightattack.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @nightattacks }
+ end
+ end
+
+ # GET /nightattacks/1
+ # GET /nightattacks/1.json
+ def show
+ @nightattack = Nightattack.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @nightattack }
+ end
+ end
+
+ # GET /nightattacks/new
+ # GET /nightattacks/new.json
+ def new
+ @nightattack = Nightattack.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @nightattack }
+ end
+ end
+
+ # GET /nightattacks/1/edit
+ def edit
+ @nightattack = Nightattack.find(params[:id])
+ end
+
+ # POST /nightattacks
+ # POST /nightattacks.json
+ def create
+ @nightattack = Nightattack.new(params[:nightattack])
+
+ respond_to do |format|
+ if @nightattack.save
+ format.html { redirect_to @nightattack, notice: 'Nightattack was successfully created.' }
+ format.json { render json: @nightattack, status: :created, location: @nightattack }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @nightattack.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /nightattacks/1
+ # PUT /nightattacks/1.json
+ def update
+ @nightattack = Nightattack.find(params[:id])
+
+ respond_to do |format|
+ if @nightattack.update_attributes(params[:nightattack])
+ format.html { redirect_to @nightattack, notice: 'Nightattack was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @nightattack.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /nightattacks/1
+ # DELETE /nightattacks/1.json
+ def destroy
+ @nightattack = Nightattack.find(params[:id])
+ @nightattack.destroy
+
+ respond_to do |format|
+ format.html { redirect_to nightattacks_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/roadcrimes_controller.rb b/app/controllers/roadcrimes_controller.rb
new file mode 100644
index 0000000..0c5973a
--- /dev/null
+++ b/app/controllers/roadcrimes_controller.rb
@@ -0,0 +1,84 @@
+class RoadcrimesController < ApplicationController
+ # GET /roadcrimes
+ # GET /roadcrimes.json
+layout 'conflict'
+ def index
+ @roadcrimes = Roadcrime.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @roadcrimes }
+ end
+ end
+
+ # GET /roadcrimes/1
+ # GET /roadcrimes/1.json
+ def show
+ @roadcrime = Roadcrime.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @roadcrime }
+ end
+ end
+
+ # GET /roadcrimes/new
+ # GET /roadcrimes/new.json
+ def new
+ @roadcrime = Roadcrime.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @roadcrime }
+ end
+ end
+
+ # GET /roadcrimes/1/edit
+ def edit
+ @roadcrime = Roadcrime.find(params[:id])
+ end
+
+ # POST /roadcrimes
+ # POST /roadcrimes.json
+ def create
+ @roadcrime = Roadcrime.new(params[:roadcrime])
+
+ respond_to do |format|
+ if @roadcrime.save
+ format.html { redirect_to @roadcrime, notice: 'Roadcrime was successfully created.' }
+ format.json { render json: @roadcrime, status: :created, location: @roadcrime }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @roadcrime.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /roadcrimes/1
+ # PUT /roadcrimes/1.json
+ def update
+ @roadcrime = Roadcrime.find(params[:id])
+
+ respond_to do |format|
+ if @roadcrime.update_attributes(params[:roadcrime])
+ format.html { redirect_to @roadcrime, notice: 'Roadcrime was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @roadcrime.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /roadcrimes/1
+ # DELETE /roadcrimes/1.json
+ def destroy
+ @roadcrime = Roadcrime.find(params[:id])
+ @roadcrime.destroy
+
+ respond_to do |format|
+ format.html { redirect_to roadcrimes_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
new file mode 100644
index 0000000..2f67133
--- /dev/null
+++ b/app/controllers/sessions_controller.rb
@@ -0,0 +1,22 @@
+class SessionsController < ApplicationController
+skip_before_filter :authorize
+
+def new
+end
+
+def create
+ if user = User.authenticate(params[:name],params[:password])
+ session[:user_id] = user.id
+ session[:user_name] = params[:name]
+ redirect_to admin_url
+ else
+ redirect_to login_url, :alert => "Invalid User/password combination"
+ end
+
+ def destroy
+ session[:user_id] = nil
+ redirect_to store_url, :notice => "Logged out"
+ end
+end
+end
+
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb
new file mode 100644
index 0000000..fe0dea9
--- /dev/null
+++ b/app/controllers/settings_controller.rb
@@ -0,0 +1,6 @@
+class SettingsController < ApplicationController
+layout "settings"
+def index
+redirect_to smsmessages_path
+end
+end
diff --git a/app/controllers/sms_controller.rb b/app/controllers/sms_controller.rb
new file mode 100644
index 0000000..e9e8abb
--- /dev/null
+++ b/app/controllers/sms_controller.rb
@@ -0,0 +1,106 @@
+class SmsController < ApplicationController
+skip_before_filter :authorize
+
+layout "settings"
+
+ # GET /sms
+ # GET /sms.json
+ def index
+ @sms = Sm.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @sms }
+ end
+ end
+
+ # GET /sms/1
+ # GET /sms/1.json
+ def show
+ @sm = Sm.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @sm }
+ end
+ end
+
+ # GET /sms/new
+ # GET /sms/new.json
+ def new
+ @sm = Sm.new
+ @sm.phone =params[:phone]
+ @sm.text = params[:text]
+ @sm.save
+ #redirect_to @sm
+
+ respond_to do |format|
+format.all { render :text=>'Thank you, your request is being processed'}
+ end
+ end
+
+ # when an sms is send we save it in the database then
+ # we analyse the sms
+
+def getsms
+ @new_sms = Sm.new
+ @new_sms.phone = params[:phone]
+ @new_sms.text = params[:text]
+ @new_sms.save
+
+ respond_to do |format|
+ format.all {render :text=>'Thank you , Your sms has been received'}
+ end
+end
+
+
+ # GET /sms/1/edit
+ def edit
+ @sm = Sm.find(params[:id])
+ end
+
+ # POST /sms
+ # POST /sms.json
+ def create
+ @sm = Sm.new
+
+
+ respond_to do |format|
+ if @sm.save
+ format.html { redirect_to @sm, notice: 'Sm was successfully created.' }
+ format.json { render json: @sm, status: :created, location: @sm }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @sm.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /sms/1
+ # PUT /sms/1.json
+ def update
+ @sm = Sm.find(params[:id])
+
+ respond_to do |format|
+ if @sm.update_attributes(params[:sm])
+ format.html { redirect_to @sm, notice: 'Sm was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @sm.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /sms/1
+ # DELETE /sms/1.json
+ def destroy
+ @sm = Sm.find(params[:id])
+ @sm.destroy
+
+ respond_to do |format|
+ format.html { redirect_to sms_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/smsmessages_controller.rb b/app/controllers/smsmessages_controller.rb
new file mode 100644
index 0000000..90eed2a
--- /dev/null
+++ b/app/controllers/smsmessages_controller.rb
@@ -0,0 +1,89 @@
+class SmsmessagesController < ApplicationController
+ # GET /smsmessages
+ # GET /smsmessages.json
+skip_before_filter :authorize
+
+layout "settings"
+ def index
+ @smsmessages = Smsmessage.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @smsmessages }
+ end
+ end
+
+ # GET /smsmessages/1
+ # GET /smsmessages/1.json
+ def show
+ @smsmessage = Smsmessage.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @smsmessage }
+ end
+ end
+
+ # GET /smsmessages/new
+ # GET /smsmessages/new.json
+ def new
+ @smsmessage = Smsmessage.new
+
+
+ #redirect_to @sm
+
+ respond_to do |format|
+ format.all { render :text=>@smsmessage.render(params[:phone],params[:text])}
+ end
+
+ end
+
+ # GET /smsmessages/1/edit
+ def edit
+ @smsmessage = Smsmessage.find(params[:id])
+ end
+
+ # POST /smsmessages
+ # POST /smsmessages.json
+ def create
+ @smsmessage = Smsmessage.new(params[:smsmessage])
+
+ respond_to do |format|
+ if @smsmessage.save
+ format.html { redirect_to @smsmessage, notice: 'Smsmessage was successfully created.' }
+ format.json { render json: @smsmessage, status: :created, location: @smsmessage }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @smsmessage.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /smsmessages/1
+ # PUT /smsmessages/1.json
+ def update
+ @smsmessage = Smsmessage.find(params[:id])
+
+ respond_to do |format|
+ if @smsmessage.update_attributes(params[:smsmessage])
+ format.html { redirect_to @smsmessage, notice: 'Smsmessage was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @smsmessage.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /smsmessages/1
+ # DELETE /smsmessages/1.json
+ def destroy
+ @smsmessage = Smsmessage.find(params[:id])
+ @smsmessage.destroy
+
+ respond_to do |format|
+ format.html { redirect_to smsmessages_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/controllers/test_it_controller.rb b/app/controllers/test_it_controller.rb
new file mode 100644
index 0000000..8d16563
--- /dev/null
+++ b/app/controllers/test_it_controller.rb
@@ -0,0 +1,15 @@
+class TestItController < ApplicationController
+ def index
+ @graph = open_flash_chart_object(600,300,"/test_it/graph_code")
+ end
+
+ def graph_code
+ title = Title.new("MY TITLE")
+ bar = BarGlass.new
+ bar.set_values([1,2,3,4,5,6,7,8,9])
+ chart = OpenFlashChart.new
+ chart.set_title(title)
+ chart.add_element(bar)
+ render :text => chart.to_s
+ end
+end
diff --git a/app/controllers/textmessage_controller.rb b/app/controllers/textmessage_controller.rb
new file mode 100644
index 0000000..9e4988d
--- /dev/null
+++ b/app/controllers/textmessage_controller.rb
@@ -0,0 +1,35 @@
+class TextmessageController < ApplicationController
+skip_before_filter :authorize
+
+ def new
+ @textmessage = TextMessage.new("Love","love")
+ @textmessage.text = params[:text]
+ @textmessage.phone = params[:phone]
+ @textmessage.save
+
+ respond_to do |format|
+ format.all {render :text=>'Thank you! Your request is being processed'}
+ end
+ end
+
+
+ def index
+ @textmessage = TextMessage.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @textmessage }
+ end
+
+ def show
+ @textmessage = TextMessage.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @textmessage }
+ end
+ end
+
+ end
+
+end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
new file mode 100644
index 0000000..0a9e1f8
--- /dev/null
+++ b/app/controllers/users_controller.rb
@@ -0,0 +1,86 @@
+class UsersController < ApplicationController
+ # GET /users
+ # GET /users.json
+
+layout "settings"
+skip_before_filter :authorize
+def index
+ @users = User.order(:name)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @users }
+ end
+ end
+
+ # GET /users/1
+ # GET /users/1.json
+ def show
+ @user = User.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @user }
+ end
+ end
+
+ # GET /users/new
+ # GET /users/new.json
+ def new
+ @user = User.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @user }
+ end
+ end
+
+ # GET /users/1/edit
+ def edit
+ @user = User.find(params[:id])
+ end
+
+ # POST /users
+ # POST /users.json
+ def create
+ @user = User.new(params[:user])
+
+ respond_to do |format|
+ if @user.save
+ format.html { redirect_to users_url, notice: 'User #{@user.name} was successfully created.' }
+ format.json { render json: @user, status: :created, location: @user }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @user.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /users/1
+ # PUT /users/1.json
+ def update
+ @user = User.find(params[:id])
+
+ respond_to do |format|
+ if @user.update_attributes(params[:user])
+ format.html { redirect_to users_url, notice: 'User {@user.name} was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @user.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /users/1
+ # DELETE /users/1.json
+ def destroy
+ @user = User.find(params[:id])
+ @user.destroy
+
+ respond_to do |format|
+ format.html { redirect_to users_url }
+ format.json { head :no_content }
+ end
+ end
+end
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
new file mode 100644
index 0000000..d5c6d35
--- /dev/null
+++ b/app/helpers/admin_helper.rb
@@ -0,0 +1,2 @@
+module AdminHelper
+end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
new file mode 100644
index 0000000..de6be79
--- /dev/null
+++ b/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
diff --git a/app/helpers/cattlethefts_helper.rb b/app/helpers/cattlethefts_helper.rb
new file mode 100644
index 0000000..7ededf7
--- /dev/null
+++ b/app/helpers/cattlethefts_helper.rb
@@ -0,0 +1,2 @@
+module CattletheftsHelper
+end
diff --git a/app/helpers/childhealth_helper.rb b/app/helpers/childhealth_helper.rb
new file mode 100644
index 0000000..fbfd316
--- /dev/null
+++ b/app/helpers/childhealth_helper.rb
@@ -0,0 +1,2 @@
+module ChildhealthHelper
+end
diff --git a/app/helpers/community_health_workers_helper.rb b/app/helpers/community_health_workers_helper.rb
new file mode 100644
index 0000000..18d44b2
--- /dev/null
+++ b/app/helpers/community_health_workers_helper.rb
@@ -0,0 +1,2 @@
+module CommunityHealthWorkersHelper
+end
diff --git a/app/helpers/conflicts_helper.rb b/app/helpers/conflicts_helper.rb
new file mode 100644
index 0000000..ffd5767
--- /dev/null
+++ b/app/helpers/conflicts_helper.rb
@@ -0,0 +1,2 @@
+module ConflictsHelper
+end
diff --git a/app/helpers/dotsmembers_helper.rb b/app/helpers/dotsmembers_helper.rb
new file mode 100644
index 0000000..81c4440
--- /dev/null
+++ b/app/helpers/dotsmembers_helper.rb
@@ -0,0 +1,2 @@
+module DotsmembersHelper
+end
diff --git a/app/helpers/firearms_helper.rb b/app/helpers/firearms_helper.rb
new file mode 100644
index 0000000..b782059
--- /dev/null
+++ b/app/helpers/firearms_helper.rb
@@ -0,0 +1,2 @@
+module FirearmsHelper
+end
diff --git a/app/helpers/hivaid_helper.rb b/app/helpers/hivaid_helper.rb
new file mode 100644
index 0000000..9af9c2b
--- /dev/null
+++ b/app/helpers/hivaid_helper.rb
@@ -0,0 +1,2 @@
+module HivaidHelper
+end
diff --git a/app/helpers/hivcases_helper.rb b/app/helpers/hivcases_helper.rb
new file mode 100644
index 0000000..d8a08cf
--- /dev/null
+++ b/app/helpers/hivcases_helper.rb
@@ -0,0 +1,2 @@
+module HivcasesHelper
+end
diff --git a/app/helpers/hivcontraceptionreports_helper.rb b/app/helpers/hivcontraceptionreports_helper.rb
new file mode 100644
index 0000000..adfd1f1
--- /dev/null
+++ b/app/helpers/hivcontraceptionreports_helper.rb
@@ -0,0 +1,2 @@
+module HivcontraceptionreportsHelper
+end
diff --git a/app/helpers/hivdrugreports_helper.rb b/app/helpers/hivdrugreports_helper.rb
new file mode 100644
index 0000000..c94af75
--- /dev/null
+++ b/app/helpers/hivdrugreports_helper.rb
@@ -0,0 +1,2 @@
+module HivdrugreportsHelper
+end
diff --git a/app/helpers/hivgenderreports_helper.rb b/app/helpers/hivgenderreports_helper.rb
new file mode 100644
index 0000000..86a8ed8
--- /dev/null
+++ b/app/helpers/hivgenderreports_helper.rb
@@ -0,0 +1,2 @@
+module HivgenderreportsHelper
+end
diff --git a/app/helpers/hivlocationreports_helper.rb b/app/helpers/hivlocationreports_helper.rb
new file mode 100644
index 0000000..f8b514e
--- /dev/null
+++ b/app/helpers/hivlocationreports_helper.rb
@@ -0,0 +1,2 @@
+module HivlocationreportsHelper
+end
diff --git a/app/helpers/immunization_helper.rb b/app/helpers/immunization_helper.rb
new file mode 100644
index 0000000..557e008
--- /dev/null
+++ b/app/helpers/immunization_helper.rb
@@ -0,0 +1,2 @@
+module ImmunizationHelper
+end
diff --git a/app/helpers/locationreports_helper.rb b/app/helpers/locationreports_helper.rb
new file mode 100644
index 0000000..30698e7
--- /dev/null
+++ b/app/helpers/locationreports_helper.rb
@@ -0,0 +1,2 @@
+module LocationreportsHelper
+end
diff --git a/app/helpers/locations_helper.rb b/app/helpers/locations_helper.rb
new file mode 100644
index 0000000..46f9428
--- /dev/null
+++ b/app/helpers/locations_helper.rb
@@ -0,0 +1,2 @@
+module LocationsHelper
+end
diff --git a/app/helpers/malaria_helper.rb b/app/helpers/malaria_helper.rb
new file mode 100644
index 0000000..5baf21c
--- /dev/null
+++ b/app/helpers/malaria_helper.rb
@@ -0,0 +1,2 @@
+module MalariaHelper
+end
diff --git a/app/helpers/malariacases_helper.rb b/app/helpers/malariacases_helper.rb
new file mode 100644
index 0000000..efaef41
--- /dev/null
+++ b/app/helpers/malariacases_helper.rb
@@ -0,0 +1,2 @@
+module MalariacasesHelper
+end
diff --git a/app/helpers/malariagenderreports_helper.rb b/app/helpers/malariagenderreports_helper.rb
new file mode 100644
index 0000000..e7a0c7a
--- /dev/null
+++ b/app/helpers/malariagenderreports_helper.rb
@@ -0,0 +1,2 @@
+module MalariagenderreportsHelper
+end
diff --git a/app/helpers/malarialocationreports_helper.rb b/app/helpers/malarialocationreports_helper.rb
new file mode 100644
index 0000000..beae6f2
--- /dev/null
+++ b/app/helpers/malarialocationreports_helper.rb
@@ -0,0 +1,2 @@
+module MalarialocationreportsHelper
+end
diff --git a/app/helpers/malariapreventationreports_helper.rb b/app/helpers/malariapreventationreports_helper.rb
new file mode 100644
index 0000000..c447f96
--- /dev/null
+++ b/app/helpers/malariapreventationreports_helper.rb
@@ -0,0 +1,2 @@
+module MalariapreventationreportsHelper
+end
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb
new file mode 100644
index 0000000..e3fa623
--- /dev/null
+++ b/app/helpers/members_helper.rb
@@ -0,0 +1,2 @@
+module MembersHelper
+end
diff --git a/app/helpers/nightattacks_helper.rb b/app/helpers/nightattacks_helper.rb
new file mode 100644
index 0000000..12ef8d7
--- /dev/null
+++ b/app/helpers/nightattacks_helper.rb
@@ -0,0 +1,2 @@
+module NightattacksHelper
+end
diff --git a/app/helpers/patients_helper.rb b/app/helpers/patients_helper.rb
new file mode 100644
index 0000000..e3835d0
--- /dev/null
+++ b/app/helpers/patients_helper.rb
@@ -0,0 +1,2 @@
+module PatientsHelper
+end
diff --git a/app/helpers/roadcrimes_helper.rb b/app/helpers/roadcrimes_helper.rb
new file mode 100644
index 0000000..90d71ad
--- /dev/null
+++ b/app/helpers/roadcrimes_helper.rb
@@ -0,0 +1,2 @@
+module RoadcrimesHelper
+end
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
new file mode 100644
index 0000000..309f8b2
--- /dev/null
+++ b/app/helpers/sessions_helper.rb
@@ -0,0 +1,2 @@
+module SessionsHelper
+end
diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
new file mode 100644
index 0000000..ffbedba
--- /dev/null
+++ b/app/helpers/settings_helper.rb
@@ -0,0 +1,2 @@
+module SettingsHelper
+end
diff --git a/app/helpers/sms_helper.rb b/app/helpers/sms_helper.rb
new file mode 100644
index 0000000..61cb239
--- /dev/null
+++ b/app/helpers/sms_helper.rb
@@ -0,0 +1,2 @@
+module SmsHelper
+end
diff --git a/app/helpers/smsmessages_helper.rb b/app/helpers/smsmessages_helper.rb
new file mode 100644
index 0000000..5929ada
--- /dev/null
+++ b/app/helpers/smsmessages_helper.rb
@@ -0,0 +1,2 @@
+module SmsmessagesHelper
+end
diff --git a/app/helpers/tb_helper.rb b/app/helpers/tb_helper.rb
new file mode 100644
index 0000000..576044e
--- /dev/null
+++ b/app/helpers/tb_helper.rb
@@ -0,0 +1,2 @@
+module TbHelper
+end
diff --git a/app/helpers/tbcases_helper.rb b/app/helpers/tbcases_helper.rb
new file mode 100644
index 0000000..3426fb2
--- /dev/null
+++ b/app/helpers/tbcases_helper.rb
@@ -0,0 +1,2 @@
+module TbcasesHelper
+end
diff --git a/app/helpers/tbdotreports_helper.rb b/app/helpers/tbdotreports_helper.rb
new file mode 100644
index 0000000..357d880
--- /dev/null
+++ b/app/helpers/tbdotreports_helper.rb
@@ -0,0 +1,2 @@
+module TbdotreportsHelper
+end
diff --git a/app/helpers/tblocationreports_helper.rb b/app/helpers/tblocationreports_helper.rb
new file mode 100644
index 0000000..5b50eaf
--- /dev/null
+++ b/app/helpers/tblocationreports_helper.rb
@@ -0,0 +1,2 @@
+module TblocationreportsHelper
+end
diff --git a/app/helpers/test_it_helper.rb b/app/helpers/test_it_helper.rb
new file mode 100644
index 0000000..f14774f
--- /dev/null
+++ b/app/helpers/test_it_helper.rb
@@ -0,0 +1,2 @@
+module TestItHelper
+end
diff --git a/app/helpers/textmessage_helper.rb b/app/helpers/textmessage_helper.rb
new file mode 100644
index 0000000..feb9bad
--- /dev/null
+++ b/app/helpers/textmessage_helper.rb
@@ -0,0 +1,2 @@
+module TextmessageHelper
+end
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
new file mode 100644
index 0000000..2310a24
--- /dev/null
+++ b/app/helpers/users_helper.rb
@@ -0,0 +1,2 @@
+module UsersHelper
+end
diff --git a/app/helpers/villageworkers_helper.rb b/app/helpers/villageworkers_helper.rb
new file mode 100644
index 0000000..83548f0
--- /dev/null
+++ b/app/helpers/villageworkers_helper.rb
@@ -0,0 +1,2 @@
+module VillageworkersHelper
+end
diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/models/.gitkeep b/app/models/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/models/car.rb b/app/models/car.rb
new file mode 100644
index 0000000..a8b2a0f
--- /dev/null
+++ b/app/models/car.rb
@@ -0,0 +1,2 @@
+class Car < ActiveRecord::Base
+end
diff --git a/app/models/cattletheft.rb b/app/models/cattletheft.rb
new file mode 100644
index 0000000..3bf5f34
--- /dev/null
+++ b/app/models/cattletheft.rb
@@ -0,0 +1,2 @@
+class Cattletheft < ActiveRecord::Base
+end
diff --git a/app/models/conflict.rb b/app/models/conflict.rb
new file mode 100644
index 0000000..d3a1223
--- /dev/null
+++ b/app/models/conflict.rb
@@ -0,0 +1,2 @@
+class Conflict < ActiveRecord::Base
+end
diff --git a/app/models/firearm.rb b/app/models/firearm.rb
new file mode 100644
index 0000000..0b71211
--- /dev/null
+++ b/app/models/firearm.rb
@@ -0,0 +1,2 @@
+class Firearm < ActiveRecord::Base
+end
diff --git a/app/models/hivlocationreport.rb b/app/models/hivlocationreport.rb
new file mode 100644
index 0000000..a706ccd
--- /dev/null
+++ b/app/models/hivlocationreport.rb
@@ -0,0 +1,11 @@
+require 'predictor/locationrpt'
+class Hivlocationreport < ActiveRecord::Base
+
+
+def drawLocationGraph(locationName,locationId,year)
+@hiv_location_rpt = Hivlocationrpt.new
+@hiv_location_rpt.executeCommand(locationName,locationId,year) #draw a graph with the title command
+end
+
+
+end
diff --git a/app/models/location.rb b/app/models/location.rb
new file mode 100644
index 0000000..a6388f6
--- /dev/null
+++ b/app/models/location.rb
@@ -0,0 +1,3 @@
+class Location < ActiveRecord::Base
+has_many :villageworkers
+end
diff --git a/app/models/locationreport.rb b/app/models/locationreport.rb
new file mode 100644
index 0000000..a8a051c
--- /dev/null
+++ b/app/models/locationreport.rb
@@ -0,0 +1,2 @@
+class Locationreport < ActiveRecord::Base
+end
diff --git a/app/models/locations/genderrpt.rb b/app/models/locations/genderrpt.rb
new file mode 100644
index 0000000..db22e20
--- /dev/null
+++ b/app/models/locations/genderrpt.rb
@@ -0,0 +1,32 @@
+class Genderrpt
+#initialize the class with nothing
+def initailize
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(title)
+
+# With more options now
+g = Gruff::Pie.new('800x400') # Define a custom size
+g.sort = false # Do NOT sort data based on values
+
+g.theme_pastel # Declare a theme from the presets available
+
+g.title = title
+
+g.data('Men', [5, 10, 24])
+g.data('Women', [15, 3, 10])
+g.labels = {0 => 'Last year', 1 => 'This year'} # Define labels for each of the "columns" in data
+
+g.write('app/assets/images/malaria_gender_report_pie.png')
+end
+
+public
+#Execute command to generate the graph
+def executeCommand(title)
+ drawGenderReportGraph(title)
+end
+
+end
+
+
diff --git a/app/models/locations/locationrpt.rb b/app/models/locations/locationrpt.rb
new file mode 100644
index 0000000..1e143bc
--- /dev/null
+++ b/app/models/locations/locationrpt.rb
@@ -0,0 +1,77 @@
+class Locationrpt
+
+def initialize
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(locationName,locationId,year)
+# Let's hack almost everything
+g = Gruff::Pie.new # Define a custom size
+g.theme_pastel
+g.title = locationName
+
+if year == nil
+@graph_title = "Location Report"
+else
+@graph_title = "Location Report for year "<< year
+end
+
+#Count the number of malaria cases for january
+
+#January
+january_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'january' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#February
+february_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'february' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#March
+march_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'march' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#April
+april_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'april' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#May
+may_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'may' and Year(date_diagnosed) = '2012' and location_id =#{locationId}"
+#June
+june_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'june' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#july
+july_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'july' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#August
+august_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'august' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#September
+september_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'september' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#October
+october_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'octomber' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#November
+november_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'november' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#December
+december_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'december' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+
+
+@jan_malaria_cases = Malariacase.count_by_sql(january_sql)
+@feb_malaria_cases = Malariacase.count_by_sql(february_sql)
+@mar_malaria_cases = Malariacase.count_by_sql(march_sql)
+@apr_malaria_cases = Malariacase.count_by_sql(april_sql)
+@may_malaria_cases = Malariacase.count_by_sql(may_sql)
+@jun_malaria_cases = Malariacase.count_by_sql(june_sql)
+@jul_malaria_cases = Malariacase.count_by_sql(july_sql)
+@aug_malaria_cases = Malariacase.count_by_sql(august_sql)
+@sep_malaria_cases = Malariacase.count_by_sql(september_sql)
+@oct_malaria_cases = Malariacase.count_by_sql(october_sql)
+@nov_malaria_cases = Malariacase.count_by_sql(november_sql)
+@dec_malaria_cases = Malariacase.count_by_sql(december_sql)
+
+
+g.data 'Cattle rustling', 30
+g.data 'Road Crime', 30
+g.data 'Firearms', 30
+
+g.write('app/assets/images/locations_report.png')
+end
+
+public
+
+#Execute command to generate the graph
+def executeCommand(locationName,locationId,year)
+ drawGenderReportGraph(locationName,locationId,year)
+end
+
+end
+
+
diff --git a/app/models/locations/malariaprocessor.rb b/app/models/locations/malariaprocessor.rb
new file mode 100644
index 0000000..9a68c12
--- /dev/null
+++ b/app/models/locations/malariaprocessor.rb
@@ -0,0 +1,57 @@
+class Malariaprocessor
+def initialize(createMalariaCommand)
+
+#Split the strings into individual substrings
+@commands = createMalariaCommand.split(',')
+end
+#rpt malaria,[patientId]
+
+#Validate addition of malaria command
+def validNewMalariaCommand?
+ if @commands.size < 2
+ return false
+ elsif @commands[1].size <=0
+ return false
+ end
+ return true
+end
+#validate if the patient Id send is valid i.e if it exists in the database
+def invalidPatientId
+@patients =Patient.where("patient_number =?",@commands[1])
+ if @patients.size == 0
+ return true
+ end
+return false
+end
+
+public
+def executeCommand(malariacaseModel)
+ @newMalariaCase = malariacaseModel
+ #validate the patient command
+ if not validNewMalariaCommand?
+ return "To report a malaria case send sms command like this report malaria,patient id"
+ elsif invalidPatientId
+ return "invalid Patient Id"
+ else
+
+ #get the patient who has the patient_number so that we can get the location of this patient
+ @patient_list = Patient.where("patient_number = ?",@commands[1])
+ #Find the Patient Location from the community health worker's location this is vital for reporting
+ @community_worker_id = @patient_list[0].communityworker_id
+
+ #Find a model that corresponds to this community health worker
+ @model_community_worker = Villageworker.find(@community_worker_id)
+
+
+ @newMalariaCase.date_diagnosed = Time.now
+ @newMalariaCase.location_id = @model_community_worker.location_id
+ @newMalariaCase.patient_number = @commands[1]
+ @newMalariaCase.save
+
+ return "Thank you the malaria case has been reported"
+ end
+end
+
+end
+
+
diff --git a/app/models/locations/prevention.rb b/app/models/locations/prevention.rb
new file mode 100644
index 0000000..fc6c0b3
--- /dev/null
+++ b/app/models/locations/prevention.rb
@@ -0,0 +1,30 @@
+class Preventionrpt
+def initialize
+
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(title)
+##LINE GRAPH
+g = Gruff::Line.new('900x500') #Define a New Graph
+g.title = "Malaria Infections for year 2012" #Title for the Graph
+g.theme_pastel # Declare a theme from the presets available
+
+g.data("Malaria Cases", [1, 2, 3, 4, 4, 3]) #Graph Data
+g.data("Use of Mosquito Nets", [4, 8, 7, 9, 8, 9,5,6,3,4,2,4,2])
+g.data("Availability of Drugs", [2, 3, 1, 5, 6, 8,3,5,4,6,5,2])
+
+g.labels = {0 => 'Jan', 1 => 'Feb', 2 => 'Mar', 3 => 'Apr', 4 => 'May', 5 => 'Jun', 6 => 'July', 7 => 'Aug', 8 => 'Sep', 9 => 'Oct', 10 => 'Nov', 11 => 'Dec'} #Labels for Each of the Graph
+
+g.write('app/assets/images/malaria_prevention_report_line.png')
+end
+
+public
+#Execute command to generate the graph
+def executeCommand(title)
+ drawGenderReportGraph(title)
+end
+
+end
+
+
diff --git a/app/models/malariacase.rb b/app/models/malariacase.rb
new file mode 100644
index 0000000..7add39a
--- /dev/null
+++ b/app/models/malariacase.rb
@@ -0,0 +1,11 @@
+require 'locations/malariaprocessor'
+
+class Malariacase < ActiveRecord::Base
+belongs_to :patients, :foreign_key => :patient_id, :class_name => "Patient"
+
+def executeSmsCommand(command)
+@newmalariaCase = Malariaprocessor.new(command)
+@newmalariaCase.executeCommand(self)
+end
+
+end
diff --git a/app/models/malarialocationreport.rb b/app/models/malarialocationreport.rb
new file mode 100644
index 0000000..aace3ab
--- /dev/null
+++ b/app/models/malarialocationreport.rb
@@ -0,0 +1,9 @@
+require 'locations/locationrpt'
+class Malarialocationreport < ActiveRecord::Base
+
+def drawLocationGraph(location_name,location_id,year)
+@malaria_location_rpt = Locationrpt.new
+@malaria_location_rpt.executeCommand(location_name,location_id,year) #draw a graph with the title command
+end
+
+end
diff --git a/app/models/member.rb b/app/models/member.rb
new file mode 100644
index 0000000..999bd44
--- /dev/null
+++ b/app/models/member.rb
@@ -0,0 +1,2 @@
+class Member < ActiveRecord::Base
+end
diff --git a/app/models/members/genderrpt.rb b/app/models/members/genderrpt.rb
new file mode 100644
index 0000000..db22e20
--- /dev/null
+++ b/app/models/members/genderrpt.rb
@@ -0,0 +1,32 @@
+class Genderrpt
+#initialize the class with nothing
+def initailize
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(title)
+
+# With more options now
+g = Gruff::Pie.new('800x400') # Define a custom size
+g.sort = false # Do NOT sort data based on values
+
+g.theme_pastel # Declare a theme from the presets available
+
+g.title = title
+
+g.data('Men', [5, 10, 24])
+g.data('Women', [15, 3, 10])
+g.labels = {0 => 'Last year', 1 => 'This year'} # Define labels for each of the "columns" in data
+
+g.write('app/assets/images/malaria_gender_report_pie.png')
+end
+
+public
+#Execute command to generate the graph
+def executeCommand(title)
+ drawGenderReportGraph(title)
+end
+
+end
+
+
diff --git a/app/models/members/locationrpt.rb b/app/models/members/locationrpt.rb
new file mode 100644
index 0000000..1e143bc
--- /dev/null
+++ b/app/models/members/locationrpt.rb
@@ -0,0 +1,77 @@
+class Locationrpt
+
+def initialize
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(locationName,locationId,year)
+# Let's hack almost everything
+g = Gruff::Pie.new # Define a custom size
+g.theme_pastel
+g.title = locationName
+
+if year == nil
+@graph_title = "Location Report"
+else
+@graph_title = "Location Report for year "<< year
+end
+
+#Count the number of malaria cases for january
+
+#January
+january_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'january' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#February
+february_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'february' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#March
+march_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'march' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#April
+april_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'april' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#May
+may_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'may' and Year(date_diagnosed) = '2012' and location_id =#{locationId}"
+#June
+june_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'june' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#july
+july_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'july' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#August
+august_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'august' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#September
+september_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'september' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#October
+october_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'octomber' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#November
+november_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'november' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#December
+december_sql = "SELECT COUNT(*) from malariacases where MonthName(date_diagnosed) = 'december' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+
+
+@jan_malaria_cases = Malariacase.count_by_sql(january_sql)
+@feb_malaria_cases = Malariacase.count_by_sql(february_sql)
+@mar_malaria_cases = Malariacase.count_by_sql(march_sql)
+@apr_malaria_cases = Malariacase.count_by_sql(april_sql)
+@may_malaria_cases = Malariacase.count_by_sql(may_sql)
+@jun_malaria_cases = Malariacase.count_by_sql(june_sql)
+@jul_malaria_cases = Malariacase.count_by_sql(july_sql)
+@aug_malaria_cases = Malariacase.count_by_sql(august_sql)
+@sep_malaria_cases = Malariacase.count_by_sql(september_sql)
+@oct_malaria_cases = Malariacase.count_by_sql(october_sql)
+@nov_malaria_cases = Malariacase.count_by_sql(november_sql)
+@dec_malaria_cases = Malariacase.count_by_sql(december_sql)
+
+
+g.data 'Cattle rustling', 30
+g.data 'Road Crime', 30
+g.data 'Firearms', 30
+
+g.write('app/assets/images/locations_report.png')
+end
+
+public
+
+#Execute command to generate the graph
+def executeCommand(locationName,locationId,year)
+ drawGenderReportGraph(locationName,locationId,year)
+end
+
+end
+
+
diff --git a/app/models/members/malariaprocessor.rb b/app/models/members/malariaprocessor.rb
new file mode 100644
index 0000000..9a68c12
--- /dev/null
+++ b/app/models/members/malariaprocessor.rb
@@ -0,0 +1,57 @@
+class Malariaprocessor
+def initialize(createMalariaCommand)
+
+#Split the strings into individual substrings
+@commands = createMalariaCommand.split(',')
+end
+#rpt malaria,[patientId]
+
+#Validate addition of malaria command
+def validNewMalariaCommand?
+ if @commands.size < 2
+ return false
+ elsif @commands[1].size <=0
+ return false
+ end
+ return true
+end
+#validate if the patient Id send is valid i.e if it exists in the database
+def invalidPatientId
+@patients =Patient.where("patient_number =?",@commands[1])
+ if @patients.size == 0
+ return true
+ end
+return false
+end
+
+public
+def executeCommand(malariacaseModel)
+ @newMalariaCase = malariacaseModel
+ #validate the patient command
+ if not validNewMalariaCommand?
+ return "To report a malaria case send sms command like this report malaria,patient id"
+ elsif invalidPatientId
+ return "invalid Patient Id"
+ else
+
+ #get the patient who has the patient_number so that we can get the location of this patient
+ @patient_list = Patient.where("patient_number = ?",@commands[1])
+ #Find the Patient Location from the community health worker's location this is vital for reporting
+ @community_worker_id = @patient_list[0].communityworker_id
+
+ #Find a model that corresponds to this community health worker
+ @model_community_worker = Villageworker.find(@community_worker_id)
+
+
+ @newMalariaCase.date_diagnosed = Time.now
+ @newMalariaCase.location_id = @model_community_worker.location_id
+ @newMalariaCase.patient_number = @commands[1]
+ @newMalariaCase.save
+
+ return "Thank you the malaria case has been reported"
+ end
+end
+
+end
+
+
diff --git a/app/models/members/prevention.rb b/app/models/members/prevention.rb
new file mode 100644
index 0000000..fc6c0b3
--- /dev/null
+++ b/app/models/members/prevention.rb
@@ -0,0 +1,30 @@
+class Preventionrpt
+def initialize
+
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(title)
+##LINE GRAPH
+g = Gruff::Line.new('900x500') #Define a New Graph
+g.title = "Malaria Infections for year 2012" #Title for the Graph
+g.theme_pastel # Declare a theme from the presets available
+
+g.data("Malaria Cases", [1, 2, 3, 4, 4, 3]) #Graph Data
+g.data("Use of Mosquito Nets", [4, 8, 7, 9, 8, 9,5,6,3,4,2,4,2])
+g.data("Availability of Drugs", [2, 3, 1, 5, 6, 8,3,5,4,6,5,2])
+
+g.labels = {0 => 'Jan', 1 => 'Feb', 2 => 'Mar', 3 => 'Apr', 4 => 'May', 5 => 'Jun', 6 => 'July', 7 => 'Aug', 8 => 'Sep', 9 => 'Oct', 10 => 'Nov', 11 => 'Dec'} #Labels for Each of the Graph
+
+g.write('app/assets/images/malaria_prevention_report_line.png')
+end
+
+public
+#Execute command to generate the graph
+def executeCommand(title)
+ drawGenderReportGraph(title)
+end
+
+end
+
+
diff --git a/app/models/message.rb b/app/models/message.rb
new file mode 100644
index 0000000..590e3e3
--- /dev/null
+++ b/app/models/message.rb
@@ -0,0 +1,2 @@
+class Message < ActiveRecord::Base
+end
diff --git a/app/models/messageparser.rb b/app/models/messageparser.rb
new file mode 100644
index 0000000..b8a4c4d
--- /dev/null
+++ b/app/models/messageparser.rb
@@ -0,0 +1,6 @@
+class Messageparser < ActiveRecord::Base
+
+def render
+end
+
+end
diff --git a/app/models/nightattack.rb b/app/models/nightattack.rb
new file mode 100644
index 0000000..c276bcc
--- /dev/null
+++ b/app/models/nightattack.rb
@@ -0,0 +1,2 @@
+class Nightattack < ActiveRecord::Base
+end
diff --git a/app/models/patient.rb b/app/models/patient.rb
new file mode 100644
index 0000000..995cd0a
--- /dev/null
+++ b/app/models/patient.rb
@@ -0,0 +1,14 @@
+require 'patients/patientprocessor'
+
+class Patient < ActiveRecord::Base
+
+has_many :malariacases
+belongs_to :villageworker,:foreign_key => "communityworker_id"
+belongs_to :location
+
+def executeSmsCommand(phone,smscommand)
+@patientProcessor = Patientprocessor.new(phone,smscommand)
+@patientProcessor.executeCommand(self)
+end
+
+end
diff --git a/app/models/predictor/hivprocessor.rb b/app/models/predictor/hivprocessor.rb
new file mode 100644
index 0000000..c85de6a
--- /dev/null
+++ b/app/models/predictor/hivprocessor.rb
@@ -0,0 +1,30 @@
+class Predictorprocessor
+def initialize(rptHivCommand)
+
+#Split the strings into individual substrings
+@commands = rptHivCommand.split(',')
+end
+#rpt hiv,[patientId]
+
+#Validate addition of malaria command
+def validrptHivCommand?
+ if @commands.size < 2
+ return false
+ elsif @commands[1].size <=0
+ return false
+ elsif @commands[2].size <=0
+ return false
+ elsif @commands[3].size <=0
+ return false
+ end
+ return true
+end
+
+public
+def executeCommand(hivcaseModel)
+
+end
+
+end
+
+
diff --git a/app/models/predictor/locationrpt.rb b/app/models/predictor/locationrpt.rb
new file mode 100644
index 0000000..7893999
--- /dev/null
+++ b/app/models/predictor/locationrpt.rb
@@ -0,0 +1,85 @@
+class Hivlocationrpt
+
+def initialize
+end
+
+#Method to draw the Gender Pie chart
+def drawGenderReportGraph(locationName,locationId,year)
+
+#January
+#Count the number of malaria cases for january
+
+#January
+january_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'january' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#February
+february_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'february' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#March
+march_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'march' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#April
+april_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'april' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#May
+may_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'may' and Year(date_diagnosed) = '2012' and location_id =#{locationId}"
+#June
+june_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'june' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#july
+july_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'july' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#August
+august_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'august' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#September
+september_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'september' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#October
+october_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'octomber' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#November
+november_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'november' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+#December
+december_sql = "SELECT COUNT(*) from hivcases where MonthName(date_diagnosed) = 'december' and Year(date_diagnosed) = '#{year}' and location_id =#{locationId}"
+
+
+#@jan_hiv_cases = Hivcase.count_by_sql(january_sql)
+#@feb_hiv_cases = Hivcase.count_by_sql(february_sql)
+#@mar_hiv_cases = Hivcase.count_by_sql(march_sql)
+#@apr_hiv_cases = Hivcase.count_by_sql(april_sql)
+#@may_hiv_cases = Hivcase.count_by_sql(may_sql)
+#@jun_hiv_cases = Hivcase.count_by_sql(june_sql)
+#@jul_hiv_cases = Hivcase.count_by_sql(july_sql)
+#@aug_hiv_cases = Hivcase.count_by_sql(august_sql)
+#@sep_hiv_cases = Hivcase.count_by_sql(september_sql)
+#@oct_hiv_cases = Hivcase.count_by_sql(october_sql)
+#@nov_hiv_cases = Hivcase.count_by_sql(november_sql)
+#@dec_hiv_cases = Hivcase.count_by_sql(december_sql)
+
+@jan_hiv_cases = 9
+@feb_hiv_cases = 9
+@mar_hiv_cases = 5
+@apr_hiv_cases = 65
+@may_hiv_cases = 3
+@jun_hiv_cases = 34
+@jul_hiv_cases = 5
+@aug_hiv_cases = 21
+@sep_hiv_cases = 23
+@oct_hiv_cases = 54
+@nov_hiv_cases = 65
+@dec_hiv_cases = 6
+
+
+
+# Let's hack almost everything
+g = Gruff::Line.new('900x500') # Define a custom size
+g.theme_pastel
+g.title = "Location Name:"+ locationName
+
+g.data " Distaster Prediction ", [@jan_hiv_cases, @feb_hiv_cases, @mar_hiv_cases, @apr_hiv_cases, @may_hiv_cases,@jun_hiv_cases,@jul_hiv_cases,@aug_hiv_cases,@sep_hiv_cases,@oct_hiv_cases,@nov_hiv_cases,@dec_hiv_cases]
+g.labels = { 0 => "Jan", 1 => "Feb", 2 => "March", 3 => "April", 4 => "May", 5 => "June",6 => "July" ,
+7 => "Aug" ,8 => "Sept",9 => "Oct",10 => "Nov",11 => "Dec" }
+g.write('app/assets/images/predictor_location_report.png')
+end
+
+public
+#Execute command to generate the graph
+def executeCommand(locationName,locationId,year)
+ drawGenderReportGraph(locationName,locationId,year)
+end
+
+end
+
+
diff --git a/app/models/roadcrime.rb b/app/models/roadcrime.rb
new file mode 100644
index 0000000..dc6b852
--- /dev/null
+++ b/app/models/roadcrime.rb
@@ -0,0 +1,2 @@
+class Roadcrime < ActiveRecord::Base
+end
diff --git a/app/models/sm.rb b/app/models/sm.rb
new file mode 100644
index 0000000..05e3a3f
--- /dev/null
+++ b/app/models/sm.rb
@@ -0,0 +1,5 @@
+class Sm < ActiveRecord::Base
+def render
+"Thank you , a new patient has been registered"
+end
+end
diff --git a/app/models/smsmessage.rb b/app/models/smsmessage.rb
new file mode 100644
index 0000000..bb6b069
--- /dev/null
+++ b/app/models/smsmessage.rb
@@ -0,0 +1,12 @@
+require 'textmessageparser/smsparser.rb'
+
+class Smsmessage < ActiveRecord::Base
+
+
+def render(phone_number,message)
+@smsparser = Textmessageparser.new(phone_number,message)
+@smsparser.render
+end
+
+
+end
diff --git a/app/models/tblocationreport.rb b/app/models/tblocationreport.rb
new file mode 100644
index 0000000..5cb49d9
--- /dev/null
+++ b/app/models/tblocationreport.rb
@@ -0,0 +1,11 @@
+require 'tb/locationrpt'
+
+class Tblocationreport < ActiveRecord::Base
+
+def drawLocationGraph(locationName,locationId,year)
+@tb_location_rpt = Tblocationrpt.new
+@tb_location_rpt.executeCommand(locationName,locationId,year) #draw a graph with the title command
+end
+
+
+end
diff --git a/app/models/text_message.rb b/app/models/text_message.rb
new file mode 100644
index 0000000..1da3d9b
--- /dev/null
+++ b/app/models/text_message.rb
@@ -0,0 +1,2 @@
+class TextMessage < ActiveRecord::Base
+end
diff --git a/app/models/textmessageparser/smsparser.rb b/app/models/textmessageparser/smsparser.rb
new file mode 100644
index 0000000..d01d469
--- /dev/null
+++ b/app/models/textmessageparser/smsparser.rb
@@ -0,0 +1,72 @@
+class Textmessageparser
+
+def initialize(phone,message)
+
+
+@phone_number = phone
+@textmessage = message
+
+@textmessagerecord = Smsmessage.new
+@textmessagerecord.phone = @phone_number
+@textmessagerecord.message = @textmessage
+@textmessagerecord.save
+
+#Split the strings into individual substrings
+@commands = @textmessage.split(',')
+@command = @commands[0].downcase #put in in lower case
+
+#this is the list of all the valid acceptable substrings
+@start_commands = "rpt roadcrime,rpt cattletheft,rpt firearms,get alert"
+@start_command_array = @start_commands.split(',')
+
+end
+
+
+#render
+def render
+if @command == "rpt roadcrime"
+
+ return "Thank you ! the case has been successfully reported."
+elsif @command == "rpt cattletheft"
+ @numberStolen = @commands[1]
+ @dateReported = Date.now
+ @location = @commands[2]
+
+ @cattlecrime = Cattletheft.new
+ @cattlecrime.numberstolen = @numberStolen
+ @cattlecrime.location = @location
+ @cattlecrime.save
+
+ return "Thank you the Cattle theft case has been reported"
+
+elsif @command == "rpt firearms"
+
+ return "Thank you Firearm case has been reported"
+else
+ return "Unrecoginsed Command"
+end
+
+end
+
+
+
+#Validate the start command
+def validStartCommand
+#Check if the command is valid
+@start_command_array.each do |commands|
+#convert to lowercase
+commands = commands.downcase
+
+#if a match is found then return true
+if @command == commands
+return true
+end
+return false
+end
+
+#if start command is not valid
+false
+end
+
+
+end
diff --git a/app/models/user.rb b/app/models/user.rb
new file mode 100644
index 0000000..151bf5b
--- /dev/null
+++ b/app/models/user.rb
@@ -0,0 +1,47 @@
+require 'digest/sha2'
+
+class User < ActiveRecord::Base
+validates :name, :presence => true, :uniqueness => true
+
+validates :password, :confirmation => true
+
+attr_accessor :password_confirmation
+attr_reader :password
+
+validate :password_must_be_present
+
+class << self
+def authenticate(name,password)
+if user = find_by_name(name)
+if user.hashed_password == encrypt_password(password,user.salt)
+user
+end
+end
+end
+
+
+def encrypt_password(password,salt)
+Digest::SHA2.hexdigest(password + "village" +salt)
+end
+end
+
+def password=(password)
+@password = password
+
+if password.present?
+generate_salt
+self.hashed_password = self.class.encrypt_password(password,salt)
+end
+end
+
+
+private
+
+def password_must_be_present
+errors.add(:password, "Missing passwords") unless hashed_password.present?
+end
+
+def generate_salt
+self.salt = self.object_id.to_s + rand.to_s
+end
+end
diff --git a/app/views/admin/_admin_menu.html.erb b/app/views/admin/_admin_menu.html.erb
new file mode 100644
index 0000000..8988e42
--- /dev/null
+++ b/app/views/admin/_admin_menu.html.erb
@@ -0,0 +1,5 @@
+
diff --git a/app/views/admin/_footer.html.erb b/app/views/admin/_footer.html.erb
new file mode 100644
index 0000000..41c76eb
--- /dev/null
+++ b/app/views/admin/_footer.html.erb
@@ -0,0 +1,6 @@
+
+
+