Class: FHIR::PlanDefinitionActionRelatedAction
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::PlanDefinitionActionRelatedAction
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/plan_definition_action_related_action.rb
Overview
fhir/plan_definition_action_related_action.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = PlanDefinitionActionRelatedAction.new) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'app/models/fhir/plan_definition_action_related_action.rb', line 36 def self.transform_json(json_hash, target = PlanDefinitionActionRelatedAction.new) result = self.superclass.transform_json(json_hash, target) result['actionId'] = PrimitiveId.transform_json(json_hash['actionId'], json_hash['_actionId']) unless json_hash['actionId'].nil? result['relationship'] = ActionRelationshipType.transform_json(json_hash['relationship'], json_hash['_relationship']) unless json_hash['relationship'].nil? result['offsetDuration'] = Duration.transform_json(json_hash['offsetDuration']) unless json_hash['offsetDuration'].nil? result['offsetRange'] = Range.transform_json(json_hash['offsetRange']) unless json_hash['offsetRange'].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 |
# File 'app/models/fhir/plan_definition_action_related_action.rb', line 10 def as_json(*args) result = super unless self.actionId.nil? result['actionId'] = self.actionId.value serialized = Extension.serializePrimitiveExtension(self.actionId) result['_actionId'] = serialized unless serialized.nil? end unless self.relationship.nil? result['relationship'] = self.relationship.value serialized = Extension.serializePrimitiveExtension(self.relationship) result['_relationship'] = serialized unless serialized.nil? end unless self.offsetDuration.nil? result['offsetDuration'] = self.offsetDuration.as_json(*args) end unless self.offsetRange.nil? result['offsetRange'] = self.offsetRange.as_json(*args) end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |