repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/git.rb | lib/onotole/git.rb | # frozen_string_literal: true
module Onotole
module Git
def install_user_gems_from_github
File.readlines('Gemfile').each do |l|
possible_gem_name = l.match(%r{(?:github:\s+)(?:'|")\w+/(.*)(?:'|")}i)
install_from_github possible_gem_name[1] if possible_gem_name
end
end
def crea... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/generators/app_generator.rb | lib/onotole/generators/app_generator.rb | # frozen_string_literal: true
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
module Onotole
class AppGenerator < Rails::Generators::AppGenerator
def self.start
class_option :database, type: :string, aliases: '-d', default: 'postgresql',
desc: "Con... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/adapters/heroku.rb | lib/onotole/adapters/heroku.rb | # frozen_string_literal: true
module Onotole
module Adapters
class Heroku
def initialize(app_builder)
@app_builder = app_builder
end
def set_heroku_remotes
remotes = <<-SHELL.strip_heredoc
#{command_to_join_heroku_app('staging')}
#{command_to_join_heroku_app(... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/add_user_gems/goodbye_message.rb | lib/onotole/add_user_gems/goodbye_message.rb | # frozen_string_literal: true
module Onotole
module Goodbye
def show_goodbye_message
github_check
airbrake_check
graphviz_check
image_optim_check
rack_cors_check
ckeditor_check
devise_user_check
say_color BOLDGREEN, "Congratulations! Onotole gives you: 'Intellect+= ... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/add_user_gems/user_gems_menu_questions.rb | lib/onotole/add_user_gems/user_gems_menu_questions.rb | # frozen_string_literal: true
module Onotole
module UserGemsMenu
def users_gems
choose_cms_engine
choose_template_engine
choose_frontend
choose_authenticate_engine
choose_authorization_engine
choose_pagimation
choose_wysiwyg
choose_develoder_tools
choose_cache... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/add_user_gems/edit_menu_questions.rb | lib/onotole/add_user_gems/edit_menu_questions.rb | # frozen_string_literal: true
module Onotole
module EditMenuQuestions
def choose_frontend
# do not forget add in def configure_simple_form new frameworks
variants = { none: 'No front-end framework',
bootstrap3_sass: 'Twitter bootstrap v.3 sass',
boots... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/add_user_gems/before_bundle_patch.rb | lib/onotole/add_user_gems/before_bundle_patch.rb | # frozen_string_literal: true
module Onotole
module BeforeBundlePatch
def add_user_gems
add_to_user_choise(:devise_bootstrap_views) if user_choose?(:bootstrap3_sass) && user_choose?(:devise)
GEMPROCLIST.each do |g|
send "add_#{g}_gem" if user_choose? g.to_sym
end
end
def setup_d... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
kvokka/onotole | https://github.com/kvokka/onotole/blob/3c14f28863dbbad1a4c5f072b706154e326eb276/lib/onotole/add_user_gems/after_install_patch.rb | lib/onotole/add_user_gems/after_install_patch.rb | # frozen_string_literal: true
module Onotole
module AfterInstallPatch
def post_init
install_queue = [:redis, :redis_rails, :redis_namespace,
:carrierwave,
:sitemap_generator,
:ckeditor,
:materialize_sass,
... | ruby | MIT | 3c14f28863dbbad1a4c5f072b706154e326eb276 | 2026-01-04T17:54:02.890450Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/serializers/measure_serializer.rb | app/serializers/measure_serializer.rb | class MeasureSerializer < ActiveModel::Serializer
attributes :id
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/serializers/health_data_standards/cqm/measure_serializer.rb | app/serializers/health_data_standards/cqm/measure_serializer.rb | module HealthDataStandards
module CQM
class MeasureSerializer < ActiveModel::Serializer
attributes :_id, :name, :category, :hqmf_id, :type, :sub_id, :lower_is_better, :cms_id,:description
end
end
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/serializers/api/measure_serializer.rb | app/serializers/api/measure_serializer.rb | class Api::MeasureSerializer < ActiveModel::Serializer
attributes :_id, :name, :category, :hqmf_id, :type, :cms_id
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/helpers/reports_helper.rb | app/helpers/reports_helper.rb | module ReportsHelper
def generate_cat3(provider, effective_date, measure_ids)
exporter = HealthDataStandards::Export::Cat3.new
effective_date ||= Time.gm(2012,12,31)
end_date = DateTime.new(effective_date.to_i, 12, 31)
provider_filter = {}
provider_filter['filters.providers'] = provider.id.to_s
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/helpers/pagination_helper.rb | app/helpers/pagination_helper.rb | module PaginationHelper
def paginate(base_url,collection)
set_pagination_params
count = collection.count
links = generate_links(base_url,count,@per_page,@page)
response.headers["Link"] = links.join(",") if !links.empty?
collection.skip(@offset).limit(@per_page)
end
def generate_links(base_u... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/helpers/application_helper.rb | app/helpers/application_helper.rb | module ApplicationHelper
def render_js(options = nil, extra_options = {}, &block)
escape_javascript(render(options, extra_options, &block))
end
def numerator_width(numerator, patient_count)
if numerator && !patient_count.zero?
"#{((numerator / patient_count.to_f) * 100).to_i}%"
else
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/helpers/logs_helper.rb | app/helpers/logs_helper.rb | module LogsHelper
def time_range_params_plus(url_params_hash)
url_params_hash[:log_start_date] = params[:log_start_date] if params[:log_start_date]
url_params_hash[:log_end_date] = params[:log_end_date] if params[:log_end_date]
url_params_hash
end
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/helpers/home_helper.rb | app/helpers/home_helper.rb | module HomeHelper
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/home_controller.rb | app/controllers/home_controller.rb | class HomeController < ApplicationController
before_filter :authenticate_user!, :validate_authorization!
def index
# TODO base this on provider
@patient_count = Record.count
@categories = HealthDataStandards::CQM::Measure.categories([:lower_is_better, :type])
end
private
def validate_authorizati... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/logs_controller.rb | app/controllers/logs_controller.rb | class LogsController < ApplicationController
before_filter :authenticate_user!
before_filter :validate_authorization!
# All attributes of the Log class are valid to sort on except ones that start with an underscore.
VALID_SORTABLE_COLUMNS = Log.fields.keys.reject {|k| k[0] == '_'}
VALID_SORT_ORDERS = ['desc... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/registrations_controller.rb | app/controllers/registrations_controller.rb | class RegistrationsController < Devise::RegistrationsController
before_filter :configure_permitted_parameters, if: :devise_controller?
wrap_parameters :user, format: [:json]
unless (APP_CONFIG['allow_user_update'])
before_filter :authorize_user_update
skip_before_filter :require_no_authentication
end
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/admin_controller.rb | app/controllers/admin_controller.rb | require 'import_archive_job'
require 'fileutils'
class AdminController < ApplicationController
before_filter :authenticate_user!
before_filter :validate_authorization!
def patients
@patient_count = Record.count
@query_cache_count = HealthDataStandards::CQM::QueryCache.count
@patient_cache_count = P... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/application_controller.rb | app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery
layout :layout_by_resource
before_filter :set_effective_date
before_filter :check_ssl_used
# lock it down!
check_authorization :unless => :devise_controller?
private
# Overwriting the sign_out redirect path method
def after_s... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/queries_controller.rb | app/controllers/api/queries_controller.rb | module Api
class QueriesController < ApplicationController
resource_description do
short 'Queries'
formats ['json']
description <<-QCDESC
This resource is responsible for managing clinical quality measure calculations. Creating a new query will kick
off a new CQM calculation (if... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/measures_controller.rb | app/controllers/api/measures_controller.rb | require 'measures/loader.rb'
require 'hds/measure.rb'
module Api
class MeasuresController < ApplicationController
resource_description do
short 'Measures'
formats ['json']
description "This resource allows for the management of clinical quality measures in the popHealth application."
end
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/providers_controller.rb | app/controllers/api/providers_controller.rb | module Api
class ProvidersController < ApplicationController
resource_description do
short 'Providers'
formats ['json']
description <<-PRCDESC
This resource allows for the management of providers in popHealth
popHealth assumes that providers are in a hierarchy. This resource all... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/patients_controller.rb | app/controllers/api/patients_controller.rb | module Api
class PatientsController < ApplicationController
resource_description do
short 'Patients'
description <<-PCDESC
This resource allows for the management of patient records in the popHealth application.
Patient records can be inserted into popHealth in QRDA Category I format... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/reports_controller.rb | app/controllers/api/reports_controller.rb | module Api
class ReportsController < ApplicationController
resource_description do
short 'Reports'
formats ['xml']
description <<-RCDESC
This resource is responsible for the generation of QRDA Category III reports from clincial
quality measure calculations.
RCDESC
end
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/admin/caches_controller.rb | app/controllers/api/admin/caches_controller.rb | module Api
module Admin
class CachesController < ApplicationController
resource_description do
resource_id 'Admin::Caches'
short 'Caches Admin'
formats ['json']
description "This resource allows for administrative tasks to be performed on the cache via the API."
end
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/admin/users_controller.rb | app/controllers/api/admin/users_controller.rb | module Api
module Admin
class UsersController < ApplicationController
resource_description do
resource_id 'Admin::Users'
short 'Users Admin'
formats ['json']
description "This resource allows for administrative tasks to be performed on users via the API."
end
incl... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/admin/providers_controller.rb | app/controllers/api/admin/providers_controller.rb | module Api
module Admin
class ProvidersController < ApplicationController
resource_description do
resource_id 'Admin::Providers'
short 'Providers Admin'
formats ['json']
description "This resource allows for administrative tasks to be performed on providers via the API."
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/controllers/api/admin/patients_controller.rb | app/controllers/api/admin/patients_controller.rb | module Api
module Admin
class PatientsController < ApplicationController
resource_description do
resource_id 'Admin::Patients'
short 'Patients Admin'
formats ['json']
description "This resource allows for the management of clinical quality measures in the popHealth applicatio... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/language.rb | app/models/language.rb | class Language
include Mongoid::Document
field :name, type: String
field :order, type: Integer
field :codes, type: Array
scope :ordered, -> { asc(:order) }
scope :selected, ->(language_ids) { any_in(:_id => language_ids)}
scope :selected_or_all, ->(language_ids) { language_ids.nil? || language_ids.e... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/preference.rb | app/models/preference.rb | class Preference
include Mongoid::Document
field :selected_measure_ids, type: Array, default: []
field :mask_phi_data, type: Boolean, default: false
field :should_display_circle_visual, type: Boolean, default: true
field :population_chart_scaled_to_IPP, type: Boolean, default: false
belongs_to :user
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/bundle.rb | app/models/bundle.rb | class Bundle
include Mongoid::Document
field :title, type: String
field :effective_date, type: Integer
field :version, type: String
field :license, type: String
field :measures, type: Array
field :exported, type: String
field :extensions, type: Array
def license
read_attribute(:license)
.g... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/ability.rb | app/models/ability.rb | class Ability
include CanCan::Ability
def initialize(user)
# Define abilities for the passed in user here. For example:
#
# The first argument to `can` is the action you are giving the user permission to do.
# If you pass :manage it will apply to every action. Other common actions here are
# :r... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/log.rb | app/models/log.rb | class Log
include Mongoid::Document
include Mongoid::Timestamps
field :username, :type => String
field :event, :type => String
field :description, :type => String
field :medical_record_number, :type => String
field :checksum, :type => String
end | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/ethnicity.rb | app/models/ethnicity.rb | class Ethnicity
include Mongoid::Document
field :name, type: String
field :order, type: Integer
field :codes, type: Array
scope :from_code, ->(code) {where("codes" => code)}
scope :ordered, -> { asc(:order) }
scope :selected, ->(ethnicity_ids) { any_in(:_id => ethnicity_ids)}
scope :selected_or_al... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/manual_exclusion.rb | app/models/manual_exclusion.rb | class ManualExclusion
include Mongoid::Document
store_in collection: :manual_exclusions
field :measure_id, type: String
field :sub_id, type: String
field :medical_record_id, type: String
field :rationale, type: String
field :created_at, type: Date
belongs_to :user
scope :selected, ->(medical_record... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/organization.rb | app/models/organization.rb | class Organization
# include Mongoid::Document
# include Mongoid::Timestamps
# #include Mongoid::Tree
# # include Mongoid::Tree::Ordering
# # include Mongoid::Tree::Traversal
# field :name, type: String
# field :type, type: String
# field :npi, type: String
# has_many :providers
# def all_provi... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/race.rb | app/models/race.rb | class Race
include Mongoid::Document
field :name, type: String
field :order, type: Integer
field :codes, type: Array
scope :from_code, ->(code) {where("codes" => code)}
scope :ordered, -> { asc(:username) }
scope :selected, ->(race_ids) { any_in(:_id => race_ids)}
scope :selected_or_all, ->(race_i... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/patient_cache.rb | app/models/patient_cache.rb | class PatientCache
include Mongoid::Document
store_in collection: :patient_cache
field :first, type: String
field :last, type: String
field :patient_id, type: String
field :birthdate, type: Integer
field :gender, type: String
scope :by_provider, ->(provider, effective_date) { where({'value.prov... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/models/user.rb | app/models/user.rb | require 'uniq_validator'
require 'protected_attributes'
class User
include ActiveModel::MassAssignmentSecurity
include Mongoid::Document
after_initialize :build_preferences, unless: Proc.new { |user| user.preferences.present? }
before_save :denullify_arrays
before_create :set_defaults
DEFAULT_EFFECTIVE_... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/app/mailers/notifier.rb | app/mailers/notifier.rb | class Notifier < ActionMailer::Base
default :from => "noreply@pophealth.org"
def reset_password(user)
@user = user
mail(:to => user.email, :subject => 'popHealth Account Password Reset')
end
def verify(user)
@user = user
mail(:to => user.email, :subject => 'popHealth Account Verification')
e... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/vendor/assets/components/font-awesome/src/_plugins/icon_page_generator.rb | vendor/assets/components/font-awesome/src/_plugins/icon_page_generator.rb | ##
# Create individual pages for each icon in the FontAwesome set
require 'yaml'
require 'debugger'
module Jekyll
class IconPage < Page
##
# Take a single icon and render a page for it.
def initialize(site, base, dir, icon)
@site = site
@base = base
@dir = dir
@name = "#{icon.... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/vendor/assets/components/font-awesome/src/_plugins/site.rb | vendor/assets/components/font-awesome/src/_plugins/site.rb | ##
# Provide an icons attribute on the site object
require 'yaml'
require 'forwardable'
module Jekyll
class Icon
attr_reader :name, :id, :unicode, :created, :categories
def initialize(icon_object)
@icon_object = icon_object
# Class name used in CSS and HTML
@icon_object['class'] = icon... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/simple_cov.rb | test/simple_cov.rb | require 'simplecov'
SimpleCov.start 'rails'
class SimpleCov::Formatter::QualityFormatter
def format(result)
SimpleCov::Formatter::HTMLFormatter.new.format(result)
File.open("coverage/covered_percent", "w") do |f|
f.puts result.source_files.covered_percent.to_f
end
end
end
SimpleCov.formatter = S... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/test_helper.rb | test/test_helper.rb | ENV["RAILS_ENV"] = "test"
require_relative "./simple_cov"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'factory_girl'
require 'mocha/setup'
FactoryGirl.find_definitions
class ActiveSupport::TestCase
def dump_database
User.delete_all
Provider.delete_all
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/unit/admin_rake_test.rb | test/unit/admin_rake_test.rb | require 'test_helper'
class AdminRakeTest < ActiveSupport::TestCase
@@rake = nil
setup do
dump_database
if (!@@rake)
@@rake = Rake.application
Rake.application = @@rake
Rake.application.rake_require "../../lib/tasks/admin"
Rake::Task.define_task(:environment)
end... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/unit/user_rake_test.rb | test/unit/user_rake_test.rb | require 'test_helper'
class UserRakeTest < ActiveSupport::TestCase
@@rake = nil
setup do
dump_database
collection_fixtures 'users'
@unapproved_user = User.where({email: 'unapproved@test.com'}).first
@user = User.where({email: 'noadmin@test.com'}).first
@admin = User.where({email: 'admin@tes... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/unit/helpers/logs_helper_test.rb | test/unit/helpers/logs_helper_test.rb | require 'test_helper'
class LogsHelperTest < ActionView::TestCase
test "should be able to add the time to the rest of the params" do
existing_params = {:page => 4}
params[:log_start_date] = 'tomorrow'
time_range_params_plus(existing_params)
assert_equal 4, existing_params[:page]
assert_equal 'tom... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/unit/models/user_test.rb | test/unit/models/user_test.rb | require 'test_helper'
class UserTest < ActiveSupport::TestCase
setup do
dump_database
collection_fixtures 'users'
@user = User.where({email: 'noadmin@test.com'}).first
end
test "user should be found by username" do
found_user = User.by_username @user.username
assert_equal @user, found_user... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/unit/models/provider_test.rb | test/unit/models/provider_test.rb | require 'test_helper'
class ProviderTest < ActiveSupport::TestCase
test "should import providers from OPML properly" do
provider_tree = ProviderTreeImporter.new(File.new('test/fixtures/providers.opml'))
provider_tree.load_providers(provider_tree.sub_providers)
leaf = Provider.where(:given_name => "Newin... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/logs_controller_test.rb | test/functional/logs_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
class LogsControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@user = User.where({email: 'admin@test.com'}).first
sign_in @user
end
test "GET 'index'" do
get :index
assert_response :success
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/registrations_controller_test.rb | test/functional/registrations_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
class RegistrationsControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@user = User.where({email: 'noadmin@test.com'}).first
@user.password = "password"
@user.save
end
test "a signed in user can upd... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/admin_controller_test.rb | test/functional/admin_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
class AdminControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@admin = User.where({email: 'admin@test.com'}).first
@user = User.where({email: 'noadmin@test.com'}).first
@user2 = User.where({email: '... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/providers_controller_test.rb | test/functional/api/providers_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
class ProvidersControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users', 'providers', 'measures'
@user = User.where({email: 'admin@test.com'}).first
@provider = Provider.where({family_name... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/queries_controller_test.rb | test/functional/api/queries_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
class QueriesControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'measures'
collection_fixtures 'query_cache'
collection_fixtures 'records'
collection_fixtures 'patient_cache'
colle... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/patients_controller_test.rb | test/functional/api/patients_controller_test.rb | require 'test_helper'
module Api
class PatientsControllerTest < ActionController::TestCase
include Devise::TestHelpers
setup do
dump_database
collection_fixtures 'measures', 'patient_cache', 'records', 'users'
@user = User.where({email: 'admin@test.com'}).first
sign_in @user
en... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/reports_controller_test.rb | test/functional/api/reports_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
class ReportsControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'measures'
collection_fixtures 'query_cache'
collection_fixtures 'records'
collection_fixtures 'patient_cache'
colle... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/measures_controller_test.rb | test/functional/api/measures_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
class MeasuresControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'measures', 'records', 'users'
@user = User.where({email: "noadmin@test.com"}).first
@admin = User.where({email: "admin@test.... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/admin/providers_controller_test.rb | test/functional/api/admin/providers_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
module Admin
class ProvidersControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@admin = User.where({email: 'admin@test.com'}).first
@user = User.where({email: 'noadmin@... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/admin/users_controller_test.rb | test/functional/api/admin/users_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
module Admin
class UsersControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@admin = User.where({email: 'admin@test.com'}).first
@user = User.where({email: 'noadmin@te... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/admin/patients_controller_test.rb | test/functional/api/admin/patients_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
module Admin
class PatientsControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@admin = User.where({email: 'admin@test.com'}).first
@user = User.where({email: 'noadmin@te... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/test/functional/api/admin/caches_controller_test.rb | test/functional/api/admin/caches_controller_test.rb | require 'test_helper'
include Devise::TestHelpers
module Api
module Admin
class CachesControllerTest < ActionController::TestCase
setup do
dump_database
collection_fixtures 'users'
@admin = User.where({email: 'admin@test.com'}).first
@user = User.where({email: 'noadmin@test... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/spec/javascripts/support/jasmine_helper.rb | spec/javascripts/support/jasmine_helper.rb | #Use this file to set/override Jasmine configuration options
#You can remove it if you don't need it.
#This file is loaded *after* jasmine.yml is interpreted.
#
#Example: using a different boot file.
#Jasmine.configure do |config|
# @config.boot_dir = '/absolute/path/to/boot_dir'
# @config.boot_files = lambda { ['/... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/oid_helper.rb | lib/oid_helper.rb | class OidHelper
def self.generate_oid_dictionary(measure)
valuesets = HealthDataStandards::SVS::ValueSet.in(oid: measure['oids'])
js = {}
valuesets.each do |vs|
js[vs['oid']] ||= {}
vs['concepts'].each do |con|
name = con['code_system_name']
js[vs['oid']][name] ||= []
j... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/uniq_validator.rb | lib/uniq_validator.rb | # lib/email_validator.rb
class UniqValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
u = MONGO_DB['users'].find_one({attribute => value})
if u && (record.new_record? || record._id != u['_id'])
record.errors[attribute] << (options[:message] || "is not unique")
end... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/provider_tree_importer.rb | lib/provider_tree_importer.rb | require 'rexml/document'
class ProviderTreeImporter
class ProviderEntry
attr_accessor :attributes, :sub_providers
def initialize(element)
@attributes = map_attributes_to_hash(element.attributes)
@sub_providers = element.elements.map { |this| ProviderEntry.new(this) }
end
def flatten
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/import_archive_job.rb | lib/import_archive_job.rb | class ImportArchiveJob
attr_accessor :file, :current_user
def initialize(options)
@file = options['file'].path
@current_user = options['user']
end
def before
Log.create(:username => @current_user.username, :event => 'record import')
end
def perform
missing_patients = HealthDataStandards::... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/qme/quality_report.rb | lib/qme/quality_report.rb | # Extending QualityReport so that updating a single patient can deal with
# OID dictionaries
module QME
class QualityReport
# Removes the cached results for the patient with the supplied id and
# recalculates as necessary
def self.update_patient_results(id)
# TODO: need to wait for any outstandin... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/measures/loader.rb | lib/measures/loader.rb | module Measures
class Loader
PARSERS = [HQMF::Parser::V2Parser,HQMF::Parser::V1Parser]
DRAFT_DIRECTORY = "tmp/draft_measures"
def self.parse_model(xml_path)
xml_contents = Nokogiri::XML(File.new xml_path)
parser = get_parser(xml_contents)
parser.parse(xml_contents)
end
def ... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/hds/provider.rb | lib/hds/provider.rb | class Provider
field :level, type: String
embeds_many :cda_identifiers, class_name: "CDAIdentifier"
scope :alphabetical, ->{order_by([:family_name, :asc], [:given_name, :asc])}
scope :can_merge_with, ->(prov) { prov.npi.blank? ? all_except(prov) : all_except(prov).without_npi }
scope :all_except, ->(prov... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/hds/record.rb | lib/hds/record.rb | class Record
include Mongoid::Document
# ===========================================================
# = This record extends the record in health data standards =
# ===========================================================
field :measures, type: Hash
scope :alphabetical, ->{order_by([:last, :asc], ... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/hds/provider_performance.rb | lib/hds/provider_performance.rb | class ProviderPerformance
include Mongoid::Document
field :start_date, type: Integer
field :end_date, type: Integer
belongs_to :provider
embedded_in :record
end | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/hds/measure.rb | lib/hds/measure.rb | module HealthDataStandards
module CQM
class Measure
include Mongoid::Document
field :lower_is_better, type: Boolean
end
end
end
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/lib/hds/query_cache.rb | lib/hds/query_cache.rb | module HealthDataStandards
module CQM
class QueryCache
# FIXME:
def self.aggregate_measure(measure_id, effective_date, filters=nil, test_id=nil)
query_hash = {'effective_date' => effective_date, 'measure_id' => measure_id,
'test_id' => test_id}
if filters
... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/application.rb | config/application.rb | require File.expand_path('../boot', __FILE__)
#require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
#require "active_resource/railtie"
require "rails/test_unit/railtie"
require "sprockets/railtie"
if defined?(Bundler)
# If you precompile assets before deploying to production, use ... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/environment.rb | config/environment.rb | # Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
PopHealth::Application.initialize!
require_relative '../lib/oid_helper'
require_relative '../lib/hds/record.rb'
require_relative '../lib/hds/provider.rb'
require_relative '../lib/hds/query_cache.rb'
re... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/routes.rb | config/routes.rb | PopHealth::Application.routes.draw do
apipie
devise_for :users, :controllers => {:registrations => "registrations"}
get "admin/users"
post "admin/promote"
post "admin/demote"
post "admin/approve"
post "admin/disable"
post "admin/update_npi"
get "admin/patients"
put "admin/upload_patients"
put "... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/boot.rb | config/boot.rb | require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/active_model_serializers.rb | config/initializers/active_model_serializers.rb | ActiveSupport.on_load(:active_model_serializers) do
# Disable for all serializers (except ArraySerializer)
ActiveModel::Serializer.root = false
# Disable for ArraySerializer
ActiveModel::ArraySerializer.root = false
end | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/apipie.rb | config/initializers/apipie.rb | Apipie.configure do |config|
config.app_name = "popHealth"
config.api_base_url = "/api"
config.doc_base_url = "/apipie"
config.default_version = "3.0"
config.api_controllers_matcher = ["#{Rails.root}/app/controllers/api/*.rb", "#{Rails.root}/app/controllers/api/adm... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/session_store.rb | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
PopHealth::Application.config.session_store :cookie_store, :key => '_popHealth_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/devise.rb | config/initializers/devise.rb | # Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use yo... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/handlebars_assets.rb | config/initializers/handlebars_assets.rb | HandlebarsAssets::Config.template_namespace = 'JST' | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/non_digest_assets.rb | config/initializers/non_digest_assets.rb | NonStupidDigestAssets.whitelist = [/glyphicons-halflings-regular.*/, /fontawesome-webfont.*/]
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/wrap_parameters.rb | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters ... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', ... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/mongo.rb | config/initializers/mongo.rb | MONGO_DB = Mongoid.default_session
# js_collection = MONGO_DB['system.js']
# unless js_collection.find_one('_id' => 'contains')
# js_collection.save('_id' => 'contains',
# 'value' => BSON::Code.new("function( obj, target ) { return obj.indexOf(target) != -1; };"))
# end
# # create a unique in... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/popHealth.rb | config/initializers/popHealth.rb | require 'hqmf-parser'
APP_CONFIG = YAML.load_file(Rails.root.join('config', 'popHealth.yml'))[Rails.env]
# insert languages
(
JSON.parse(File.read(File.join(Rails.root, 'test', 'fixtures', 'code_sets', 'languages.json'))).each do |document|
MONGO_DB['languages'].insert(document)
end
) if MONGO_DB['languages']... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/version_from_git.rb | config/initializers/version_from_git.rb | begin
#This pulls the commit hash first-6 and most recent tag from git
g = Git.open(".")
PopHealth::Application.config.commit = g.log.first.objectish.slice(0,6)
last_tag = g.tags.last
PopHealth::Application.config.tag = last_tag ? last_tag.name : "Unknown"
rescue ArgumentError => e
#Path does not exist
P... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a probl... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
| ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/secret_token.rb | config/initializers/secret_token.rb | # Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attac... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/warden_logging.rb | config/initializers/warden_logging.rb | Warden::Manager.after_authentication do |user,auth,opts|
Log.create(:username => user.username, :event => 'login')
end
Warden::Manager.before_failure do |env, opts|
request = Rack::Request.new(env)
attempted_login_name = request.params[:user].try(:[], :username)
attempted_login_name ||= 'unknown'
Log.create(... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/initializers/bson/object_id.rb | config/initializers/bson/object_id.rb | module BSON
class ObjectId
def as_json(options = {})
to_s
end
end
end | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/environments/test.rb | config/environments/test.rb | PopHealth::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the tes... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/environments/development.rb | config/environments/development.rb | PopHealth::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
pophealth/popHealth | https://github.com/pophealth/popHealth/blob/cdcbe7b7d7374cce48d03e456ac5daca1d315d43/config/environments/production.rb | config/environments/production.rb | PopHealth::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned ... | ruby | Apache-2.0 | cdcbe7b7d7374cce48d03e456ac5daca1d315d43 | 2026-01-04T17:51:51.385519Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/jobs/user_export_file_job.rb | app/jobs/user_export_file_job.rb | class UserExportFileJob < ApplicationJob
queue_as :enju_leaf
def perform(user_export_file)
user_export_file.export!
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/jobs/resource_import_file_job.rb | app/jobs/resource_import_file_job.rb | class ResourceImportFileJob < ApplicationJob
queue_as :enju_leaf
def perform(resource_import_file)
resource_import_file.import_start
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.