/**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<BodySite xmlns="http://hl7.org/fhir"></BodySite>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     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 (0 < count($this->modifier)) {
         foreach ($this->modifier as $modifier) {
             $modifier->xmlSerialize(true, $sxe->addChild('modifier'));
         }
     }
     if (null !== $this->description) {
         $this->description->xmlSerialize(true, $sxe->addChild('description'));
     }
     if (0 < count($this->image)) {
         foreach ($this->image as $image) {
             $image->xmlSerialize(true, $sxe->addChild('image'));
         }
     }
     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('<ObservationReferenceRange xmlns="http://hl7.org/fhir"></ObservationReferenceRange>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->low) {
         $this->low->xmlSerialize(true, $sxe->addChild('low'));
     }
     if (null !== $this->high) {
         $this->high->xmlSerialize(true, $sxe->addChild('high'));
     }
     if (null !== $this->meaning) {
         $this->meaning->xmlSerialize(true, $sxe->addChild('meaning'));
     }
     if (null !== $this->age) {
         $this->age->xmlSerialize(true, $sxe->addChild('age'));
     }
     if (null !== $this->text) {
         $this->text->xmlSerialize(true, $sxe->addChild('text'));
     }
     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('<GroupCharacteristic xmlns="http://hl7.org/fhir"></GroupCharacteristic>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->valueCodeableConcept) {
         $this->valueCodeableConcept->xmlSerialize(true, $sxe->addChild('valueCodeableConcept'));
     }
     if (null !== $this->valueBoolean) {
         $this->valueBoolean->xmlSerialize(true, $sxe->addChild('valueBoolean'));
     }
     if (null !== $this->valueQuantity) {
         $this->valueQuantity->xmlSerialize(true, $sxe->addChild('valueQuantity'));
     }
     if (null !== $this->valueRange) {
         $this->valueRange->xmlSerialize(true, $sxe->addChild('valueRange'));
     }
     if (null !== $this->exclude) {
         $this->exclude->xmlSerialize(true, $sxe->addChild('exclude'));
     }
     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('<DiagnosticOrderItem xmlns="http://hl7.org/fhir"></DiagnosticOrderItem>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (0 < count($this->specimen)) {
         foreach ($this->specimen as $specimen) {
             $specimen->xmlSerialize(true, $sxe->addChild('specimen'));
         }
     }
     if (null !== $this->bodySite) {
         $this->bodySite->xmlSerialize(true, $sxe->addChild('bodySite'));
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (0 < count($this->event)) {
         foreach ($this->event as $event) {
             $event->xmlSerialize(true, $sxe->addChild('event'));
         }
     }
     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('<OrganizationContact xmlns="http://hl7.org/fhir"></OrganizationContact>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->purpose) {
         $this->purpose->xmlSerialize(true, $sxe->addChild('purpose'));
     }
     if (null !== $this->name) {
         $this->name->xmlSerialize(true, $sxe->addChild('name'));
     }
     if (0 < count($this->telecom)) {
         foreach ($this->telecom as $telecom) {
             $telecom->xmlSerialize(true, $sxe->addChild('telecom'));
         }
     }
     if (null !== $this->address) {
         $this->address->xmlSerialize(true, $sxe->addChild('address'));
     }
     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('<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();
 }
 /**
  * @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('<Communication xmlns="http://hl7.org/fhir"></Communication>');
     }
     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->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->encounter) {
         $this->encounter->xmlSerialize(true, $sxe->addChild('encounter'));
     }
     if (null !== $this->sent) {
         $this->sent->xmlSerialize(true, $sxe->addChild('sent'));
     }
     if (null !== $this->received) {
         $this->received->xmlSerialize(true, $sxe->addChild('received'));
     }
     if (0 < count($this->reason)) {
         foreach ($this->reason as $reason) {
             $reason->xmlSerialize(true, $sxe->addChild('reason'));
         }
     }
     if (null !== $this->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (null !== $this->requestDetail) {
         $this->requestDetail->xmlSerialize(true, $sxe->addChild('requestDetail'));
     }
     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('<Medication xmlns="http://hl7.org/fhir"></Medication>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->isBrand) {
         $this->isBrand->xmlSerialize(true, $sxe->addChild('isBrand'));
     }
     if (null !== $this->manufacturer) {
         $this->manufacturer->xmlSerialize(true, $sxe->addChild('manufacturer'));
     }
     if (null !== $this->product) {
         $this->product->xmlSerialize(true, $sxe->addChild('product'));
     }
     if (null !== $this->package) {
         $this->package->xmlSerialize(true, $sxe->addChild('package'));
     }
     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('<NutritionOrderSupplement xmlns="http://hl7.org/fhir"></NutritionOrderSupplement>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->productName) {
         $this->productName->xmlSerialize(true, $sxe->addChild('productName'));
     }
     if (0 < count($this->schedule)) {
         foreach ($this->schedule as $schedule) {
             $schedule->xmlSerialize(true, $sxe->addChild('schedule'));
         }
     }
     if (null !== $this->quantity) {
         $this->quantity->xmlSerialize(true, $sxe->addChild('quantity'));
     }
     if (null !== $this->instruction) {
         $this->instruction->xmlSerialize(true, $sxe->addChild('instruction'));
     }
     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('<OperationOutcomeIssue xmlns="http://hl7.org/fhir"></OperationOutcomeIssue>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->severity) {
         $this->severity->xmlSerialize(true, $sxe->addChild('severity'));
     }
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->details) {
         $this->details->xmlSerialize(true, $sxe->addChild('details'));
     }
     if (null !== $this->diagnostics) {
         $this->diagnostics->xmlSerialize(true, $sxe->addChild('diagnostics'));
     }
     if (0 < count($this->location)) {
         foreach ($this->location as $location) {
             $location->xmlSerialize(true, $sxe->addChild('location'));
         }
     }
     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('<Supply xmlns="http://hl7.org/fhir"></Supply>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->kind) {
         $this->kind->xmlSerialize(true, $sxe->addChild('kind'));
     }
     if (null !== $this->identifier) {
         $this->identifier->xmlSerialize(true, $sxe->addChild('identifier'));
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->orderedItem) {
         $this->orderedItem->xmlSerialize(true, $sxe->addChild('orderedItem'));
     }
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     if (0 < count($this->dispense)) {
         foreach ($this->dispense as $dispense) {
             $dispense->xmlSerialize(true, $sxe->addChild('dispense'));
         }
     }
     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('<Basic xmlns="http://hl7.org/fhir"></Basic>');
     }
     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->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (null !== $this->author) {
         $this->author->xmlSerialize(true, $sxe->addChild('author'));
     }
     if (null !== $this->created) {
         $this->created->xmlSerialize(true, $sxe->addChild('created'));
     }
     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('<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('<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();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<ImagingObjectSelection xmlns="http://hl7.org/fhir"></ImagingObjectSelection>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->uid) {
         $this->uid->xmlSerialize(true, $sxe->addChild('uid'));
     }
     if (null !== $this->patient) {
         $this->patient->xmlSerialize(true, $sxe->addChild('patient'));
     }
     if (null !== $this->title) {
         $this->title->xmlSerialize(true, $sxe->addChild('title'));
     }
     if (null !== $this->description) {
         $this->description->xmlSerialize(true, $sxe->addChild('description'));
     }
     if (null !== $this->author) {
         $this->author->xmlSerialize(true, $sxe->addChild('author'));
     }
     if (null !== $this->authoringTime) {
         $this->authoringTime->xmlSerialize(true, $sxe->addChild('authoringTime'));
     }
     if (0 < count($this->study)) {
         foreach ($this->study as $study) {
             $study->xmlSerialize(true, $sxe->addChild('study'));
         }
     }
     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('<DeviceUseStatement xmlns="http://hl7.org/fhir"></DeviceUseStatement>');
     }
     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->whenUsed) {
         $this->whenUsed->xmlSerialize(true, $sxe->addChild('whenUsed'));
     }
     if (null !== $this->device) {
         $this->device->xmlSerialize(true, $sxe->addChild('device'));
     }
     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 (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 ($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('<Specimen xmlns="http://hl7.org/fhir"></Specimen>');
     }
     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->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (0 < count($this->parent)) {
         foreach ($this->parent as $parent) {
             $parent->xmlSerialize(true, $sxe->addChild('parent'));
         }
     }
     if (null !== $this->subject) {
         $this->subject->xmlSerialize(true, $sxe->addChild('subject'));
     }
     if (null !== $this->accessionIdentifier) {
         $this->accessionIdentifier->xmlSerialize(true, $sxe->addChild('accessionIdentifier'));
     }
     if (null !== $this->receivedTime) {
         $this->receivedTime->xmlSerialize(true, $sxe->addChild('receivedTime'));
     }
     if (null !== $this->collection) {
         $this->collection->xmlSerialize(true, $sxe->addChild('collection'));
     }
     if (0 < count($this->treatment)) {
         foreach ($this->treatment as $treatment) {
             $treatment->xmlSerialize(true, $sxe->addChild('treatment'));
         }
     }
     if (0 < count($this->container)) {
         foreach ($this->container as $container) {
             $container->xmlSerialize(true, $sxe->addChild('container'));
         }
     }
     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('<RelatedPerson xmlns="http://hl7.org/fhir"></RelatedPerson>');
     }
     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->relationship) {
         $this->relationship->xmlSerialize(true, $sxe->addChild('relationship'));
     }
     if (null !== $this->name) {
         $this->name->xmlSerialize(true, $sxe->addChild('name'));
     }
     if (0 < count($this->telecom)) {
         foreach ($this->telecom as $telecom) {
             $telecom->xmlSerialize(true, $sxe->addChild('telecom'));
         }
     }
     if (null !== $this->gender) {
         $this->gender->xmlSerialize(true, $sxe->addChild('gender'));
     }
     if (null !== $this->birthDate) {
         $this->birthDate->xmlSerialize(true, $sxe->addChild('birthDate'));
     }
     if (0 < count($this->address)) {
         foreach ($this->address as $address) {
             $address->xmlSerialize(true, $sxe->addChild('address'));
         }
     }
     if (0 < count($this->photo)) {
         foreach ($this->photo as $photo) {
             $photo->xmlSerialize(true, $sxe->addChild('photo'));
         }
     }
     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('<ClinicalImpressionRuledOut xmlns="http://hl7.org/fhir"></ClinicalImpressionRuledOut>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->item) {
         $this->item->xmlSerialize(true, $sxe->addChild('item'));
     }
     if (null !== $this->reason) {
         $this->reason->xmlSerialize(true, $sxe->addChild('reason'));
     }
     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('<ImmunizationRecommendationDateCriterion xmlns="http://hl7.org/fhir"></ImmunizationRecommendationDateCriterion>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->value) {
         $this->value->xmlSerialize(true, $sxe->addChild('value'));
     }
     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('<OrderWhen xmlns="http://hl7.org/fhir"></OrderWhen>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->code) {
         $this->code->xmlSerialize(true, $sxe->addChild('code'));
     }
     if (null !== $this->schedule) {
         $this->schedule->xmlSerialize(true, $sxe->addChild('schedule'));
     }
     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('<MedicationPrescriptionSubstitution xmlns="http://hl7.org/fhir"></MedicationPrescriptionSubstitution>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->reason) {
         $this->reason->xmlSerialize(true, $sxe->addChild('reason'));
     }
     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('<PatientCommunication xmlns="http://hl7.org/fhir"></PatientCommunication>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->language) {
         $this->language->xmlSerialize(true, $sxe->addChild('language'));
     }
     if (null !== $this->preferred) {
         $this->preferred->xmlSerialize(true, $sxe->addChild('preferred'));
     }
     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('<ProcedurePerformer xmlns="http://hl7.org/fhir"></ProcedurePerformer>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->actor) {
         $this->actor->xmlSerialize(true, $sxe->addChild('actor'));
     }
     if (null !== $this->role) {
         $this->role->xmlSerialize(true, $sxe->addChild('role'));
     }
     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('<NutritionOrderNutrient xmlns="http://hl7.org/fhir"></NutritionOrderNutrient>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->modifier) {
         $this->modifier->xmlSerialize(true, $sxe->addChild('modifier'));
     }
     if (null !== $this->amount) {
         $this->amount->xmlSerialize(true, $sxe->addChild('amount'));
     }
     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('<ProcedureFocalDevice xmlns="http://hl7.org/fhir"></ProcedureFocalDevice>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->action) {
         $this->action->xmlSerialize(true, $sxe->addChild('action'));
     }
     if (null !== $this->manipulated) {
         $this->manipulated->xmlSerialize(true, $sxe->addChild('manipulated'));
     }
     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('<CarePlanParticipant xmlns="http://hl7.org/fhir"></CarePlanParticipant>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->role) {
         $this->role->xmlSerialize(true, $sxe->addChild('role'));
     }
     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('<GoalOutcome xmlns="http://hl7.org/fhir"></GoalOutcome>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->resultCodeableConcept) {
         $this->resultCodeableConcept->xmlSerialize(true, $sxe->addChild('resultCodeableConcept'));
     }
     if (null !== $this->resultReference) {
         $this->resultReference->xmlSerialize(true, $sxe->addChild('resultReference'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }