Class: FHIR::ConceptMapGroupUnmapped
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::ConceptMapGroupUnmapped
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/concept_map_group_unmapped.rb
Overview
fhir/concept_map_group_unmapped.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = ConceptMapGroupUnmapped.new) ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'app/models/fhir/concept_map_group_unmapped.rb', line 40 def self.transform_json(json_hash, target = ConceptMapGroupUnmapped.new) result = self.superclass.transform_json(json_hash, target) result['mode'] = ConceptMapGroupUnmappedMode.transform_json(json_hash['mode'], json_hash['_mode']) unless json_hash['mode'].nil? result['code'] = PrimitiveCode.transform_json(json_hash['code'], json_hash['_code']) unless json_hash['code'].nil? result['display'] = PrimitiveString.transform_json(json_hash['display'], json_hash['_display']) unless json_hash['display'].nil? result['url'] = PrimitiveCanonical.transform_json(json_hash['url'], json_hash['_url']) unless json_hash['url'].nil? result end |
Instance Method Details
#as_json(*args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/models/fhir/concept_map_group_unmapped.rb', line 10 def as_json(*args) result = super unless self.mode.nil? result['mode'] = self.mode.value serialized = Extension.serializePrimitiveExtension(self.mode) result['_mode'] = serialized unless serialized.nil? end unless self.code.nil? result['code'] = self.code.value serialized = Extension.serializePrimitiveExtension(self.code) result['_code'] = serialized unless serialized.nil? end unless self.display.nil? result['display'] = self.display.value serialized = Extension.serializePrimitiveExtension(self.display) result['_display'] = serialized unless serialized.nil? end unless self.url.nil? result['url'] = self.url.value serialized = Extension.serializePrimitiveExtension(self.url) result['_url'] = serialized unless serialized.nil? end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |