Class: FHIR::CoverageEligibilityResponseError

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

Overview

fhir/coverage_eligibility_response_error.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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



20
21
22
23
24
25
26
# File 'app/models/fhir/coverage_eligibility_response_error.rb', line 20

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

  result = self.superclass.transform_json(json_hash, target)
  result['code'] = CodeableConcept.transform_json(json_hash['code']) unless json_hash['code'].nil?

  result
end

Instance Method Details

#as_json(*args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/models/fhir/coverage_eligibility_response_error.rb', line 7

def as_json(*args)
  result = super      
  unless self.code.nil? 
    result['code'] = self.code.as_json(*args)
  end
  result.delete('id')
  unless self.fhirId.nil?
    result['id'] = self.fhirId
    result.delete('fhirId')
  end  
  result
end