/**
  * @return array
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     if (null !== $this->boundsQuantity) {
         $json['boundsQuantity'] = $this->boundsQuantity->jsonSerialize();
     }
     if (null !== $this->boundsRange) {
         $json['boundsRange'] = $this->boundsRange->jsonSerialize();
     }
     if (null !== $this->boundsPeriod) {
         $json['boundsPeriod'] = $this->boundsPeriod->jsonSerialize();
     }
     if (null !== $this->count) {
         $json['count'] = $this->count->jsonSerialize();
     }
     if (null !== $this->duration) {
         $json['duration'] = $this->duration->jsonSerialize();
     }
     if (null !== $this->durationMax) {
         $json['durationMax'] = $this->durationMax->jsonSerialize();
     }
     if (null !== $this->durationUnits) {
         $json['durationUnits'] = $this->durationUnits->jsonSerialize();
     }
     if (null !== $this->frequency) {
         $json['frequency'] = $this->frequency->jsonSerialize();
     }
     if (null !== $this->frequencyMax) {
         $json['frequencyMax'] = $this->frequencyMax->jsonSerialize();
     }
     if (null !== $this->period) {
         $json['period'] = $this->period->jsonSerialize();
     }
     if (null !== $this->periodMax) {
         $json['periodMax'] = $this->periodMax->jsonSerialize();
     }
     if (null !== $this->periodUnits) {
         $json['periodUnits'] = $this->periodUnits->jsonSerialize();
     }
     if (null !== $this->when) {
         $json['when'] = $this->when->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->subject) {
         $json['subject'] = $this->subject->jsonSerialize();
     }
     if (null !== $this->startDate) {
         $json['startDate'] = $this->startDate->jsonSerialize();
     }
     if (null !== $this->startCodeableConcept) {
         $json['startCodeableConcept'] = $this->startCodeableConcept->jsonSerialize();
     }
     if (null !== $this->targetDate) {
         $json['targetDate'] = $this->targetDate->jsonSerialize();
     }
     if (null !== $this->targetQuantity) {
         $json['targetQuantity'] = $this->targetQuantity->jsonSerialize();
     }
     if (0 < count($this->category)) {
         $json['category'] = array();
         foreach ($this->category as $category) {
             $json['category'][] = $category->jsonSerialize();
         }
     }
     if (null !== $this->description) {
         $json['description'] = $this->description->jsonSerialize();
     }
     if (null !== $this->status) {
         $json['status'] = $this->status->jsonSerialize();
     }
     if (null !== $this->statusDate) {
         $json['statusDate'] = $this->statusDate->jsonSerialize();
     }
     if (null !== $this->statusReason) {
         $json['statusReason'] = $this->statusReason->jsonSerialize();
     }
     if (null !== $this->author) {
         $json['author'] = $this->author->jsonSerialize();
     }
     if (null !== $this->priority) {
         $json['priority'] = $this->priority->jsonSerialize();
     }
     if (0 < count($this->addresses)) {
         $json['addresses'] = array();
         foreach ($this->addresses as $addresses) {
             $json['addresses'][] = $addresses->jsonSerialize();
         }
     }
     if (0 < count($this->note)) {
         $json['note'] = array();
         foreach ($this->note as $note) {
             $json['note'][] = $note->jsonSerialize();
         }
     }
     if (0 < count($this->outcome)) {
         $json['outcome'] = array();
         foreach ($this->outcome as $outcome) {
             $json['outcome'][] = $outcome->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;
 }
 /**
  * @return array
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     if (null !== $this->medicationCodeableConcept) {
         $json['medicationCodeableConcept'] = $this->medicationCodeableConcept->jsonSerialize();
     }
     if (null !== $this->medicationReference) {
         $json['medicationReference'] = $this->medicationReference->jsonSerialize();
     }
     if (null !== $this->validityPeriod) {
         $json['validityPeriod'] = $this->validityPeriod->jsonSerialize();
     }
     if (null !== $this->numberOfRepeatsAllowed) {
         $json['numberOfRepeatsAllowed'] = $this->numberOfRepeatsAllowed->jsonSerialize();
     }
     if (null !== $this->quantity) {
         $json['quantity'] = $this->quantity->jsonSerialize();
     }
     if (null !== $this->expectedSupplyDuration) {
         $json['expectedSupplyDuration'] = $this->expectedSupplyDuration->jsonSerialize();
     }
     return $json;
 }