Phase 1 FHIR on PHP- Provider Client and implement classes. (#1422)
[openemr.git] / phpfhir / HL7 / FHIR / STU3 / src / FHIRResource / FHIREligibilityResponse / FHIREligibilityResponseFinancial.php
blobd816d0c421299ffee3bb5fe60ce2fbe4e143c702
1 <?php namespace HL7\FHIR\STU3\FHIRResource\FHIREligibilityResponse;
3 /*!
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/)
6 *
7 * Class creation date: February 10th, 2018
8 */
10 use HL7\FHIR\STU3\FHIRElement\FHIRBackboneElement;
12 /**
13 * This resource provides eligibility and plan details from the processing of an Eligibility resource.
15 class FHIREligibilityResponseFinancial extends FHIRBackboneElement implements \JsonSerializable
17 /**
18 * Deductable, visits, benefit amount.
19 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
21 public $type = null;
23 /**
24 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
26 public $allowedUnsignedInt = null;
28 /**
29 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
31 public $allowedString = null;
33 /**
34 * @var \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney
36 public $allowedMoney = null;
38 /**
39 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
41 public $usedUnsignedInt = null;
43 /**
44 * @var \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney
46 public $usedMoney = null;
48 /**
49 * @var string
51 private $_fhirElementName = 'EligibilityResponse.Financial';
53 /**
54 * Deductable, visits, benefit amount.
55 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
57 public function getType()
59 return $this->type;
62 /**
63 * Deductable, visits, benefit amount.
64 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $type
65 * @return $this
67 public function setType($type)
69 $this->type = $type;
70 return $this;
73 /**
74 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
76 public function getAllowedUnsignedInt()
78 return $this->allowedUnsignedInt;
81 /**
82 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt $allowedUnsignedInt
83 * @return $this
85 public function setAllowedUnsignedInt($allowedUnsignedInt)
87 $this->allowedUnsignedInt = $allowedUnsignedInt;
88 return $this;
91 /**
92 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
94 public function getAllowedString()
96 return $this->allowedString;
99 /**
100 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $allowedString
101 * @return $this
103 public function setAllowedString($allowedString)
105 $this->allowedString = $allowedString;
106 return $this;
110 * @return \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney
112 public function getAllowedMoney()
114 return $this->allowedMoney;
118 * @param \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney $allowedMoney
119 * @return $this
121 public function setAllowedMoney($allowedMoney)
123 $this->allowedMoney = $allowedMoney;
124 return $this;
128 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
130 public function getUsedUnsignedInt()
132 return $this->usedUnsignedInt;
136 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt $usedUnsignedInt
137 * @return $this
139 public function setUsedUnsignedInt($usedUnsignedInt)
141 $this->usedUnsignedInt = $usedUnsignedInt;
142 return $this;
146 * @return \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney
148 public function getUsedMoney()
150 return $this->usedMoney;
154 * @param \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney $usedMoney
155 * @return $this
157 public function setUsedMoney($usedMoney)
159 $this->usedMoney = $usedMoney;
160 return $this;
164 * @return string
166 public function get_fhirElementName()
168 return $this->_fhirElementName;
172 * @param mixed $data
174 public function __construct($data = [])
176 if (is_array($data)) {
177 if (isset($data['type'])) {
178 $this->setType($data['type']);
180 if (isset($data['allowedUnsignedInt'])) {
181 $this->setAllowedUnsignedInt($data['allowedUnsignedInt']);
183 if (isset($data['allowedString'])) {
184 $this->setAllowedString($data['allowedString']);
186 if (isset($data['allowedMoney'])) {
187 $this->setAllowedMoney($data['allowedMoney']);
189 if (isset($data['usedUnsignedInt'])) {
190 $this->setUsedUnsignedInt($data['usedUnsignedInt']);
192 if (isset($data['usedMoney'])) {
193 $this->setUsedMoney($data['usedMoney']);
195 } else if (null !== $data) {
196 throw new \InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
198 parent::__construct($data);
202 * @return string
204 public function __toString()
206 return $this->get_fhirElementName();
210 * @return array
212 public function jsonSerialize()
214 $json = parent::jsonSerialize();
215 if (isset($this->type)) {
216 $json['type'] = $this->type;
218 if (isset($this->allowedUnsignedInt)) {
219 $json['allowedUnsignedInt'] = $this->allowedUnsignedInt;
221 if (isset($this->allowedString)) {
222 $json['allowedString'] = $this->allowedString;
224 if (isset($this->allowedMoney)) {
225 $json['allowedMoney'] = $this->allowedMoney;
227 if (isset($this->usedUnsignedInt)) {
228 $json['usedUnsignedInt'] = $this->usedUnsignedInt;
230 if (isset($this->usedMoney)) {
231 $json['usedMoney'] = $this->usedMoney;
233 return $json;
237 * @param boolean $returnSXE
238 * @param \SimpleXMLElement $sxe
239 * @return string|\SimpleXMLElement
241 public function xmlSerialize($returnSXE = false, $sxe = null)
243 if (null === $sxe) {
244 $sxe = new \SimpleXMLElement('<EligibilityResponseFinancial xmlns="http://hl7.org/fhir"></EligibilityResponseFinancial>');
246 parent::xmlSerialize(true, $sxe);
247 if (isset($this->type)) {
248 $this->type->xmlSerialize(true, $sxe->addChild('type'));
250 if (isset($this->allowedUnsignedInt)) {
251 $this->allowedUnsignedInt->xmlSerialize(true, $sxe->addChild('allowedUnsignedInt'));
253 if (isset($this->allowedString)) {
254 $this->allowedString->xmlSerialize(true, $sxe->addChild('allowedString'));
256 if (isset($this->allowedMoney)) {
257 $this->allowedMoney->xmlSerialize(true, $sxe->addChild('allowedMoney'));
259 if (isset($this->usedUnsignedInt)) {
260 $this->usedUnsignedInt->xmlSerialize(true, $sxe->addChild('usedUnsignedInt'));
262 if (isset($this->usedMoney)) {
263 $this->usedMoney->xmlSerialize(true, $sxe->addChild('usedMoney'));
265 if ($returnSXE) {
266 return $sxe;
268 return $sxe->saveXML();