Class: FHIR::DSTU2::Observation

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

Defined Under Namespace

Classes: Component, ReferenceRange, Related

Constant Summary collapse

MULTIPLE_TYPES =
{
  'effective' => ['dateTime', 'Period'],
  'value' => ['Quantity', 'CodeableConcept', 'string', 'Range', 'Ratio', 'SampledData', 'Attachment', 'time', 'dateTime', 'Period']
}
SEARCH_PARAMS =
['category', 'code', 'component-code', 'component-data-absent-reason', 'component-value-concept', 'component-value-quantity', 'component-value-string', 'data-absent-reason', 'date', 'device', 'encounter', 'identifier', 'patient', 'performer', 'related-target', 'related-type', 'specimen', 'status', 'subject', 'value-concept', 'value-date', 'value-quantity', 'value-string']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'Observation.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'Observation.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'Observation.implicitRules', 'min'=>0, 'max'=>1},
  'language' => {'type'=>'code', 'path'=>'Observation.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
  'text' => {'type'=>'Narrative', 'path'=>'Observation.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'Observation.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'Observation.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Observation.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'identifier' => {'type'=>'Identifier', 'path'=>'Observation.identifier', 'min'=>0, 'max'=>Float::INFINITY},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/observation-status'=>['registered', 'preliminary', 'final', 'amended', 'cancelled', 'entered-in-error', 'unknown']}, 'type'=>'code', 'path'=>'Observation.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/observation-status'}},
  'category' => {'valid_codes'=>{'http://hl7.org/fhir/observation-category'=>['social-history', 'vital-signs', 'imaging', 'laboratory', 'procedure', 'survey', 'exam', 'therapy']}, 'type'=>'CodeableConcept', 'path'=>'Observation.category', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/observation-category'}},
  'code' => {'valid_codes'=>{'http://loinc.org'=>[]}, 'type'=>'CodeableConcept', 'path'=>'Observation.code', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/observation-codes'}},
  'subject' => {'type'=>'Reference', 'path'=>'Observation.subject', 'min'=>0, 'max'=>1},
  'encounter' => {'type'=>'Reference', 'path'=>'Observation.encounter', 'min'=>0, 'max'=>1},
  'effectiveDateTime' => {'type'=>'dateTime', 'path'=>'Observation.effective[x]', 'min'=>0, 'max'=>1},
  'effectivePeriod' => {'type'=>'Period', 'path'=>'Observation.effective[x]', 'min'=>0, 'max'=>1},
  'issued' => {'type'=>'instant', 'path'=>'Observation.issued', 'min'=>0, 'max'=>1},
  'performer' => {'type'=>'Reference', 'path'=>'Observation.performer', 'min'=>0, 'max'=>Float::INFINITY},
  'valueQuantity' => {'type'=>'Quantity', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueString' => {'type'=>'string', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueRange' => {'type'=>'Range', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueRatio' => {'type'=>'Ratio', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueSampledData' => {'type'=>'SampledData', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueAttachment' => {'type'=>'Attachment', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueTime' => {'type'=>'time', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valueDateTime' => {'type'=>'dateTime', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'valuePeriod' => {'type'=>'Period', 'path'=>'Observation.value[x]', 'min'=>0, 'max'=>1},
  'dataAbsentReason' => {'valid_codes'=>{'http://hl7.org/fhir/data-absent-reason'=>['unknown', 'asked', 'temp', 'not-asked', 'masked', 'unsupported', 'astext', 'error', 'NaN']}, 'type'=>'CodeableConcept', 'path'=>'Observation.dataAbsentReason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/observation-valueabsentreason'}},
  'interpretation' => {'valid_codes'=>{'http://hl7.org/fhir/v2/0078'=>['<', '>', 'A', 'AA', 'AC', 'B', 'D', 'DET', 'H', 'HH', 'HM', 'HU', 'I', 'IE', 'IND', 'L', 'LL', 'LU', 'MS', 'N', 'ND', 'NEG', 'NR', 'NS', 'OBX', 'POS', 'QCF', 'R', 'RR', 'S', 'SDD', 'SYN-R', 'SYN-S', 'TOX', 'U', 'VS', 'W', 'WR', 'null']}, 'type'=>'CodeableConcept', 'path'=>'Observation.interpretation', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/observation-interpretation'}},
  'comments' => {'type'=>'string', 'path'=>'Observation.comments', 'min'=>0, 'max'=>1},
  'bodySite' => {'valid_codes'=>{'http://snomed.info/sct'=>[]}, 'type'=>'CodeableConcept', 'path'=>'Observation.bodySite', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/body-site'}},
  'method' => {'local_name'=>'local_method', 'valid_codes'=>{'http://hl7.org/fhir/v3/ObservationMethod'=>['_DecisionObservationMethod', 'ALGM', 'BYCL', 'GINT', '_GeneticObservationMethod', 'PCR', '_ObservationMethodAggregate', 'AVERAGE', 'COUNT', 'MAX', 'MEDIAN', 'MIN', 'MODE', 'STDEV.P', 'STDEV.S', 'SUM', 'VARIANCE.P', 'VARIANCE.S', '_VerificationMethod', 'VDOC', 'VREG', 'VTOKEN', 'VVOICE', '0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009', '0010', '0011', '0012', '0013', '0014', '0015', '0016', '0017', '0018', '0019', '0020', '0021', '0022', '0023', '0024', '0025', '0026', '0027', '0028', '0029', '0030', '0031', '0032', '0033', '0034', '0035', '0036', '0037', '0038', '0039', '0040', '0041', '0042', '0043', '0044', '0045', '0046', '0047', '0048', '0049', '0050', '0051', '0052', '0053', '0054', '0055', '0056', '0057', '0058', '0059', '0060', '0061', '0062', '0063', '0064', '0065', '0066', '0067', '0068', '0069', '0070', '0071', '0072', '0073', '0074', '0075', '0076', '0077', '0078', '0079', '0080', '0081', '0082', '0083', '0084', '0085', '0086', '0087', '0088', '0089', '0090', '0091', '0092', '0093', '0094', '0095', '0096', '0097', '0098', '0099', '0100', '0101', '0102', '0103', '0104', '0105', '0106', '0107', '0108', '0109', '0110', '0111', '0112', '0113', '0114', '0115', '0116', '0117', '0118', '0119', '0120', '0121', '0122', '0123', '0124', '0125', '0126', '0128', '0129', '0130', '0131', '0132', '0133', '0134', '0135', '0136', '0137', '0138', '0139', '0140', '0141', '0142', '0143', '0144', '0145', '0146', '0147', '0148', '0149', '0150', '0151', '0152', '0153', '0154', '0155', '0156', '0157', '0158', '0159', '0160', '0161', '0162', '0163', '0164', '0165', '0166', '0167', '0168', '0169', '0170', '0171', '0172', '0173', '0174', '0175', '0176', '0177', '0178', '0179', '0180', '0181', '0182', '0183', '0184', '0185', '0186', '0187', '0188', '0189', '0190', '0191', '0192', '0193', '0194', '0195', '0196', '0197', '0198', '0199', '0200', '0201', '0202', '0203', '0204', '0205', '0206', '0207', '0208', '0209', '0210', '0211', '0212', '0213', '0214', '0215', '0216', '0217', '0218', '0219', '0220', '0221', '0222', '0223', '0224', '0225', '0226', '0227', '0228', '0229', '0230', '0231', '0232', '0233', '0234', '0235', '0236', '0237', '0238', '0239', '0243', '0244', '0247', '0248', '0249', '0250', '0251', '0252', '0253', '0254', '0255', '0256', '0257', '0258', '0259', '0260', '0261', '0262', '0263', '0264', '0265', '0266', '0267', '0268', '0269', '0270', '0271', '0280', '0240', '0241', '0242', '0272', '0245', '0246', '0273', '0274', '0275', '0275a', '0276', '0277', '0278', '0279', '0127'], 'http://snomed.info/sct'=>[]}, 'type'=>'CodeableConcept', 'path'=>'Observation.method', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/observation-methods'}},
  'specimen' => {'type'=>'Reference', 'path'=>'Observation.specimen', 'min'=>0, 'max'=>1},
  'device' => {'type'=>'Reference', 'path'=>'Observation.device', 'min'=>0, 'max'=>1},
  'referenceRange' => {'type'=>'Observation::ReferenceRange', 'path'=>'Observation.referenceRange', 'min'=>0, 'max'=>Float::INFINITY},
  'related' => {'type'=>'Observation::Related', 'path'=>'Observation.related', 'min'=>0, 'max'=>Float::INFINITY},
  'component' => {'type'=>'Observation::Component', 'path'=>'Observation.component', '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

#bodySiteObject

0-1 CodeableConcept



176
177
178
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 176

def bodySite
  @bodySite
end

#categoryObject

0-1 CodeableConcept



155
156
157
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 155

def category
  @category
end

#codeObject

1-1 CodeableConcept



156
157
158
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 156

def code
  @code
end

#commentsObject

0-1 string



175
176
177
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 175

def comments
  @comments
end

#componentObject

0-* [ Observation::Component ]



182
183
184
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 182

def component
  @component
end

#containedObject

0-* [ Resource ]



150
151
152
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 150

def contained
  @contained
end

#dataAbsentReasonObject

0-1 CodeableConcept



173
174
175
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 173

def dataAbsentReason
  @dataAbsentReason
end

#deviceObject

0-1 Reference()



179
180
181
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 179

def device
  @device
end

#effectiveDateTimeObject

0-1 dateTime



159
160
161
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 159

def effectiveDateTime
  @effectiveDateTime
end

#effectivePeriodObject

0-1 Period



160
161
162
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 160

def effectivePeriod
  @effectivePeriod
end

#encounterObject

0-1 Reference()



158
159
160
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 158

def encounter
  @encounter
end

#extensionObject

0-* [ Extension ]



151
152
153
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 151

def extension
  @extension
end

#idObject

0-1 id



145
146
147
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 145

def id
  @id
end

#identifierObject

0-* [ Identifier ]



153
154
155
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 153

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



147
148
149
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 147

def implicitRules
  @implicitRules
end

#interpretationObject

0-1 CodeableConcept



174
175
176
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 174

def interpretation
  @interpretation
end

#issuedObject

0-1 instant



161
162
163
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 161

def issued
  @issued
end

#languageObject

0-1 code



148
149
150
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 148

def language
  @language
end

#local_methodObject

0-1 CodeableConcept



177
178
179
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 177

def local_method
  @local_method
end

#metaObject

0-1 Meta



146
147
148
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 146

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



152
153
154
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 152

def modifierExtension
  @modifierExtension
end

#performerObject

0-* [ Reference() ]



162
163
164
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 162

def performer
  @performer
end

#referenceRangeObject

0-* [ Observation::ReferenceRange ]



180
181
182
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 180

def referenceRange
  @referenceRange
end

0-* [ Observation::Related ]



181
182
183
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 181

def related
  @related
end

#specimenObject

0-1 Reference()



178
179
180
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 178

def specimen
  @specimen
end

#statusObject

1-1 code



154
155
156
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 154

def status
  @status
end

#subjectObject

0-1 Reference()



157
158
159
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 157

def subject
  @subject
end

#textObject

0-1 Narrative



149
150
151
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 149

def text
  @text
end

#valueAttachmentObject

0-1 Attachment



169
170
171
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 169

def valueAttachment
  @valueAttachment
end

#valueCodeableConceptObject

0-1 CodeableConcept



164
165
166
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 164

def valueCodeableConcept
  @valueCodeableConcept
end

#valueDateTimeObject

0-1 dateTime



171
172
173
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 171

def valueDateTime
  @valueDateTime
end

#valuePeriodObject

0-1 Period



172
173
174
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 172

def valuePeriod
  @valuePeriod
end

#valueQuantityObject

0-1 Quantity



163
164
165
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 163

def valueQuantity
  @valueQuantity
end

#valueRangeObject

0-1 Range



166
167
168
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 166

def valueRange
  @valueRange
end

#valueRatioObject

0-1 Ratio



167
168
169
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 167

def valueRatio
  @valueRatio
end

#valueSampledDataObject

0-1 SampledData



168
169
170
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 168

def valueSampledData
  @valueSampledData
end

#valueStringObject

0-1 string



165
166
167
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 165

def valueString
  @valueString
end

#valueTimeObject

0-1 time



170
171
172
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 170

def valueTime
  @valueTime
end

Instance Method Details

#resourceTypeObject



184
185
186
# File 'lib/fhir_dstu2_models/fhir/resources/Observation.rb', line 184

def resourceType
  'Observation'
end