Class: FHIR::MedicinalProductManufacturingBusinessOperation
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::MedicinalProductManufacturingBusinessOperation
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/medicinal_product_manufacturing_business_operation.rb
Overview
fhir/medicinal_product_manufacturing_business_operation.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = MedicinalProductManufacturingBusinessOperation.new) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'app/models/fhir/medicinal_product_manufacturing_business_operation.rb', line 42 def self.transform_json(json_hash, target = MedicinalProductManufacturingBusinessOperation.new) result = self.superclass.transform_json(json_hash, target) result['operationType'] = CodeableConcept.transform_json(json_hash['operationType']) unless json_hash['operationType'].nil? result['authorisationReferenceNumber'] = Identifier.transform_json(json_hash['authorisationReferenceNumber']) unless json_hash['authorisationReferenceNumber'].nil? result['effectiveDate'] = PrimitiveDateTime.transform_json(json_hash['effectiveDate'], json_hash['_effectiveDate']) unless json_hash['effectiveDate'].nil? result['confidentialityIndicator'] = CodeableConcept.transform_json(json_hash['confidentialityIndicator']) unless json_hash['confidentialityIndicator'].nil? result['manufacturer'] = json_hash['manufacturer'].map { |var| Reference.transform_json(var) } unless json_hash['manufacturer'].nil? result['regulator'] = Reference.transform_json(json_hash['regulator']) unless json_hash['regulator'].nil? result end |
Instance Method Details
#as_json(*args) ⇒ Object
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 39 40 |
# File 'app/models/fhir/medicinal_product_manufacturing_business_operation.rb', line 12 def as_json(*args) result = super unless self.operationType.nil? result['operationType'] = self.operationType.as_json(*args) end unless self..nil? result['authorisationReferenceNumber'] = self..as_json(*args) end unless self.effectiveDate.nil? result['effectiveDate'] = self.effectiveDate.value serialized = Extension.serializePrimitiveExtension(self.effectiveDate) result['_effectiveDate'] = serialized unless serialized.nil? end unless self.confidentialityIndicator.nil? result['confidentialityIndicator'] = self.confidentialityIndicator.as_json(*args) end unless self.manufacturer.nil? || !self.manufacturer.any? result['manufacturer'] = self.manufacturer.map{ |x| x.as_json(*args) } end unless self.regulator.nil? result['regulator'] = self.regulator.as_json(*args) end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |