Sha256: c4e84d4c735a267d82ba37afdd9b627d0856ebbdf5787e39f64d5bc525359195

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

require 'mida_vocabulary/vocabulary'

module Mida
  module SchemaOrg

    autoload :MedicalEntity, 'mida_vocabulary/vocabularies/schemaorg/medicalentity'
    autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing'
    autoload :AdministrativeArea, 'mida_vocabulary/vocabularies/schemaorg/administrativearea'

    # A specific strength in which a medical drug is available in a specific country.
    class DrugStrength < Mida::Vocabulary
      itemtype %r{http://schema.org/DrugStrength}i
      include_vocabulary Mida::SchemaOrg::MedicalEntity
      include_vocabulary Mida::SchemaOrg::Thing

      # An active ingredient, typically chemical compounds and/or biologic substances.
      has_many 'activeIngredient'

      # The location in which the strength is available.
      has_many 'availableIn' do
        extract Mida::SchemaOrg::AdministrativeArea
        extract Mida::DataType::Text
      end

      # The units of an active ingredient's strength, e.g. mg.
      has_many 'strengthUnit'

      # The value of an active ingredient's strength, e.g. 325.
      has_many 'strengthValue' do
        extract Mida::DataType::Number
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mida_vocabulary-0.2.2 lib/mida_vocabulary/vocabularies/schemaorg/drugstrength.rb