Class: FHIR::CatalogEntryRelatedEntry
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::CatalogEntryRelatedEntry
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/catalog_entry_related_entry.rb
Overview
fhir/catalog_entry_related_entry.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = CatalogEntryRelatedEntry.new) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'app/models/fhir/catalog_entry_related_entry.rb', line 26 def self.transform_json(json_hash, target = .new) result = self.superclass.transform_json(json_hash, target) result['relationtype'] = CatalogEntryRelationType.transform_json(json_hash['relationtype'], json_hash['_relationtype']) unless json_hash['relationtype'].nil? result['item'] = Reference.transform_json(json_hash['item']) unless json_hash['item'].nil? result end |
Instance Method Details
#as_json(*args) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/models/fhir/catalog_entry_related_entry.rb', line 8 def as_json(*args) result = super unless self.relationtype.nil? result['relationtype'] = self.relationtype.value serialized = Extension.serializePrimitiveExtension(self.relationtype) result['_relationtype'] = serialized unless serialized.nil? end unless self.item.nil? result['item'] = self.item.as_json(*args) end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |