Class: FHIR::TestReportSetupActionOperation

Inherits:
BackboneElement show all
Includes:
Mongoid::Document
Defined in:
app/models/fhir/test_report_setup_action_operation.rb

Overview

fhir/test_report_setup_action_operation.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.transform_json(json_hash, target = TestReportSetupActionOperation.new) ⇒ Object



34
35
36
37
38
39
40
41
42
# File 'app/models/fhir/test_report_setup_action_operation.rb', line 34

def self.transform_json(json_hash, target = TestReportSetupActionOperation.new)

  result = self.superclass.transform_json(json_hash, target)
  result['result'] = TestReportActionResult.transform_json(json_hash['result'], json_hash['_result']) unless json_hash['result'].nil?
  result['message'] = PrimitiveMarkdown.transform_json(json_hash['message'], json_hash['_message']) unless json_hash['message'].nil?
  result['detail'] = PrimitiveUri.transform_json(json_hash['detail'], json_hash['_detail']) unless json_hash['detail'].nil?

  result
end

Instance Method Details

#as_json(*args) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/models/fhir/test_report_setup_action_operation.rb', line 9

def as_json(*args)
  result = super      
  unless self.result.nil? 
    result['result'] = self.result.value
    serialized = Extension.serializePrimitiveExtension(self.result)            
    result['_result'] = serialized unless serialized.nil?
  end
  unless self.message.nil? 
    result['message'] = self.message.value
    serialized = Extension.serializePrimitiveExtension(self.message)            
    result['_message'] = serialized unless serialized.nil?
  end
  unless self.detail.nil? 
    result['detail'] = self.detail.value
    serialized = Extension.serializePrimitiveExtension(self.detail)            
    result['_detail'] = serialized unless serialized.nil?
  end
  result.delete('id')
  unless self.fhirId.nil?
    result['id'] = self.fhirId
    result.delete('fhirId')
  end  
  result
end