Class: FHIR::DSTU2::MedicationAdministration

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

Defined Under Namespace

Classes: Dosage

Constant Summary collapse

MULTIPLE_TYPES =
{
  'effectiveTime' => ['dateTime', 'Period'],
  'medication' => ['CodeableConcept', 'Reference']
}
SEARCH_PARAMS =
['code', 'device', 'effectivetime', 'encounter', 'identifier', 'medication', 'notgiven', 'patient', 'practitioner', 'prescription', 'status']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'MedicationAdministration.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'MedicationAdministration.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'MedicationAdministration.implicitRules', 'min'=>0, 'max'=>1},
  'language' => {'type'=>'code', 'path'=>'MedicationAdministration.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
  'text' => {'type'=>'Narrative', 'path'=>'MedicationAdministration.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'MedicationAdministration.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'MedicationAdministration.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'MedicationAdministration.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'identifier' => {'type'=>'Identifier', 'path'=>'MedicationAdministration.identifier', 'min'=>0, 'max'=>Float::INFINITY},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/medication-admin-status'=>['in-progress', 'on-hold', 'completed', 'entered-in-error', 'stopped']}, 'type'=>'code', 'path'=>'MedicationAdministration.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/medication-admin-status'}},
  'patient' => {'type'=>'Reference', 'path'=>'MedicationAdministration.patient', 'min'=>1, 'max'=>1},
  'practitioner' => {'type'=>'Reference', 'path'=>'MedicationAdministration.practitioner', 'min'=>0, 'max'=>1},
  'encounter' => {'type'=>'Reference', 'path'=>'MedicationAdministration.encounter', 'min'=>0, 'max'=>1},
  'prescription' => {'type'=>'Reference', 'path'=>'MedicationAdministration.prescription', 'min'=>0, 'max'=>1},
  'wasNotGiven' => {'type'=>'boolean', 'path'=>'MedicationAdministration.wasNotGiven', 'min'=>0, 'max'=>1},
  'reasonNotGiven' => {'valid_codes'=>{'http://hl7.org/fhir/reason-medication-not-given'=>['a', 'b', 'c', 'd']}, 'type'=>'CodeableConcept', 'path'=>'MedicationAdministration.reasonNotGiven', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes'}},
  'reasonGiven' => {'valid_codes'=>{'http://hl7.org/fhir/reason-medication-given'=>['a', 'b', 'c']}, 'type'=>'CodeableConcept', 'path'=>'MedicationAdministration.reasonGiven', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/reason-medication-given-codes'}},
  'effectiveTimeDateTime' => {'type'=>'dateTime', 'path'=>'MedicationAdministration.effectiveTime[x]', 'min'=>1, 'max'=>1},
  'effectiveTimePeriod' => {'type'=>'Period', 'path'=>'MedicationAdministration.effectiveTime[x]', 'min'=>1, 'max'=>1},
  'medicationCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'MedicationAdministration.medication[x]', 'min'=>1, 'max'=>1},
  'medicationReference' => {'type'=>'Reference', 'path'=>'MedicationAdministration.medication[x]', 'min'=>1, 'max'=>1},
  'device' => {'type'=>'Reference', 'path'=>'MedicationAdministration.device', 'min'=>0, 'max'=>Float::INFINITY},
  'note' => {'type'=>'string', 'path'=>'MedicationAdministration.note', 'min'=>0, 'max'=>1},
  'dosage' => {'type'=>'MedicationAdministration::Dosage', 'path'=>'MedicationAdministration.dosage', '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, #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 ]



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

def contained
  @contained
end

#deviceObject

0-* [ Reference() ]



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

def device
  @device
end

#dosageObject

0-1 MedicationAdministration::Dosage



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

def dosage
  @dosage
end

#effectiveTimeDateTimeObject

1-1 dateTime



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

def effectiveTimeDateTime
  @effectiveTimeDateTime
end

#effectiveTimePeriodObject

1-1 Period



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

def effectiveTimePeriod
  @effectiveTimePeriod
end

#encounterObject

0-1 Reference()



88
89
90
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationAdministration.rb', line 88

def encounter
  @encounter
end

#extensionObject

0-* [ Extension ]



82
83
84
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationAdministration.rb', line 82

def extension
  @extension
end

#idObject

0-1 id



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

def id
  @id
end

#identifierObject

0-* [ Identifier ]



84
85
86
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationAdministration.rb', line 84

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



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

def implicitRules
  @implicitRules
end

#languageObject

0-1 code



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

def language
  @language
end

#medicationCodeableConceptObject

1-1 CodeableConcept



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

def medicationCodeableConcept
  @medicationCodeableConcept
end

#medicationReferenceObject

1-1 Reference()



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

def medicationReference
  @medicationReference
end

#metaObject

0-1 Meta



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

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



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

def modifierExtension
  @modifierExtension
end

#noteObject

0-1 string



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

def note
  @note
end

#patientObject

1-1 Reference()



86
87
88
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationAdministration.rb', line 86

def patient
  @patient
end

#practitionerObject

0-1 Reference()



87
88
89
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationAdministration.rb', line 87

def practitioner
  @practitioner
end

#prescriptionObject

0-1 Reference()



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

def prescription
  @prescription
end

#reasonGivenObject

0-* [ CodeableConcept ]



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

def reasonGiven
  @reasonGiven
end

#reasonNotGivenObject

0-* [ CodeableConcept ]



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

def reasonNotGiven
  @reasonNotGiven
end

#statusObject

1-1 code



85
86
87
# File 'lib/fhir_dstu2_models/fhir/resources/MedicationAdministration.rb', line 85

def status
  @status
end

#textObject

0-1 Narrative



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

def text
  @text
end

#wasNotGivenObject

0-1 boolean



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

def wasNotGiven
  @wasNotGiven
end

Instance Method Details

#resourceTypeObject



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

def resourceType
  'MedicationAdministration'
end