1 <?php
namespace HL7\FHIR\STU3\FHIRResource\FHIREligibilityResponse
;
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 * This resource provides eligibility and plan details from the processing of an Eligibility resource.
15 class FHIREligibilityResponseFinancial
extends FHIRBackboneElement
implements \JsonSerializable
18 * Deductable, visits, benefit amount.
19 * @var \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
24 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
26 public $allowedUnsignedInt = null;
29 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
31 public $allowedString = null;
34 * @var \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney
36 public $allowedMoney = null;
39 * @var \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
41 public $usedUnsignedInt = null;
44 * @var \HL7\FHIR\STU3\FHIRElement\FHIRQuantity\FHIRMoney
46 public $usedMoney = null;
51 private $_fhirElementName = 'EligibilityResponse.Financial';
54 * Deductable, visits, benefit amount.
55 * @return \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept
57 public function getType()
63 * Deductable, visits, benefit amount.
64 * @param \HL7\FHIR\STU3\FHIRElement\FHIRCodeableConcept $type
67 public function setType($type)
74 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
76 public function getAllowedUnsignedInt()
78 return $this->allowedUnsignedInt
;
82 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt $allowedUnsignedInt
85 public function setAllowedUnsignedInt($allowedUnsignedInt)
87 $this->allowedUnsignedInt
= $allowedUnsignedInt;
92 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
94 public function getAllowedString()
96 return $this->allowedString
;
100 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $allowedString
103 public function setAllowedString($allowedString)
105 $this->allowedString
= $allowedString;
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
121 public function setAllowedMoney($allowedMoney)
123 $this->allowedMoney
= $allowedMoney;
128 * @return \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt
130 public function getUsedUnsignedInt()
132 return $this->usedUnsignedInt
;
136 * @param \HL7\FHIR\STU3\FHIRElement\FHIRUnsignedInt $usedUnsignedInt
139 public function setUsedUnsignedInt($usedUnsignedInt)
141 $this->usedUnsignedInt
= $usedUnsignedInt;
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
157 public function setUsedMoney($usedMoney)
159 $this->usedMoney
= $usedMoney;
166 public function get_fhirElementName()
168 return $this->_fhirElementName
;
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);
204 public function __toString()
206 return $this->get_fhirElementName();
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
;
237 * @param boolean $returnSXE
238 * @param \SimpleXMLElement $sxe
239 * @return string|\SimpleXMLElement
241 public function xmlSerialize($returnSXE = false, $sxe = null)
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'));
268 return $sxe->saveXML();