| @@ 55-70 (lines=16) @@ | ||
| 52 | return $this->classCode; |
|
| 53 | } |
|
| 54 | ||
| 55 | public function toDOMElement(\DOMDocument $doc): \DOMElement |
|
| 56 | { |
|
| 57 | $el = $this->createElement($doc); |
|
| 58 | ||
| 59 | foreach ($this->getId() as $idValue) { |
|
| 60 | $idElement = new Id($idValue); |
|
| 61 | $el->appendChild($idElement->toDomElement($doc)); |
|
| 62 | } |
|
| 63 | ||
| 64 | foreach ($this->getNames()->get() as $name) { |
|
| 65 | /* @var $name \PHPHealth\CDA\DataType\Name\EntityName */ |
|
| 66 | $name->setValueToElement($el, $doc); |
|
| 67 | } |
|
| 68 | ||
| 69 | return $el; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| @@ 116-129 (lines=14) @@ | ||
| 113 | return 'PAT'; |
|
| 114 | } |
|
| 115 | ||
| 116 | public function toDOMElement(\DOMDocument $doc) |
|
| 117 | { |
|
| 118 | $el = $this->createElement($doc); |
|
| 119 | ||
| 120 | foreach ($this->patientIds->get() as $ii) { |
|
| 121 | $id = $doc->createElement(CDA::NS_CDA.'id'); |
|
| 122 | $ii->setValueToElement($id, $doc); |
|
| 123 | $el->appendChild($id); |
|
| 124 | } |
|
| 125 | ||
| 126 | $el->appendChild($this->getPatient()->toDOMElement($doc)); |
|
| 127 | ||
| 128 | return $el; |
|
| 129 | } |
|
| 130 | } |
|
| 131 | ||