Class: FHIR::DSTU2::MedicationStatement

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

Defined Under Namespace

Classes: Dosage

Constant Summary collapse

MULTIPLE_TYPES =
{
  'reasonForUse' => ['CodeableConcept', 'Reference'],
  'effective' => ['dateTime', 'Period'],
  'medication' => ['CodeableConcept', 'Reference']
}
SEARCH_PARAMS =
['code', 'effectivedate', 'identifier', 'medication', 'patient', 'source', 'status']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'MedicationStatement.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'MedicationStatement.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'MedicationStatement.implicitRules', 'min'=>0, 'max'=>1},
  'language' => {'type'=>'code', 'path'=>'MedicationStatement.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
  'text' => {'type'=>'Narrative', 'path'=>'MedicationStatement.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'MedicationStatement.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'MedicationStatement.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'MedicationStatement.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'identifier' => {'type'=>'Identifier', 'path'=>'MedicationStatement.identifier', 'min'=>0, 'max'=>Float::INFINITY},
  'patient' => {'type'=>'Reference', 'path'=>'MedicationStatement.patient', 'min'=>1, 'max'=>1},
  'informationSource' => {'type'=>'Reference', 'path'=>'MedicationStatement.informationSource', 'min'=>0, 'max'=>1},
  'dateAsserted' => {'type'=>'dateTime', 'path'=>'MedicationStatement.dateAsserted', 'min'=>0, 'max'=>1},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/medication-statement-status'=>['active', 'completed', 'entered-in-error', 'intended']}, 'type'=>'code', 'path'=>'MedicationStatement.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/medication-statement-status'}},
  'wasNotTaken' => {'type'=>'boolean', 'path'=>'MedicationStatement.wasNotTaken', 'min'=>0, 'max'=>1},
  'reasonNotTaken' => {'valid_codes'=>{'http://hl7.org/fhir/reason-medication-not-given'=>['a', 'b', 'c', 'd']}, 'type'=>'CodeableConcept', 'path'=>'MedicationStatement.reasonNotTaken', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes'}},
  'reasonForUseCodeableConcept' => {'valid_codes'=>{'http://snomed.info/sct'=>[]}, 'type'=>'CodeableConcept', 'path'=>'MedicationStatement.reasonForUse[x]', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/condition-code'}},
  'reasonForUseReference' => {'type'=>'Reference', 'path'=>'MedicationStatement.reasonForUse[x]', 'min'=>0, 'max'=>1},
  'effectiveDateTime' => {'type'=>'dateTime', 'path'=>'MedicationStatement.effective[x]', 'min'=>0, 'max'=>1},
  'effectivePeriod' => {'type'=>'Period', 'path'=>'MedicationStatement.effective[x]', 'min'=>0, 'max'=>1},
  'note' => {'type'=>'string', 'path'=>'MedicationStatement.note', 'min'=>0, 'max'=>1},
  'supportingInformation' => {'type'=>'Reference', 'path'=>'MedicationStatement.supportingInformation', 'min'=>0, 'max'=>Float::INFINITY},
  'medicationCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'MedicationStatement.medication[x]', 'min'=>1, 'max'=>1},
  'medicationReference' => {'type'=>'Reference', 'path'=>'MedicationStatement.medication[x]', 'min'=>1, 'max'=>1},
  'dosage' => {'type'=>'MedicationStatement::Dosage', 'path'=>'MedicationStatement.dosage', '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?, #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

#containedObject

0-* [ Resource ]



94
95
96
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 94

def contained
  @contained
end

#dateAssertedObject

0-1 dateTime



100
101
102
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 100

def dateAsserted
  @dateAsserted
end

#dosageObject

0-* [ MedicationStatement::Dosage ]



112
113
114
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 112

def dosage
  @dosage
end

#effectiveDateTimeObject

0-1 dateTime



106
107
108
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 106

def effectiveDateTime
  @effectiveDateTime
end

#effectivePeriodObject

0-1 Period



107
108
109
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 107

def effectivePeriod
  @effectivePeriod
end

#extensionObject

0-* [ Extension ]



95
96
97
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 95

def extension
  @extension
end

#idObject

0-1 id



89
90
91
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 89

def id
  @id
end

#identifierObject

0-* [ Identifier ]



97
98
99
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 97

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



91
92
93
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 91

def implicitRules
  @implicitRules
end

#informationSourceObject

0-1 Reference()



99
100
101
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 99

def informationSource
  @informationSource
end

#languageObject

0-1 code



92
93
94
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 92

def language
  @language
end

#medicationCodeableConceptObject

1-1 CodeableConcept



110
111
112
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 110

def medicationCodeableConcept
  @medicationCodeableConcept
end

#medicationReferenceObject

1-1 Reference()



111
112
113
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 111

def medicationReference
  @medicationReference
end

#metaObject

0-1 Meta



90
91
92
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 90

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



96
97
98
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 96

def modifierExtension
  @modifierExtension
end

#noteObject

0-1 string



108
109
110
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 108

def note
  @note
end

#patientObject

1-1 Reference()



98
99
100
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 98

def patient
  @patient
end

#reasonForUseCodeableConceptObject

0-1 CodeableConcept



104
105
106
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 104

def reasonForUseCodeableConcept
  @reasonForUseCodeableConcept
end

#reasonForUseReferenceObject

0-1 Reference()



105
106
107
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 105

def reasonForUseReference
  @reasonForUseReference
end

#reasonNotTakenObject

0-* [ CodeableConcept ]



103
104
105
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 103

def reasonNotTaken
  @reasonNotTaken
end

#statusObject

1-1 code



101
102
103
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 101

def status
  @status
end

#supportingInformationObject

0-* [ Reference() ]



109
110
111
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 109

def supportingInformation
  @supportingInformation
end

#textObject

0-1 Narrative



93
94
95
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 93

def text
  @text
end

#wasNotTakenObject

0-1 boolean



102
103
104
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 102

def wasNotTaken
  @wasNotTaken
end

Instance Method Details

#resourceTypeObject



114
115
116
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationStatement.rb', line 114

def resourceType
  'MedicationStatement'
end