Sha256: 0f84ac25b97e3ebc40b750dd9ec6db4dce62b9368c407c4fe3d54e473a88701a

Contents?: true

Size: 1.3 KB

Versions: 30

Compression:

Stored size: 1.3 KB

Contents

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

30 entries across 30 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc7 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.rc6 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.rc5 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.rc4 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.rc3 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.rc1 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.beta12 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.beta11 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.beta10 db/seeds/default/medications/medication_routes.rb
renalware-core-2.0.0.pre.beta9 db/seeds/default/medications/medication_routes.rb