/** * @return array */ public function jsonSerialize() { $json = parent::jsonSerialize(); if (null !== $this->status) { $json['status'] = $this->status->jsonSerialize(); } if (null !== $this->period) { $json['period'] = $this->period->jsonSerialize(); } return $json; }
/** * @return array */ public function jsonSerialize() { $json = parent::jsonSerialize(); $json['resourceType'] = $this->_fhirElementName; if (0 < count($this->identifier)) { $json['identifier'] = array(); foreach ($this->identifier as $identifier) { $json['identifier'][] = $identifier->jsonSerialize(); } } if (null !== $this->status) { $json['status'] = $this->status->jsonSerialize(); } if (0 < count($this->statusHistory)) { $json['statusHistory'] = array(); foreach ($this->statusHistory as $statusHistory) { $json['statusHistory'][] = $statusHistory->jsonSerialize(); } } if (null !== $this->class) { $json['class'] = $this->class->jsonSerialize(); } if (0 < count($this->type)) { $json['type'] = array(); foreach ($this->type as $type) { $json['type'][] = $type->jsonSerialize(); } } if (null !== $this->priority) { $json['priority'] = $this->priority->jsonSerialize(); } if (null !== $this->patient) { $json['patient'] = $this->patient->jsonSerialize(); } if (0 < count($this->episodeOfCare)) { $json['episodeOfCare'] = array(); foreach ($this->episodeOfCare as $episodeOfCare) { $json['episodeOfCare'][] = $episodeOfCare->jsonSerialize(); } } if (0 < count($this->incomingReferral)) { $json['incomingReferral'] = array(); foreach ($this->incomingReferral as $incomingReferral) { $json['incomingReferral'][] = $incomingReferral->jsonSerialize(); } } if (0 < count($this->participant)) { $json['participant'] = array(); foreach ($this->participant as $participant) { $json['participant'][] = $participant->jsonSerialize(); } } if (null !== $this->appointment) { $json['appointment'] = $this->appointment->jsonSerialize(); } if (null !== $this->period) { $json['period'] = $this->period->jsonSerialize(); } if (null !== $this->length) { $json['length'] = $this->length->jsonSerialize(); } if (0 < count($this->reason)) { $json['reason'] = array(); foreach ($this->reason as $reason) { $json['reason'][] = $reason->jsonSerialize(); } } if (0 < count($this->indication)) { $json['indication'] = array(); foreach ($this->indication as $indication) { $json['indication'][] = $indication->jsonSerialize(); } } if (null !== $this->hospitalization) { $json['hospitalization'] = $this->hospitalization->jsonSerialize(); } if (0 < count($this->location)) { $json['location'] = array(); foreach ($this->location as $location) { $json['location'][] = $location->jsonSerialize(); } } if (null !== $this->serviceProvider) { $json['serviceProvider'] = $this->serviceProvider->jsonSerialize(); } if (null !== $this->partOf) { $json['partOf'] = $this->partOf->jsonSerialize(); } return $json; }