Class: FHIR::CoverageEligibilityResponseInsuranceItem
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::CoverageEligibilityResponseInsuranceItem
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/coverage_eligibility_response_insurance_item.rb
Overview
fhir/coverage_eligibility_response_insurance_item.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = CoverageEligibilityResponseInsuranceItem.new) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'app/models/fhir/coverage_eligibility_response_insurance_item.rb', line 82 def self.transform_json(json_hash, target = CoverageEligibilityResponseInsuranceItem.new) result = self.superclass.transform_json(json_hash, target) result['category'] = CodeableConcept.transform_json(json_hash['category']) unless json_hash['category'].nil? result['productOrService'] = CodeableConcept.transform_json(json_hash['productOrService']) unless json_hash['productOrService'].nil? result['modifier'] = json_hash['modifier'].map { |var| CodeableConcept.transform_json(var) } unless json_hash['modifier'].nil? result['provider'] = Reference.transform_json(json_hash['provider']) unless json_hash['provider'].nil? result['excluded'] = PrimitiveBoolean.transform_json(json_hash['excluded'], json_hash['_excluded']) unless json_hash['excluded'].nil? result['name'] = PrimitiveString.transform_json(json_hash['name'], json_hash['_name']) unless json_hash['name'].nil? result['description'] = PrimitiveString.transform_json(json_hash['description'], json_hash['_description']) unless json_hash['description'].nil? result['network'] = CodeableConcept.transform_json(json_hash['network']) unless json_hash['network'].nil? result['unit'] = CodeableConcept.transform_json(json_hash['unit']) unless json_hash['unit'].nil? result['term'] = CodeableConcept.transform_json(json_hash['term']) unless json_hash['term'].nil? result['benefit'] = json_hash['benefit'].map { |var| CoverageEligibilityResponseInsuranceItemBenefit.transform_json(var) } unless json_hash['benefit'].nil? result['authorizationRequired'] = PrimitiveBoolean.transform_json(json_hash['authorizationRequired'], json_hash['_authorizationRequired']) unless json_hash['authorizationRequired'].nil? result['authorizationSupporting'] = json_hash['authorizationSupporting'].map { |var| CodeableConcept.transform_json(var) } unless json_hash['authorizationSupporting'].nil? result['authorizationUrl'] = PrimitiveUri.transform_json(json_hash['authorizationUrl'], json_hash['_authorizationUrl']) unless json_hash['authorizationUrl'].nil? result end |
Instance Method Details
#as_json(*args) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'app/models/fhir/coverage_eligibility_response_insurance_item.rb', line 20 def as_json(*args) result = super unless self.category.nil? result['category'] = self.category.as_json(*args) end unless self.productOrService.nil? result['productOrService'] = self.productOrService.as_json(*args) end unless self.modifier.nil? || !self.modifier.any? result['modifier'] = self.modifier.map{ |x| x.as_json(*args) } end unless self.provider.nil? result['provider'] = self.provider.as_json(*args) end unless self.excluded.nil? result['excluded'] = self.excluded.value serialized = Extension.serializePrimitiveExtension(self.excluded) result['_excluded'] = serialized unless serialized.nil? end unless self.name.nil? result['name'] = self.name.value serialized = Extension.serializePrimitiveExtension(self.name) result['_name'] = serialized unless serialized.nil? end unless self.description.nil? result['description'] = self.description.value serialized = Extension.serializePrimitiveExtension(self.description) result['_description'] = serialized unless serialized.nil? end unless self.network.nil? result['network'] = self.network.as_json(*args) end unless self.unit.nil? result['unit'] = self.unit.as_json(*args) end unless self.term.nil? result['term'] = self.term.as_json(*args) end unless self.benefit.nil? || !self.benefit.any? result['benefit'] = self.benefit.map{ |x| x.as_json(*args) } end unless self..nil? result['authorizationRequired'] = self..value serialized = Extension.serializePrimitiveExtension(self.) result['_authorizationRequired'] = serialized unless serialized.nil? end unless self..nil? || !self..any? result['authorizationSupporting'] = self..map{ |x| x.as_json(*args) } end unless self..nil? result['authorizationUrl'] = self..value serialized = Extension.serializePrimitiveExtension(self.) result['_authorizationUrl'] = serialized unless serialized.nil? end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |