/**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<MedicationOrderDispenseRequest xmlns="http://hl7.org/fhir"></MedicationOrderDispenseRequest>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->medicationCodeableConcept) {
         $this->medicationCodeableConcept->xmlSerialize(true, $sxe->addChild('medicationCodeableConcept'));
     }
     if (null !== $this->medicationReference) {
         $this->medicationReference->xmlSerialize(true, $sxe->addChild('medicationReference'));
     }
     if (null !== $this->validityPeriod) {
         $this->validityPeriod->xmlSerialize(true, $sxe->addChild('validityPeriod'));
     }
     if (null !== $this->numberOfRepeatsAllowed) {
         $this->numberOfRepeatsAllowed->xmlSerialize(true, $sxe->addChild('numberOfRepeatsAllowed'));
     }
     if (null !== $this->quantity) {
         $this->quantity->xmlSerialize(true, $sxe->addChild('quantity'));
     }
     if (null !== $this->expectedSupplyDuration) {
         $this->expectedSupplyDuration->xmlSerialize(true, $sxe->addChild('expectedSupplyDuration'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<PractitionerQualification xmlns="http://hl7.org/fhir"></PractitionerQualification>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->issuer) {
         $this->issuer->xmlSerialize(true, $sxe->addChild('issuer'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<ContractTerm xmlns="http://hl7.org/fhir"></ContractTerm>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->identifier) {
         $this->identifier->xmlSerialize(true, $sxe->addChild('identifier'));
     }
     if (null !== $this->issued) {
         $this->issued->xmlSerialize(true, $sxe->addChild('issued'));
     }
     if (null !== $this->applies) {
         $this->applies->xmlSerialize(true, $sxe->addChild('applies'));
     }
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->subType) {
         $this->subType->xmlSerialize(true, $sxe->addChild('subType'));
     }
     if (null !== $this->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (0 < count($this->action)) {
         foreach ($this->action as $action) {
             $action->xmlSerialize(true, $sxe->addChild('action'));
         }
     }
     if (0 < count($this->actionReason)) {
         foreach ($this->actionReason as $actionReason) {
             $actionReason->xmlSerialize(true, $sxe->addChild('actionReason'));
         }
     }
     if (0 < count($this->actor)) {
         foreach ($this->actor as $actor) {
             $actor->xmlSerialize(true, $sxe->addChild('actor'));
         }
     }
     if (null !== $this->text) {
         $this->text->xmlSerialize(true, $sxe->addChild('text'));
     }
     if (0 < count($this->valuedItem)) {
         foreach ($this->valuedItem as $valuedItem) {
             $valuedItem->xmlSerialize(true, $sxe->addChild('valuedItem'));
         }
     }
     if (0 < count($this->group)) {
         foreach ($this->group as $group) {
             $group->xmlSerialize(true, $sxe->addChild('group'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 4
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Coverage xmlns="http://hl7.org/fhir"></Coverage>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->issuer) {
         $this->issuer->xmlSerialize(true, $sxe->addChild('issuer'));
     }
     if (null !== $this->bin) {
         $this->bin->xmlSerialize(true, $sxe->addChild('bin'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->subscriberId) {
         $this->subscriberId->xmlSerialize(true, $sxe->addChild('subscriberId'));
     }
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->group) {
         $this->group->xmlSerialize(true, $sxe->addChild('group'));
     }
     if (null !== $this->plan) {
         $this->plan->xmlSerialize(true, $sxe->addChild('plan'));
     }
     if (null !== $this->subPlan) {
         $this->subPlan->xmlSerialize(true, $sxe->addChild('subPlan'));
     }
     if (null !== $this->dependent) {
         $this->dependent->xmlSerialize(true, $sxe->addChild('dependent'));
     }
     if (null !== $this->sequence) {
         $this->sequence->xmlSerialize(true, $sxe->addChild('sequence'));
     }
     if (null !== $this->subscriber) {
         $this->subscriber->xmlSerialize(true, $sxe->addChild('subscriber'));
     }
     if (null !== $this->network) {
         $this->network->xmlSerialize(true, $sxe->addChild('network'));
     }
     if (0 < count($this->contract)) {
         foreach ($this->contract as $contract) {
             $contract->xmlSerialize(true, $sxe->addChild('contract'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Provenance xmlns="http://hl7.org/fhir"></Provenance>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->target)) {
         foreach ($this->target as $target) {
             $target->xmlSerialize(true, $sxe->addChild('target'));
         }
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->recorded) {
         $this->recorded->xmlSerialize(true, $sxe->addChild('recorded'));
     }
     if (0 < count($this->reason)) {
         foreach ($this->reason as $reason) {
             $reason->xmlSerialize(true, $sxe->addChild('reason'));
         }
     }
     if (null !== $this->activity) {
         $this->activity->xmlSerialize(true, $sxe->addChild('activity'));
     }
     if (null !== $this->location) {
         $this->location->xmlSerialize(true, $sxe->addChild('location'));
     }
     if (0 < count($this->policy)) {
         foreach ($this->policy as $policy) {
             $policy->xmlSerialize(true, $sxe->addChild('policy'));
         }
     }
     if (0 < count($this->agent)) {
         foreach ($this->agent as $agent) {
             $agent->xmlSerialize(true, $sxe->addChild('agent'));
         }
     }
     if (0 < count($this->entity)) {
         foreach ($this->entity as $entity) {
             $entity->xmlSerialize(true, $sxe->addChild('entity'));
         }
     }
     if (0 < count($this->signature)) {
         foreach ($this->signature as $signature) {
             $signature->xmlSerialize(true, $sxe->addChild('signature'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<TimingRepeat xmlns="http://hl7.org/fhir"></TimingRepeat>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->boundsQuantity) {
         $this->boundsQuantity->xmlSerialize(true, $sxe->addChild('boundsQuantity'));
     }
     if (null !== $this->boundsRange) {
         $this->boundsRange->xmlSerialize(true, $sxe->addChild('boundsRange'));
     }
     if (null !== $this->boundsPeriod) {
         $this->boundsPeriod->xmlSerialize(true, $sxe->addChild('boundsPeriod'));
     }
     if (null !== $this->count) {
         $this->count->xmlSerialize(true, $sxe->addChild('count'));
     }
     if (null !== $this->duration) {
         $this->duration->xmlSerialize(true, $sxe->addChild('duration'));
     }
     if (null !== $this->durationMax) {
         $this->durationMax->xmlSerialize(true, $sxe->addChild('durationMax'));
     }
     if (null !== $this->durationUnits) {
         $this->durationUnits->xmlSerialize(true, $sxe->addChild('durationUnits'));
     }
     if (null !== $this->frequency) {
         $this->frequency->xmlSerialize(true, $sxe->addChild('frequency'));
     }
     if (null !== $this->frequencyMax) {
         $this->frequencyMax->xmlSerialize(true, $sxe->addChild('frequencyMax'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->periodMax) {
         $this->periodMax->xmlSerialize(true, $sxe->addChild('periodMax'));
     }
     if (null !== $this->periodUnits) {
         $this->periodUnits->xmlSerialize(true, $sxe->addChild('periodUnits'));
     }
     if (null !== $this->when) {
         $this->when->xmlSerialize(true, $sxe->addChild('when'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<EncounterStatusHistory xmlns="http://hl7.org/fhir"></EncounterStatusHistory>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<HealthcareServiceNotAvailable xmlns="http://hl7.org/fhir"></HealthcareServiceNotAvailable>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->description) {
         $this->description->xmlSerialize(true, $sxe->addChild('description'));
     }
     if (null !== $this->during) {
         $this->during->xmlSerialize(true, $sxe->addChild('during'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<GroupMember xmlns="http://hl7.org/fhir"></GroupMember>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->entity) {
         $this->entity->xmlSerialize(true, $sxe->addChild('entity'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->inactive) {
         $this->inactive->xmlSerialize(true, $sxe->addChild('inactive'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<EncounterParticipant xmlns="http://hl7.org/fhir"></EncounterParticipant>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->type)) {
         foreach ($this->type as $type) {
             $type->xmlSerialize(true, $sxe->addChild('type'));
         }
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->individual) {
         $this->individual->xmlSerialize(true, $sxe->addChild('individual'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<EpisodeOfCareCareTeam xmlns="http://hl7.org/fhir"></EpisodeOfCareCareTeam>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->role)) {
         foreach ($this->role as $role) {
             $role->xmlSerialize(true, $sxe->addChild('role'));
         }
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->member) {
         $this->member->xmlSerialize(true, $sxe->addChild('member'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<CompositionEvent xmlns="http://hl7.org/fhir"></CompositionEvent>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->code)) {
         foreach ($this->code as $code) {
             $code->xmlSerialize(true, $sxe->addChild('code'));
         }
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (0 < count($this->detail)) {
         foreach ($this->detail as $detail) {
             $detail->xmlSerialize(true, $sxe->addChild('detail'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<DocumentReferenceContext xmlns="http://hl7.org/fhir"></DocumentReferenceContext>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (0 < count($this->event)) {
         foreach ($this->event as $event) {
             $event->xmlSerialize(true, $sxe->addChild('event'));
         }
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->facilityType) {
         $this->facilityType->xmlSerialize(true, $sxe->addChild('facilityType'));
     }
     if (null !== $this->practiceSetting) {
         $this->practiceSetting->xmlSerialize(true, $sxe->addChild('practiceSetting'));
     }
     if (null !== $this->sourcePatientInfo) {
         $this->sourcePatientInfo->xmlSerialize(true, $sxe->addChild('sourcePatientInfo'));
     }
     if (0 < count($this->related)) {
         foreach ($this->related as $related) {
             $related->xmlSerialize(true, $sxe->addChild('related'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<FamilyMemberHistoryCondition xmlns="http://hl7.org/fhir"></FamilyMemberHistoryCondition>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->outcome) {
         $this->outcome->xmlSerialize(true, $sxe->addChild('outcome'));
     }
     if (null !== $this->onsetQuantity) {
         $this->onsetQuantity->xmlSerialize(true, $sxe->addChild('onsetQuantity'));
     }
     if (null !== $this->onsetRange) {
         $this->onsetRange->xmlSerialize(true, $sxe->addChild('onsetRange'));
     }
     if (null !== $this->onsetPeriod) {
         $this->onsetPeriod->xmlSerialize(true, $sxe->addChild('onsetPeriod'));
     }
     if (null !== $this->onsetString) {
         $this->onsetString->xmlSerialize(true, $sxe->addChild('onsetString'));
     }
     if (null !== $this->note) {
         $this->note->xmlSerialize(true, $sxe->addChild('note'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<DeviceUseRequest xmlns="http://hl7.org/fhir"></DeviceUseRequest>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->bodySiteCodeableConcept) {
         $this->bodySiteCodeableConcept->xmlSerialize(true, $sxe->addChild('bodySiteCodeableConcept'));
     }
     if (null !== $this->bodySiteReference) {
         $this->bodySiteReference->xmlSerialize(true, $sxe->addChild('bodySiteReference'));
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->device) {
         $this->device->xmlSerialize(true, $sxe->addChild('device'));
     }
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (0 < count($this->indication)) {
         foreach ($this->indication as $indication) {
             $indication->xmlSerialize(true, $sxe->addChild('indication'));
         }
     }
     if (0 < count($this->notes)) {
         foreach ($this->notes as $notes) {
             $notes->xmlSerialize(true, $sxe->addChild('notes'));
         }
     }
     if (0 < count($this->prnReason)) {
         foreach ($this->prnReason as $prnReason) {
             $prnReason->xmlSerialize(true, $sxe->addChild('prnReason'));
         }
     }
     if (null !== $this->orderedOn) {
         $this->orderedOn->xmlSerialize(true, $sxe->addChild('orderedOn'));
     }
     if (null !== $this->recordedOn) {
         $this->recordedOn->xmlSerialize(true, $sxe->addChild('recordedOn'));
     }
     if (null !== $this->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (null !== $this->timingTiming) {
         $this->timingTiming->xmlSerialize(true, $sxe->addChild('timingTiming'));
     }
     if (null !== $this->timingPeriod) {
         $this->timingPeriod->xmlSerialize(true, $sxe->addChild('timingPeriod'));
     }
     if (null !== $this->timingDateTime) {
         $this->timingDateTime->xmlSerialize(true, $sxe->addChild('timingDateTime'));
     }
     if (null !== $this->priority) {
         $this->priority->xmlSerialize(true, $sxe->addChild('priority'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<EpisodeOfCare xmlns="http://hl7.org/fhir"></EpisodeOfCare>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (0 < count($this->statusHistory)) {
         foreach ($this->statusHistory as $statusHistory) {
             $statusHistory->xmlSerialize(true, $sxe->addChild('statusHistory'));
         }
     }
     if (0 < count($this->type)) {
         foreach ($this->type as $type) {
             $type->xmlSerialize(true, $sxe->addChild('type'));
         }
     }
     if (0 < count($this->condition)) {
         foreach ($this->condition as $condition) {
             $condition->xmlSerialize(true, $sxe->addChild('condition'));
         }
     }
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     if (null !== $this->managingOrganization) {
         $this->managingOrganization->xmlSerialize(true, $sxe->addChild('managingOrganization'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (0 < count($this->referralRequest)) {
         foreach ($this->referralRequest as $referralRequest) {
             $referralRequest->xmlSerialize(true, $sxe->addChild('referralRequest'));
         }
     }
     if (null !== $this->careManager) {
         $this->careManager->xmlSerialize(true, $sxe->addChild('careManager'));
     }
     if (0 < count($this->careTeam)) {
         foreach ($this->careTeam as $careTeam) {
             $careTeam->xmlSerialize(true, $sxe->addChild('careTeam'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<PaymentReconciliation xmlns="http://hl7.org/fhir"></PaymentReconciliation>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->request) {
         $this->request->xmlSerialize(true, $sxe->addChild('request'));
     }
     if (null !== $this->outcome) {
         $this->outcome->xmlSerialize(true, $sxe->addChild('outcome'));
     }
     if (null !== $this->disposition) {
         $this->disposition->xmlSerialize(true, $sxe->addChild('disposition'));
     }
     if (null !== $this->ruleset) {
         $this->ruleset->xmlSerialize(true, $sxe->addChild('ruleset'));
     }
     if (null !== $this->originalRuleset) {
         $this->originalRuleset->xmlSerialize(true, $sxe->addChild('originalRuleset'));
     }
     if (null !== $this->created) {
         $this->created->xmlSerialize(true, $sxe->addChild('created'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->organization) {
         $this->organization->xmlSerialize(true, $sxe->addChild('organization'));
     }
     if (null !== $this->requestProvider) {
         $this->requestProvider->xmlSerialize(true, $sxe->addChild('requestProvider'));
     }
     if (null !== $this->requestOrganization) {
         $this->requestOrganization->xmlSerialize(true, $sxe->addChild('requestOrganization'));
     }
     if (0 < count($this->detail)) {
         foreach ($this->detail as $detail) {
             $detail->xmlSerialize(true, $sxe->addChild('detail'));
         }
     }
     if (null !== $this->form) {
         $this->form->xmlSerialize(true, $sxe->addChild('form'));
     }
     if (null !== $this->total) {
         $this->total->xmlSerialize(true, $sxe->addChild('total'));
     }
     if (0 < count($this->note)) {
         foreach ($this->note as $note) {
             $note->xmlSerialize(true, $sxe->addChild('note'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 18
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Observation xmlns="http://hl7.org/fhir"></Observation>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->category) {
         $this->category->xmlSerialize(true, $sxe->addChild('category'));
     }
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (null !== $this->effectiveDateTime) {
         $this->effectiveDateTime->xmlSerialize(true, $sxe->addChild('effectiveDateTime'));
     }
     if (null !== $this->effectivePeriod) {
         $this->effectivePeriod->xmlSerialize(true, $sxe->addChild('effectivePeriod'));
     }
     if (null !== $this->issued) {
         $this->issued->xmlSerialize(true, $sxe->addChild('issued'));
     }
     if (0 < count($this->performer)) {
         foreach ($this->performer as $performer) {
             $performer->xmlSerialize(true, $sxe->addChild('performer'));
         }
     }
     if (null !== $this->valueQuantity) {
         $this->valueQuantity->xmlSerialize(true, $sxe->addChild('valueQuantity'));
     }
     if (null !== $this->valueCodeableConcept) {
         $this->valueCodeableConcept->xmlSerialize(true, $sxe->addChild('valueCodeableConcept'));
     }
     if (null !== $this->valueString) {
         $this->valueString->xmlSerialize(true, $sxe->addChild('valueString'));
     }
     if (null !== $this->valueRange) {
         $this->valueRange->xmlSerialize(true, $sxe->addChild('valueRange'));
     }
     if (null !== $this->valueRatio) {
         $this->valueRatio->xmlSerialize(true, $sxe->addChild('valueRatio'));
     }
     if (null !== $this->valueSampledData) {
         $this->valueSampledData->xmlSerialize(true, $sxe->addChild('valueSampledData'));
     }
     if (null !== $this->valueAttachment) {
         $this->valueAttachment->xmlSerialize(true, $sxe->addChild('valueAttachment'));
     }
     if (null !== $this->valueTime) {
         $this->valueTime->xmlSerialize(true, $sxe->addChild('valueTime'));
     }
     if (null !== $this->valueDateTime) {
         $this->valueDateTime->xmlSerialize(true, $sxe->addChild('valueDateTime'));
     }
     if (null !== $this->valuePeriod) {
         $this->valuePeriod->xmlSerialize(true, $sxe->addChild('valuePeriod'));
     }
     if (null !== $this->dataAbsentReason) {
         $this->dataAbsentReason->xmlSerialize(true, $sxe->addChild('dataAbsentReason'));
     }
     if (null !== $this->interpretation) {
         $this->interpretation->xmlSerialize(true, $sxe->addChild('interpretation'));
     }
     if (null !== $this->comments) {
         $this->comments->xmlSerialize(true, $sxe->addChild('comments'));
     }
     if (null !== $this->bodySite) {
         $this->bodySite->xmlSerialize(true, $sxe->addChild('bodySite'));
     }
     if (null !== $this->method) {
         $this->method->xmlSerialize(true, $sxe->addChild('method'));
     }
     if (null !== $this->specimen) {
         $this->specimen->xmlSerialize(true, $sxe->addChild('specimen'));
     }
     if (null !== $this->device) {
         $this->device->xmlSerialize(true, $sxe->addChild('device'));
     }
     if (0 < count($this->referenceRange)) {
         foreach ($this->referenceRange as $referenceRange) {
             $referenceRange->xmlSerialize(true, $sxe->addChild('referenceRange'));
         }
     }
     if (0 < count($this->related)) {
         foreach ($this->related as $related) {
             $related->xmlSerialize(true, $sxe->addChild('related'));
         }
     }
     if (0 < count($this->component)) {
         foreach ($this->component as $component) {
             $component->xmlSerialize(true, $sxe->addChild('component'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<ObservationComponent xmlns="http://hl7.org/fhir"></ObservationComponent>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->valueQuantity) {
         $this->valueQuantity->xmlSerialize(true, $sxe->addChild('valueQuantity'));
     }
     if (null !== $this->valueCodeableConcept) {
         $this->valueCodeableConcept->xmlSerialize(true, $sxe->addChild('valueCodeableConcept'));
     }
     if (null !== $this->valueString) {
         $this->valueString->xmlSerialize(true, $sxe->addChild('valueString'));
     }
     if (null !== $this->valueRange) {
         $this->valueRange->xmlSerialize(true, $sxe->addChild('valueRange'));
     }
     if (null !== $this->valueRatio) {
         $this->valueRatio->xmlSerialize(true, $sxe->addChild('valueRatio'));
     }
     if (null !== $this->valueSampledData) {
         $this->valueSampledData->xmlSerialize(true, $sxe->addChild('valueSampledData'));
     }
     if (null !== $this->valueAttachment) {
         $this->valueAttachment->xmlSerialize(true, $sxe->addChild('valueAttachment'));
     }
     if (null !== $this->valueTime) {
         $this->valueTime->xmlSerialize(true, $sxe->addChild('valueTime'));
     }
     if (null !== $this->valueDateTime) {
         $this->valueDateTime->xmlSerialize(true, $sxe->addChild('valueDateTime'));
     }
     if (null !== $this->valuePeriod) {
         $this->valuePeriod->xmlSerialize(true, $sxe->addChild('valuePeriod'));
     }
     if (null !== $this->dataAbsentReason) {
         $this->dataAbsentReason->xmlSerialize(true, $sxe->addChild('dataAbsentReason'));
     }
     if (0 < count($this->referenceRange)) {
         foreach ($this->referenceRange as $referenceRange) {
             $referenceRange->xmlSerialize(true, $sxe->addChild('referenceRange'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<NamingSystemUniqueId xmlns="http://hl7.org/fhir"></NamingSystemUniqueId>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->value) {
         $this->value->xmlSerialize(true, $sxe->addChild('value'));
     }
     if (null !== $this->preferred) {
         $this->preferred->xmlSerialize(true, $sxe->addChild('preferred'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<SpecimenCollection xmlns="http://hl7.org/fhir"></SpecimenCollection>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->collector) {
         $this->collector->xmlSerialize(true, $sxe->addChild('collector'));
     }
     if (0 < count($this->comment)) {
         foreach ($this->comment as $comment) {
             $comment->xmlSerialize(true, $sxe->addChild('comment'));
         }
     }
     if (null !== $this->collectedDateTime) {
         $this->collectedDateTime->xmlSerialize(true, $sxe->addChild('collectedDateTime'));
     }
     if (null !== $this->collectedPeriod) {
         $this->collectedPeriod->xmlSerialize(true, $sxe->addChild('collectedPeriod'));
     }
     if (null !== $this->quantity) {
         $this->quantity->xmlSerialize(true, $sxe->addChild('quantity'));
     }
     if (null !== $this->method) {
         $this->method->xmlSerialize(true, $sxe->addChild('method'));
     }
     if (null !== $this->bodySite) {
         $this->bodySite->xmlSerialize(true, $sxe->addChild('bodySite'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 22
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Schedule xmlns="http://hl7.org/fhir"></Schedule>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (0 < count($this->type)) {
         foreach ($this->type as $type) {
             $type->xmlSerialize(true, $sxe->addChild('type'));
         }
     }
     if (null !== $this->actor) {
         $this->actor->xmlSerialize(true, $sxe->addChild('actor'));
     }
     if (null !== $this->planningHorizon) {
         $this->planningHorizon->xmlSerialize(true, $sxe->addChild('planningHorizon'));
     }
     if (null !== $this->comment) {
         $this->comment->xmlSerialize(true, $sxe->addChild('comment'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<PractitionerPractitionerRole xmlns="http://hl7.org/fhir"></PractitionerPractitionerRole>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->managingOrganization) {
         $this->managingOrganization->xmlSerialize(true, $sxe->addChild('managingOrganization'));
     }
     if (null !== $this->role) {
         $this->role->xmlSerialize(true, $sxe->addChild('role'));
     }
     if (0 < count($this->specialty)) {
         foreach ($this->specialty as $specialty) {
             $specialty->xmlSerialize(true, $sxe->addChild('specialty'));
         }
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (0 < count($this->location)) {
         foreach ($this->location as $location) {
             $location->xmlSerialize(true, $sxe->addChild('location'));
         }
     }
     if (0 < count($this->healthcareService)) {
         foreach ($this->healthcareService as $healthcareService) {
             $healthcareService->xmlSerialize(true, $sxe->addChild('healthcareService'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 24
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Identifier xmlns="http://hl7.org/fhir"></Identifier>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->use) {
         $this->use->xmlSerialize(true, $sxe->addChild('use'));
     }
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->system) {
         $this->system->xmlSerialize(true, $sxe->addChild('system'));
     }
     if (null !== $this->value) {
         $this->value->xmlSerialize(true, $sxe->addChild('value'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->assigner) {
         $this->assigner->xmlSerialize(true, $sxe->addChild('assigner'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 25
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Condition xmlns="http://hl7.org/fhir"></Condition>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (null !== $this->asserter) {
         $this->asserter->xmlSerialize(true, $sxe->addChild('asserter'));
     }
     if (null !== $this->dateRecorded) {
         $this->dateRecorded->xmlSerialize(true, $sxe->addChild('dateRecorded'));
     }
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->category) {
         $this->category->xmlSerialize(true, $sxe->addChild('category'));
     }
     if (null !== $this->clinicalStatus) {
         $this->clinicalStatus->xmlSerialize(true, $sxe->addChild('clinicalStatus'));
     }
     if (null !== $this->verificationStatus) {
         $this->verificationStatus->xmlSerialize(true, $sxe->addChild('verificationStatus'));
     }
     if (null !== $this->severity) {
         $this->severity->xmlSerialize(true, $sxe->addChild('severity'));
     }
     if (null !== $this->onsetDateTime) {
         $this->onsetDateTime->xmlSerialize(true, $sxe->addChild('onsetDateTime'));
     }
     if (null !== $this->onsetQuantity) {
         $this->onsetQuantity->xmlSerialize(true, $sxe->addChild('onsetQuantity'));
     }
     if (null !== $this->onsetPeriod) {
         $this->onsetPeriod->xmlSerialize(true, $sxe->addChild('onsetPeriod'));
     }
     if (null !== $this->onsetRange) {
         $this->onsetRange->xmlSerialize(true, $sxe->addChild('onsetRange'));
     }
     if (null !== $this->onsetString) {
         $this->onsetString->xmlSerialize(true, $sxe->addChild('onsetString'));
     }
     if (null !== $this->abatementDateTime) {
         $this->abatementDateTime->xmlSerialize(true, $sxe->addChild('abatementDateTime'));
     }
     if (null !== $this->abatementQuantity) {
         $this->abatementQuantity->xmlSerialize(true, $sxe->addChild('abatementQuantity'));
     }
     if (null !== $this->abatementBoolean) {
         $this->abatementBoolean->xmlSerialize(true, $sxe->addChild('abatementBoolean'));
     }
     if (null !== $this->abatementPeriod) {
         $this->abatementPeriod->xmlSerialize(true, $sxe->addChild('abatementPeriod'));
     }
     if (null !== $this->abatementRange) {
         $this->abatementRange->xmlSerialize(true, $sxe->addChild('abatementRange'));
     }
     if (null !== $this->abatementString) {
         $this->abatementString->xmlSerialize(true, $sxe->addChild('abatementString'));
     }
     if (null !== $this->stage) {
         $this->stage->xmlSerialize(true, $sxe->addChild('stage'));
     }
     if (0 < count($this->evidence)) {
         foreach ($this->evidence as $evidence) {
             $evidence->xmlSerialize(true, $sxe->addChild('evidence'));
         }
     }
     if (0 < count($this->bodySite)) {
         foreach ($this->bodySite as $bodySite) {
             $bodySite->xmlSerialize(true, $sxe->addChild('bodySite'));
         }
     }
     if (null !== $this->notes) {
         $this->notes->xmlSerialize(true, $sxe->addChild('notes'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<CarePlanDetail xmlns="http://hl7.org/fhir"></CarePlanDetail>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->category) {
         $this->category->xmlSerialize(true, $sxe->addChild('category'));
     }
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (0 < count($this->reasonCode)) {
         foreach ($this->reasonCode as $reasonCode) {
             $reasonCode->xmlSerialize(true, $sxe->addChild('reasonCode'));
         }
     }
     if (0 < count($this->reasonReference)) {
         foreach ($this->reasonReference as $reasonReference) {
             $reasonReference->xmlSerialize(true, $sxe->addChild('reasonReference'));
         }
     }
     if (0 < count($this->goal)) {
         foreach ($this->goal as $goal) {
             $goal->xmlSerialize(true, $sxe->addChild('goal'));
         }
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->statusReason) {
         $this->statusReason->xmlSerialize(true, $sxe->addChild('statusReason'));
     }
     if (null !== $this->prohibited) {
         $this->prohibited->xmlSerialize(true, $sxe->addChild('prohibited'));
     }
     if (null !== $this->scheduledTiming) {
         $this->scheduledTiming->xmlSerialize(true, $sxe->addChild('scheduledTiming'));
     }
     if (null !== $this->scheduledPeriod) {
         $this->scheduledPeriod->xmlSerialize(true, $sxe->addChild('scheduledPeriod'));
     }
     if (null !== $this->scheduledString) {
         $this->scheduledString->xmlSerialize(true, $sxe->addChild('scheduledString'));
     }
     if (null !== $this->location) {
         $this->location->xmlSerialize(true, $sxe->addChild('location'));
     }
     if (0 < count($this->performer)) {
         foreach ($this->performer as $performer) {
             $performer->xmlSerialize(true, $sxe->addChild('performer'));
         }
     }
     if (null !== $this->productCodeableConcept) {
         $this->productCodeableConcept->xmlSerialize(true, $sxe->addChild('productCodeableConcept'));
     }
     if (null !== $this->productReference) {
         $this->productReference->xmlSerialize(true, $sxe->addChild('productReference'));
     }
     if (null !== $this->dailyAmount) {
         $this->dailyAmount->xmlSerialize(true, $sxe->addChild('dailyAmount'));
     }
     if (null !== $this->quantity) {
         $this->quantity->xmlSerialize(true, $sxe->addChild('quantity'));
     }
     if (null !== $this->description) {
         $this->description->xmlSerialize(true, $sxe->addChild('description'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 27
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Address xmlns="http://hl7.org/fhir"></Address>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->use) {
         $this->use->xmlSerialize(true, $sxe->addChild('use'));
     }
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->text) {
         $this->text->xmlSerialize(true, $sxe->addChild('text'));
     }
     if (0 < count($this->line)) {
         foreach ($this->line as $line) {
             $line->xmlSerialize(true, $sxe->addChild('line'));
         }
     }
     if (null !== $this->city) {
         $this->city->xmlSerialize(true, $sxe->addChild('city'));
     }
     if (null !== $this->district) {
         $this->district->xmlSerialize(true, $sxe->addChild('district'));
     }
     if (null !== $this->state) {
         $this->state->xmlSerialize(true, $sxe->addChild('state'));
     }
     if (null !== $this->postalCode) {
         $this->postalCode->xmlSerialize(true, $sxe->addChild('postalCode'));
     }
     if (null !== $this->country) {
         $this->country->xmlSerialize(true, $sxe->addChild('country'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
Exemplo n.º 28
0
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<Encounter xmlns="http://hl7.org/fhir"></Encounter>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (0 < count($this->statusHistory)) {
         foreach ($this->statusHistory as $statusHistory) {
             $statusHistory->xmlSerialize(true, $sxe->addChild('statusHistory'));
         }
     }
     if (null !== $this->class) {
         $this->class->xmlSerialize(true, $sxe->addChild('class'));
     }
     if (0 < count($this->type)) {
         foreach ($this->type as $type) {
             $type->xmlSerialize(true, $sxe->addChild('type'));
         }
     }
     if (null !== $this->priority) {
         $this->priority->xmlSerialize(true, $sxe->addChild('priority'));
     }
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     if (0 < count($this->episodeOfCare)) {
         foreach ($this->episodeOfCare as $episodeOfCare) {
             $episodeOfCare->xmlSerialize(true, $sxe->addChild('episodeOfCare'));
         }
     }
     if (0 < count($this->incomingReferral)) {
         foreach ($this->incomingReferral as $incomingReferral) {
             $incomingReferral->xmlSerialize(true, $sxe->addChild('incomingReferral'));
         }
     }
     if (0 < count($this->participant)) {
         foreach ($this->participant as $participant) {
             $participant->xmlSerialize(true, $sxe->addChild('participant'));
         }
     }
     if (null !== $this->appointment) {
         $this->appointment->xmlSerialize(true, $sxe->addChild('appointment'));
     }
     if (null !== $this->period) {
         $this->period->xmlSerialize(true, $sxe->addChild('period'));
     }
     if (null !== $this->length) {
         $this->length->xmlSerialize(true, $sxe->addChild('length'));
     }
     if (0 < count($this->reason)) {
         foreach ($this->reason as $reason) {
             $reason->xmlSerialize(true, $sxe->addChild('reason'));
         }
     }
     if (0 < count($this->indication)) {
         foreach ($this->indication as $indication) {
             $indication->xmlSerialize(true, $sxe->addChild('indication'));
         }
     }
     if (null !== $this->hospitalization) {
         $this->hospitalization->xmlSerialize(true, $sxe->addChild('hospitalization'));
     }
     if (0 < count($this->location)) {
         foreach ($this->location as $location) {
             $location->xmlSerialize(true, $sxe->addChild('location'));
         }
     }
     if (null !== $this->serviceProvider) {
         $this->serviceProvider->xmlSerialize(true, $sxe->addChild('serviceProvider'));
     }
     if (null !== $this->partOf) {
         $this->partOf->xmlSerialize(true, $sxe->addChild('partOf'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<MedicationAdministration xmlns="http://hl7.org/fhir"></MedicationAdministration>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     if (null !== $this->practitioner) {
         $this->practitioner->xmlSerialize(true, $sxe->addChild('practitioner'));
     }
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (null !== $this->prescription) {
         $this->prescription->xmlSerialize(true, $sxe->addChild('prescription'));
     }
     if (null !== $this->wasNotGiven) {
         $this->wasNotGiven->xmlSerialize(true, $sxe->addChild('wasNotGiven'));
     }
     if (0 < count($this->reasonNotGiven)) {
         foreach ($this->reasonNotGiven as $reasonNotGiven) {
             $reasonNotGiven->xmlSerialize(true, $sxe->addChild('reasonNotGiven'));
         }
     }
     if (0 < count($this->reasonGiven)) {
         foreach ($this->reasonGiven as $reasonGiven) {
             $reasonGiven->xmlSerialize(true, $sxe->addChild('reasonGiven'));
         }
     }
     if (null !== $this->effectiveTimeDateTime) {
         $this->effectiveTimeDateTime->xmlSerialize(true, $sxe->addChild('effectiveTimeDateTime'));
     }
     if (null !== $this->effectiveTimePeriod) {
         $this->effectiveTimePeriod->xmlSerialize(true, $sxe->addChild('effectiveTimePeriod'));
     }
     if (null !== $this->medicationCodeableConcept) {
         $this->medicationCodeableConcept->xmlSerialize(true, $sxe->addChild('medicationCodeableConcept'));
     }
     if (null !== $this->medicationReference) {
         $this->medicationReference->xmlSerialize(true, $sxe->addChild('medicationReference'));
     }
     if (0 < count($this->device)) {
         foreach ($this->device as $device) {
             $device->xmlSerialize(true, $sxe->addChild('device'));
         }
     }
     if (null !== $this->note) {
         $this->note->xmlSerialize(true, $sxe->addChild('note'));
     }
     if (null !== $this->dosage) {
         $this->dosage->xmlSerialize(true, $sxe->addChild('dosage'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<CommunicationRequest xmlns="http://hl7.org/fhir"></CommunicationRequest>');
     }
     parent::xmlSerialize(true, $sxe);
     if (0 < count($this->identifier)) {
         foreach ($this->identifier as $identifier) {
             $identifier->xmlSerialize(true, $sxe->addChild('identifier'));
         }
     }
     if (null !== $this->category) {
         $this->category->xmlSerialize(true, $sxe->addChild('category'));
     }
     if (null !== $this->sender) {
         $this->sender->xmlSerialize(true, $sxe->addChild('sender'));
     }
     if (0 < count($this->recipient)) {
         foreach ($this->recipient as $recipient) {
             $recipient->xmlSerialize(true, $sxe->addChild('recipient'));
         }
     }
     if (0 < count($this->payload)) {
         foreach ($this->payload as $payload) {
             $payload->xmlSerialize(true, $sxe->addChild('payload'));
         }
     }
     if (0 < count($this->medium)) {
         foreach ($this->medium as $medium) {
             $medium->xmlSerialize(true, $sxe->addChild('medium'));
         }
     }
     if (null !== $this->requester) {
         $this->requester->xmlSerialize(true, $sxe->addChild('requester'));
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (null !== $this->scheduledDateTime) {
         $this->scheduledDateTime->xmlSerialize(true, $sxe->addChild('scheduledDateTime'));
     }
     if (null !== $this->scheduledPeriod) {
         $this->scheduledPeriod->xmlSerialize(true, $sxe->addChild('scheduledPeriod'));
     }
     if (0 < count($this->reason)) {
         foreach ($this->reason as $reason) {
             $reason->xmlSerialize(true, $sxe->addChild('reason'));
         }
     }
     if (null !== $this->requestedOn) {
         $this->requestedOn->xmlSerialize(true, $sxe->addChild('requestedOn'));
     }
     if (null !== $this->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (null !== $this->priority) {
         $this->priority->xmlSerialize(true, $sxe->addChild('priority'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }