/** * @return array */ public function jsonSerialize() { $json = parent::jsonSerialize(); $json['resourceType'] = $this->_fhirElementName; if (null !== $this->text) { $json['text'] = $this->text->jsonSerialize(); } if (0 < count($this->contained)) { $json['contained'] = array(); foreach ($this->contained as $contained) { $json['contained'][] = $contained->jsonSerialize(); } } if (0 < count($this->extension)) { $json['extension'] = array(); foreach ($this->extension as $extension) { $json['extension'][] = $extension->jsonSerialize(); } } if (0 < count($this->modifierExtension)) { $json['modifierExtension'] = array(); foreach ($this->modifierExtension as $modifierExtension) { $json['modifierExtension'][] = $modifierExtension->jsonSerialize(); } } return $json; }
/** * @return array */ public function jsonSerialize() { $json = parent::jsonSerialize(); if (null !== $this->title) { $json['title'] = $this->title->jsonSerialize(); } if (null !== $this->code) { $json['code'] = $this->code->jsonSerialize(); } if (null !== $this->text) { $json['text'] = $this->text->jsonSerialize(); } if (null !== $this->mode) { $json['mode'] = $this->mode->jsonSerialize(); } if (null !== $this->orderedBy) { $json['orderedBy'] = $this->orderedBy->jsonSerialize(); } if (0 < count($this->entry)) { $json['entry'] = array(); foreach ($this->entry as $entry) { $json['entry'][] = $entry->jsonSerialize(); } } if (null !== $this->emptyReason) { $json['emptyReason'] = $this->emptyReason->jsonSerialize(); } if (0 < count($this->section)) { $json['section'] = array(); foreach ($this->section as $section) { $json['section'][] = $section->jsonSerialize(); } } return $json; }