Sha256: bd9b26912e8078bc77b1a298c062ead63533a2c6020280852899d4ede1c45eb3

Contents?: true

Size: 1.41 KB

Versions: 125

Compression:

Stored size: 1.41 KB

Contents

# frozen_string_literal: true

module Renalware
  log "Adding Medication Routes" do
    module RR
      ORAL = 1
      TOPICAL = 2
      INHALATION = 3
      INJECTION = 4
      INTRAPERITONEAL = 5
      OTHER = 9
    end

    MRoute = Medications::MedicationRoute
    MRoute.transaction do
      MRoute.find_or_create_by!(code: "PO", name: "Per Oral", rr_code: RR::ORAL)
      MRoute.find_or_create_by!(code: "IV", name: "Intravenous", rr_code: RR::INJECTION)
      MRoute.find_or_create_by!(code: "SC", name: "Subcutaneous", rr_code: RR::INJECTION)
      MRoute.find_or_create_by!(code: "IM", name: "Intramuscular", rr_code: RR::INJECTION)
      MRoute.find_or_create_by!(code: "IP", name: "Intraperitoneal", rr_code: RR::INTRAPERITONEAL)
      MRoute.find_or_create_by!(code: "INH", name: "Inhaler", rr_code: RR::INHALATION)
      MRoute.find_or_create_by!(code: "SL", name: "Sublingual", rr_code: RR::OTHER)
      MRoute.find_or_create_by!(code: "NG", name: "Nasogastric", rr_code: RR::OTHER)
      MRoute.find_or_create_by!(code: "PARENT", name: "Parenteral", rr_code: RR::INJECTION)
      MRoute.find_or_create_by!(code: "PERCUT", name: "Percutaneous", rr_code: RR::OTHER)
      MRoute.find_or_create_by!(code: "TOP", name: "Topical", rr_code: RR::TOPICAL)
      MRoute.find_or_create_by!(code: "OTHER", name: "Other", rr_code: RR::OTHER)
      MRoute.find_or_create_by!(code: "PR", name: "PerRectum", rr_code: RR::OTHER)
    end
  end
end

Version data entries

125 entries across 125 versions & 1 rubygems

Version Path
renalware-core-2.1.1 db/seeds/default/medications/medication_routes.rb
renalware-core-2.1.0 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.167 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.166 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.165 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.164 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.163 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.162 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.161 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.160 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.159 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.158 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.157 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.156 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.155 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.153 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.152 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.151 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.149 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.148 db/seeds/default/medications/medication_routes.rb