Class: FHIR::DSTU2::Substance

Inherits:
Model
  • Object
show all
Includes:
Hashable, Json, Xml
Defined in:
lib/fhir_dstu2_models/fhir/resources/Substance.rb

Defined Under Namespace

Classes: Ingredient, Instance

Constant Summary collapse

SEARCH_PARAMS =
['category', 'code', 'container-identifier', 'expiry', 'identifier', 'quantity', 'substance']
METADATA =
{
  'id' => { 'type' => 'id', 'path' => 'Substance.id', 'min' => 0, 'max' => 1 },
  'meta' => { 'type' => 'Meta', 'path' => 'Substance.meta', 'min' => 0, 'max' => 1 },
  'implicitRules' => { 'type' => 'uri', 'path' => 'Substance.implicitRules', 'min' => 0, 'max' => 1 },
  'language' => { 'type' => 'code', 'path' => 'Substance.language', 'min' => 0, 'max' => 1, 'binding' => { 'strength' => 'required', 'uri' => 'http://tools.ietf.org/html/bcp47' } },
  'text' => { 'type' => 'Narrative', 'path' => 'Substance.text', 'min' => 0, 'max' => 1 },
  'contained' => { 'type' => 'Resource', 'path' => 'Substance.contained', 'min' => 0, 'max' => Float::INFINITY },
  'extension' => { 'type' => 'Extension', 'path' => 'Substance.extension', 'min' => 0, 'max' => Float::INFINITY },
  'modifierExtension' => { 'type' => 'Extension', 'path' => 'Substance.modifierExtension', 'min' => 0, 'max' => Float::INFINITY },
  'identifier' => { 'type' => 'Identifier', 'path' => 'Substance.identifier', 'min' => 0, 'max' => Float::INFINITY },
  'category' => { 'valid_codes' => { 'http://hl7.org/fhir/substance-category' => ['allergen', 'biological', 'body', 'chemical', 'food', 'drug', 'material'] }, 'type' => 'CodeableConcept', 'path' => 'Substance.category', 'min' => 0, 'max' => Float::INFINITY, 'binding' => { 'strength' => 'extensible', 'uri' => 'http://hl7.org/fhir/ValueSet/substance-category' } },
  'code' => { 'valid_codes' => { 'http://snomed.info/sct' => [] }, 'type' => 'CodeableConcept', 'path' => 'Substance.code', 'min' => 1, 'max' => 1, 'binding' => { 'strength' => 'example', 'uri' => 'http://hl7.org/fhir/ValueSet/substance-code' } },
  'description' => { 'type' => 'string', 'path' => 'Substance.description', 'min' => 0, 'max' => 1 },
  'instance' => { 'type' => 'Substance::Instance', 'path' => 'Substance.instance', 'min' => 0, 'max' => Float::INFINITY },
  'ingredient' => { 'type' => 'Substance::Ingredient', 'path' => 'Substance.ingredient', 'min' => 0, 'max' => Float::INFINITY }
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Xml

from_xml, #to_xml, valid?, validate

Methods included from Deprecate

#deprecate

Methods included from Json

from_json, #to_json

Methods included from Hashable

#from_hash, #to_hash

Methods inherited from Model

#==, #attribute_mismatch, #compare_attribute, #each_element, #equals?, #hash, #initialize, #method_missing, #mismatch, #primitive?, #respond_to_missing?, #to_reference, #valid?, #validate, #validate_profile

Constructor Details

This class inherits a constructor from FHIR::DSTU2::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FHIR::DSTU2::Model

Instance Attribute Details

#categoryObject

0-* [ CodeableConcept ]



77
78
79
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 77

def category
  @category
end

#codeObject

1-1 CodeableConcept



78
79
80
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 78

def code
  @code
end

#containedObject

0-* [ Resource ]



73
74
75
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 73

def contained
  @contained
end

#descriptionObject

0-1 string



79
80
81
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 79

def description
  @description
end

#extensionObject

0-* [ Extension ]



74
75
76
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 74

def extension
  @extension
end

#idObject

0-1 id



68
69
70
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 68

def id
  @id
end

#identifierObject

0-* [ Identifier ]



76
77
78
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 76

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



70
71
72
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 70

def implicitRules
  @implicitRules
end

#ingredientObject

0-* [ Substance::Ingredient ]



81
82
83
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 81

def ingredient
  @ingredient
end

#instanceObject

0-* [ Substance::Instance ]



80
81
82
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 80

def instance
  @instance
end

#languageObject

0-1 code



71
72
73
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 71

def language
  @language
end

#metaObject

0-1 Meta



69
70
71
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 69

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



75
76
77
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 75

def modifierExtension
  @modifierExtension
end

#textObject

0-1 Narrative



72
73
74
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 72

def text
  @text
end

Instance Method Details

#resourceTypeObject



83
84
85
# File 'lib/fhir_dstu2_models/fhir/resources/Substance.rb', line 83

def resourceType
  'Substance'
end