1 <?php
namespace HL7\FHIR\STU3\FHIRResource\FHIRStructureMap
;
4 * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
5 * class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
7 * Class creation date: February 10th, 2018
10 use HL7\FHIR\STU3\FHIRElement\FHIRBackboneElement
;
13 * A Map of relationships between 2 structures that can be used to transform data.
15 class FHIRStructureMapInput
extends FHIRBackboneElement
implements \JsonSerializable
18 * Name for this instance of data.
19 * @var \HL7\FHIR\STU3\FHIRElement\FHIRId
24 * Type for this instance of data.
25 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
30 * Mode for this instance of data.
31 * @var \HL7\FHIR\STU3\FHIRElement\FHIRStructureMapInputMode
36 * Documentation for this instance of data.
37 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
39 public $documentation = null;
44 private $_fhirElementName = 'StructureMap.Input';
47 * Name for this instance of data.
48 * @return \HL7\FHIR\STU3\FHIRElement\FHIRId
50 public function getName()
56 * Name for this instance of data.
57 * @param \HL7\FHIR\STU3\FHIRElement\FHIRId $name
60 public function setName($name)
67 * Type for this instance of data.
68 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
70 public function getType()
76 * Type for this instance of data.
77 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $type
80 public function setType($type)
87 * Mode for this instance of data.
88 * @return \HL7\FHIR\STU3\FHIRElement\FHIRStructureMapInputMode
90 public function getMode()
96 * Mode for this instance of data.
97 * @param \HL7\FHIR\STU3\FHIRElement\FHIRStructureMapInputMode $mode
100 public function setMode($mode)
107 * Documentation for this instance of data.
108 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
110 public function getDocumentation()
112 return $this->documentation
;
116 * Documentation for this instance of data.
117 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $documentation
120 public function setDocumentation($documentation)
122 $this->documentation
= $documentation;
129 public function get_fhirElementName()
131 return $this->_fhirElementName
;
137 public function __construct($data = [])
139 if (is_array($data)) {
140 if (isset($data['name'])) {
141 $this->setName($data['name']);
143 if (isset($data['type'])) {
144 $this->setType($data['type']);
146 if (isset($data['mode'])) {
147 $this->setMode($data['mode']);
149 if (isset($data['documentation'])) {
150 $this->setDocumentation($data['documentation']);
152 } else if (null !== $data) {
153 throw new \
InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
155 parent
::__construct($data);
161 public function __toString()
163 return $this->get_fhirElementName();
169 public function jsonSerialize()
171 $json = parent
::jsonSerialize();
172 if (isset($this->name
)) {
173 $json['name'] = $this->name
;
175 if (isset($this->type
)) {
176 $json['type'] = $this->type
;
178 if (isset($this->mode
)) {
179 $json['mode'] = $this->mode
;
181 if (isset($this->documentation
)) {
182 $json['documentation'] = $this->documentation
;
188 * @param boolean $returnSXE
189 * @param \SimpleXMLElement $sxe
190 * @return string|\SimpleXMLElement
192 public function xmlSerialize($returnSXE = false, $sxe = null)
195 $sxe = new \
SimpleXMLElement('<StructureMapInput xmlns="http://hl7.org/fhir"></StructureMapInput>');
197 parent
::xmlSerialize(true, $sxe);
198 if (isset($this->name
)) {
199 $this->name
->xmlSerialize(true, $sxe->addChild('name'));
201 if (isset($this->type
)) {
202 $this->type
->xmlSerialize(true, $sxe->addChild('type'));
204 if (isset($this->mode
)) {
205 $this->mode
->xmlSerialize(true, $sxe->addChild('mode'));
207 if (isset($this->documentation
)) {
208 $this->documentation
->xmlSerialize(true, $sxe->addChild('documentation'));
213 return $sxe->saveXML();