/**
  * @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();
 }
Exemplo n.º 2
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('<FamilyMemberHistory xmlns="http://hl7.org/fhir"></FamilyMemberHistory>');
     }
     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->date) {
         $this->date->xmlSerialize(true, $sxe->addChild('date'));
     }
     if (null !== $this->status) {
         $this->status->xmlSerialize(true, $sxe->addChild('status'));
     }
     if (null !== $this->name) {
         $this->name->xmlSerialize(true, $sxe->addChild('name'));
     }
     if (null !== $this->relationship) {
         $this->relationship->xmlSerialize(true, $sxe->addChild('relationship'));
     }
     if (null !== $this->gender) {
         $this->gender->xmlSerialize(true, $sxe->addChild('gender'));
     }
     if (null !== $this->bornPeriod) {
         $this->bornPeriod->xmlSerialize(true, $sxe->addChild('bornPeriod'));
     }
     if (null !== $this->bornDate) {
         $this->bornDate->xmlSerialize(true, $sxe->addChild('bornDate'));
     }
     if (null !== $this->bornString) {
         $this->bornString->xmlSerialize(true, $sxe->addChild('bornString'));
     }
     if (null !== $this->ageQuantity) {
         $this->ageQuantity->xmlSerialize(true, $sxe->addChild('ageQuantity'));
     }
     if (null !== $this->ageRange) {
         $this->ageRange->xmlSerialize(true, $sxe->addChild('ageRange'));
     }
     if (null !== $this->ageString) {
         $this->ageString->xmlSerialize(true, $sxe->addChild('ageString'));
     }
     if (null !== $this->deceasedBoolean) {
         $this->deceasedBoolean->xmlSerialize(true, $sxe->addChild('deceasedBoolean'));
     }
     if (null !== $this->deceasedQuantity) {
         $this->deceasedQuantity->xmlSerialize(true, $sxe->addChild('deceasedQuantity'));
     }
     if (null !== $this->deceasedRange) {
         $this->deceasedRange->xmlSerialize(true, $sxe->addChild('deceasedRange'));
     }
     if (null !== $this->deceasedDate) {
         $this->deceasedDate->xmlSerialize(true, $sxe->addChild('deceasedDate'));
     }
     if (null !== $this->deceasedString) {
         $this->deceasedString->xmlSerialize(true, $sxe->addChild('deceasedString'));
     }
     if (null !== $this->note) {
         $this->note->xmlSerialize(true, $sxe->addChild('note'));
     }
     if (0 < count($this->condition)) {
         foreach ($this->condition as $condition) {
             $condition->xmlSerialize(true, $sxe->addChild('condition'));
         }
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }