This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MedicalRecordFormsController < ApplicationController | |
| before_action :account | |
| before_action :resident | |
| # before_action :medications, only: [:new, :edit] | |
| def index | |
| @medical_record_forms = resident.medical_record_forms | |
| end | |
| def new | |
| @medical_record_form = resident.medical_record_forms.build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="nested-fields"> | |
| <%= f.hidden_field :medical_record_form_id, value: params[:id] %> | |
| <div class="row"> | |
| <div class="col-sm-6 col-md-3 pad-btm bord-all"> | |
| <%= f.label :name, "<span class='text text-semibold'>Medication name:</span>".html_safe, class: "control-label mar-lft" %><br> | |
| <div class="mar-lft"> | |
| <%= f.text_field :name, hide_label: true, class: "form-control" %> | |
| </div> | |
| <% if @medical_record_form.errors.include? :name %> | |
| <div class="pad-top"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--HEAD omitted for brevity--> | |
| <div id="content-container"> | |
| <div class="page-head"> | |
| <div id="page-title"> | |
| <h1 class="page-header text-overflow">Create Brett Carters Medication Record</h1> | |
| <!--Searchbox--> | |
| <div class="searchbox"> | |
| <div class="input-group custom-search-form"> | |
| <input type="text" class="form-control" placeholder="Search.."> | |
| <span class="input-group-btn"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Started POST "/residents/25/medical_record_forms" for 127.0.0.1 at 2017-12-13 08:07:28 -0500 | |
| Processing by MedicalRecordFormsController#create as HTML | |
| Parameters: {"utf8"=>"✓", "authenticity_token"=>"jVYwaGdErwFowS4kTRhp9yrLBcW0OHKY+r0vuIuVxd4a6jaE8AQxpHqv9xBUWIamOpV/UoB58rq2vWnZcnLN0w==", "medical_record_form"=>{"medications_attributes"=>{"1"=>{"medical_record_form_id"=>"", "name"=>"Chlorthalidone", "dosage"=>"35mg", "time_taken(1i)"=>"1", "time_taken(2i)"=>"1", "time_taken(3i)"=>"1", "time_taken(4i)"=>"", "time_taken(5i)"=>"", "usage_type"=>"PRN", "_destroy"=>"false", "id"=>"241"}, "2"=>{"medical_record_form_id"=>"", "name"=>"Aspirin", "dosage"=>"80mg", "time_taken(1i)"=>"1", "time_taken(2i)"=>"1", "time_taken(3i)"=>"1", "time_taken(4i)"=>"", "time_taken(5i)"=>"", "usage_type"=>"Scheduled", "_destroy"=>"false", "id"=>"242"}, "3"=>{"medical_record_form_id"=>"", "name"=>"Palamadone", "dosage"=>"75mg", "time_taken(1i)"=>"1", "time_taken(2i)"=>"1", "time_taken(3i)"=>"1", "time_taken(4i)"=>"", "time_taken(5i)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MedicalRecordFormsController < ApplicationController | |
| before_action :account | |
| before_action :resident | |
| def index | |
| @medical_record_forms = resident.medical_record_forms | |
| end | |
| def new | |
| @medical_record_form = resident.medical_record_forms.build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rails.application.configure do | |
| # Settings specified here will take precedence over those in config/application.rb. | |
| # Set logging related values | |
| config.log_level = :debug | |
| RAILS_DEFAULT_LOGGER = Logger.new('log/production.log') | |
| # Code is not reloaded between requests. | |
| config.cache_classes = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler' | |
| require 'rake' | |
| require 'sidekiq' | |
| namespace :sidekiq do | |
| namespace :start do | |
| task :cron do | |
| system "bundle exec sidekiq -q default" | |
| system "rake cron" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Resque.redis = 'localhost:6379' | |
| Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'uri' | |
| require 'redis' | |
| require 'addressable' | |
| if Rails.env.production? | |
| uri = Addressable::URI.parse(ENV["REDIS_PROVIDER"] || "redis://172.17.0.5:6379") | |
| REDIS = Redis.new(url: uri) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem 'redis' | |
| gem 'resque', require: 'resque/server' | |
| gem 'resque-scheduler' |