/** * @param boolean $returnSXE * @param \SimpleXMLElement $sxe * @return string|\SimpleXMLElement */ public function xmlSerialize($returnSXE = false, $sxe = null) { if (null === $sxe) { $sxe = new \SimpleXMLElement('<DiagnosticOrderEvent xmlns="http://hl7.org/fhir"></DiagnosticOrderEvent>'); } parent::xmlSerialize(true, $sxe); if (null !== $this->status) { $this->status->xmlSerialize(true, $sxe->addChild('status')); } if (null !== $this->description) { $this->description->xmlSerialize(true, $sxe->addChild('description')); } if (null !== $this->dateTime) { $this->dateTime->xmlSerialize(true, $sxe->addChild('dateTime')); } if (null !== $this->actor) { $this->actor->xmlSerialize(true, $sxe->addChild('actor')); } 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('<DiagnosticOrder xmlns="http://hl7.org/fhir"></DiagnosticOrder>'); } parent::xmlSerialize(true, $sxe); if (null !== $this->subject) { $this->subject->xmlSerialize(true, $sxe->addChild('subject')); } if (null !== $this->orderer) { $this->orderer->xmlSerialize(true, $sxe->addChild('orderer')); } if (0 < count($this->identifier)) { foreach ($this->identifier as $identifier) { $identifier->xmlSerialize(true, $sxe->addChild('identifier')); } } if (null !== $this->encounter) { $this->encounter->xmlSerialize(true, $sxe->addChild('encounter')); } if (0 < count($this->reason)) { foreach ($this->reason as $reason) { $reason->xmlSerialize(true, $sxe->addChild('reason')); } } if (0 < count($this->supportingInformation)) { foreach ($this->supportingInformation as $supportingInformation) { $supportingInformation->xmlSerialize(true, $sxe->addChild('supportingInformation')); } } if (0 < count($this->specimen)) { foreach ($this->specimen as $specimen) { $specimen->xmlSerialize(true, $sxe->addChild('specimen')); } } if (null !== $this->status) { $this->status->xmlSerialize(true, $sxe->addChild('status')); } if (null !== $this->priority) { $this->priority->xmlSerialize(true, $sxe->addChild('priority')); } if (0 < count($this->event)) { foreach ($this->event as $event) { $event->xmlSerialize(true, $sxe->addChild('event')); } } if (0 < count($this->item)) { foreach ($this->item as $item) { $item->xmlSerialize(true, $sxe->addChild('item')); } } if (0 < count($this->note)) { foreach ($this->note as $note) { $note->xmlSerialize(true, $sxe->addChild('note')); } } if ($returnSXE) { return $sxe; } return $sxe->saveXML(); }