Sha256: 38c5322dfad3241a3c1004ca6e9a5c0b1516633e6f1b8592044d7161db135f95

Contents?: true

Size: 1.33 KB

Versions: 17

Compression:

Stored size: 1.33 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)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
renalware-core-2.0.35 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.34 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.33 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.32 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.31 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.30 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.28 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.27 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.26 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.25 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.24 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.23 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.22 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.21 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.20 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.18 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.17 db/seeds/default/medications/medication_routes.rb