Class: FHIR::DSTU2::Medication

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

Defined Under Namespace

Classes: Package, Product

Constant Summary collapse

SEARCH_PARAMS =
['code', 'destination', 'dispenser', 'identifier', 'medication', 'patient', 'prescription', 'receiver', 'responsibleparty', 'status', 'type', 'whenhandedover', 'whenprepared', 'code', 'effectivedate', 'identifier', 'medication', 'patient', 'source', 'status', 'code', 'container', 'content', 'form', 'ingredient', 'manufacturer', 'code', 'device', 'effectivetime', 'encounter', 'identifier', 'medication', 'notgiven', 'patient', 'practitioner', 'prescription', 'status', 'code', 'datewritten', 'encounter', 'identifier', 'medication', 'patient', 'prescriber', 'status']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'Medication.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'Medication.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'Medication.implicitRules', 'min'=>0, 'max'=>1},
  'language' => {'type'=>'code', 'path'=>'Medication.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
  'text' => {'type'=>'Narrative', 'path'=>'Medication.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'Medication.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'Medication.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Medication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'code' => {'valid_codes'=>{'http://snomed.info/sct'=>[]}, 'type'=>'CodeableConcept', 'path'=>'Medication.code', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/medication-codes'}},
  'isBrand' => {'type'=>'boolean', 'path'=>'Medication.isBrand', 'min'=>0, 'max'=>1},
  'manufacturer' => {'type'=>'Reference', 'path'=>'Medication.manufacturer', 'min'=>0, 'max'=>1},
  'product' => {'type'=>'Medication::Product', 'path'=>'Medication.product', 'min'=>0, 'max'=>1},
  'package' => {'type'=>'Medication::Package', 'path'=>'Medication.package', 'min'=>0, 'max'=>1}
}

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, #equals?, #hash, #initialize, #method_missing, #mismatch, #primitive?, #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

#codeObject

0-1 CodeableConcept



135
136
137
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 135

def code
  @code
end

#containedObject

0-* [ Resource ]



132
133
134
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 132

def contained
  @contained
end

#extensionObject

0-* [ Extension ]



133
134
135
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 133

def extension
  @extension
end

#idObject

0-1 id



127
128
129
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 127

def id
  @id
end

#implicitRulesObject

0-1 uri



129
130
131
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 129

def implicitRules
  @implicitRules
end

#isBrandObject

0-1 boolean



136
137
138
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 136

def isBrand
  @isBrand
end

#languageObject

0-1 code



130
131
132
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 130

def language
  @language
end

#manufacturerObject

0-1 Reference()



137
138
139
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 137

def manufacturer
  @manufacturer
end

#metaObject

0-1 Meta



128
129
130
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 128

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



134
135
136
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 134

def modifierExtension
  @modifierExtension
end

#packageObject

0-1 Medication::Package



139
140
141
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 139

def package
  @package
end

#productObject

0-1 Medication::Product



138
139
140
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 138

def product
  @product
end

#textObject

0-1 Narrative



131
132
133
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 131

def text
  @text
end

Instance Method Details

#resourceTypeObject



141
142
143
# File 'lib/fhir_dstu2_models/fhir/resources/Medication.rb', line 141

def resourceType
  'Medication'
end